This site is no longer updated.Go to new Conversational Cloud docs

Bot's reply


You can use JAICP to transmit consistently various bot messages, such as pictures or buttons. The messages transmitted will then be converted to the channel-specific format.

Generic responses are transmitted in the replies structure. replies is an array of bot responses containing strictly typed items. You can transmit it to different channels, such as Telegram, Slack etc.

The bot returns one or more responses which are specified within special tags or are put to $response.replies by the script.

script:
    $response.replies.push( {
        type: text|image|buttons|...
        text: ...
        imageUrl: ...
        }
 ]

$response.replies is the list of replies obtained in the process of reaction processing.


Response types

Below is the list of responses supported by the replies platform.

Type Description
text A simple text response; each item is output as a single message.
buttons Output a button.
inlineButtons Output an inline button.
image Output an image.
raw Can be used to transmit channel-specific methods.
switch Switch the conversation from the bot to an operator.
location Output coordinates.
timeout Configure switching to a certain state if there is no response from the user.
dtmf Request a DTMF message from the user (numbers and letters in the tone mode). Telephone channel only.
hangup Abort call. Telephone channel only.
htmlResponse The htmlResponse response type is used to output the visual component for the skills created using the Interactive Canvas.
carousel Displays a list of elements to select one of them.

You can find details about the bot response format, parameters and message types for channels in the Response types article.