Using the ServisBOT CMS, it is possible to manage rich media for your bot responses. The CMS is made up of two sections, Content and Assets. This is also supported in our CLI under the following command
When creating or editing CMS items, it is possible to create language variants of any of our supported languages. At a minimum, please make sure to create an
en variant for any CMS entry to ensure you have a fallback in place.
When a bot is referencing content from the CMS, it will respond content variants that match the local set in the conversation’s
lang context value. This can be set by either using
setContext node in a flow, or as a property when initializing messenger.
de) and locales (
fr-ca) are valid settings for context and keys.
es-mx) and a content variant for that key exists for that locale (
es-mx), that variant will be used.
es-mx), and no content variant for that key exists for that locale, but a content variant does exist for the associated country code (
es), the content associated with just the country code is used.
en), then the content associated with the default locale is used.
Content entries are canned responses for your bot. The following types of content are supported:
Your bot will respond with a simple text message
Your bot will respond with a markup driven response.
Note : It is possible to use uploaded assets as part of your markup response, see the Assets section below, you can also use externally stored assets
Assets are files you want to share, these are files you upload to servisbot and are stored within your account. When you create an asset you are given a URL used to display it. You can use this URL in the content entry when you have it set to markup. This can be used to show images as a card, or files as a file previews You can get the URL of the asset on the asset section of the CMS
Alternatively, you can reference the asset URL using the
asset tag and the asset
Alias. The asset tag takes the format of
There are two ways you can use the content, via the content node in the classic flow and via sb intents.
To use it in classic flow you need to know the content key of your cms entry. Drag the content node onto the canvas where you want it in the flow.
Finally, enter the content key into the node.
When you want to use cms content entries in sb intents, create an intent in your bot. In the fulfillment section, select the botnet action of type Send CMS content. This will then give you a drop list of all your available cms content entries. Once saved when that intent is triggered, that piece of content will then be sent out.
Below is a content item with a PDF file in it
Below is the same content item but using an asset reference instead of an absolute url
Below is a content item with an Image file in it