Create rich responses
Clai allows you to create visually all sort of rich responses for your Rasa assistant such as buttons, quick replies, images and carousels.
Text responses
Text response are supported by all channels.
You can split text responses into separate messages by typing enter
.
Markdown
Some channels allow you to style responses with Markdown. Here are common styling examples.
Markdown | Result |
---|---|
**Bold text** | Bold text |
*Italic text* | Italic text |
Link to [clai.ai](https://clai.ai) | Link to clai.ai |
Buttons and quick replies
The main difference between buttons and quick replies is that quick replies disappear from the conversation once a user has clicked on it while buttons persist.
Quick replies are used when the underlying payload (intents and entities) is contextual, for example with yes or no responses. Yes and No are generally direct answers to the previous bot utterance. Therefore there is no reason to keep the options available in the conversation once the user has responded.
Buttons, however will persist on the screen after the user has selected an answer. Buttons are used when the proposed options remain available later in the conversation.
Simply toggle the pin button to make your response a quick reply or a button.
Attaching actions to buttons
There are two button types:
- Postback: here you can add payload or value .
- Web URL: here you can specify the web url of the page to redirect after clicking on the button.
Drag and drop buttons to re-order them!
Adding a value to a button
By adding a value to the quick reply or button payload it will act as a user message, when clicked the value will fetch the corresponding intent. It is used in cases where you need the value to be stored inside a form.
If you just select the Payload without value, when clicked it will initiate the payload directly.
Images
To add an image, simply select the image message type. If you’re using Clai locally, you must add the link to your image. If you want to use the upload functionality, you must implement the upload and delete deployment webhooks.
Carousels
Carousels are included as part of the Enterprise Edition.
To create a carousel, select the carousel response type from the options, the start adding your cards. A carousel is made of cards, and each card contains a title, and description, an image, and up to 3 buttons.
You can also define a default action that will be performed if the user click anywhere on the cards (except the buttons).
Drag and drop carousels cards re-order them!
Tables
Tables are included as part of the Enterprise Edition.
To create a custom table you can simply select the response type as Table and then you can start adding columns and rows. You can also add more columns and rows by clicking on Add column and Add row respectively.
You can also choose the various data types such as text,payload,blank url,self url
while adding column data.
text - this type shows normal text response. payload - this type is to use the text as payload. blank url - here we can add url to the text, after clicking on the text it will redirect to the url specified in the new tab. self url - here we can add url to the text, after clicking on the text it will redirect to the url specified in the same tab.
The Limit Rows will limit the number of rows that will appear defaultly on the chat widget.
Videos
Videos are included as part of the Enterprise Edition.
You can also use the videos as bot responses by selecting the response type as Video and select your preferred video format.The Mp4 or YouTube are supported.
Insert video from URL requires you to enter the video url address. You can also include the alternate title of the video in Add alt tag.
Note : To use Youtube video type you have to provide the embeded url type from the Youtube.
Star Rating
Star Ratings are included as part of the Enterprise Edition.
You can easily create starrating response by selecting response type as Star Rating and add stars by giving payload values to the stars according to the requirement.
By adding a value to the star payload it will act as a user message, when clicked the value will fetch the corresponding intent. It is used in cases where you need the value to be stored inside a form.
If you just select the Payload without value, when clicked it will initiate the payload directly.
Note : The maximum number of stars you can add is 10.
The star rating widget will appear in the chat widget as follows:
Feedback
Feedback is included as part of the Enterprise Edition.
Similar to star rating you can also add a thumbs up thumbs down type feedback response by selecting the Feedback response type.
By adding a value to the thumbs up or thumbs down payload it will act as a user message, when clicked the value will fetch the corresponding intent. It is used in cases where you need the value to be stored inside a form.
If you just select the Payload without value, when clicked it will initiate the payload directly.
This will appear as follows in the chat widget:
Variations
Variations are alternative responses your assistant can provide. Variations should convey the same meaning and be used to make your assistant less robotic. Click the the ellipsis button and add your variations as follows.
Variations are supported for all channels and response types.
Advanced response configuration
The Rasa Webchat widget gives you some flexibility to further configure your responses. Click on the ellipsis menu and select the Behaviour tab.
- Decide where links should open. This will only apply to the current response: links are opened in a new tab (
target="_blank"
) by default for all responses. - Enable, disable or hide the user input field (e.g. to force the use of buttons). This will only apply to the current response: the input is always enabled by default for all responses.
- Force the widget to open or close. If you force close the chat widget, the response will appear as a tooltip attached to the chat launcher. You will need to force open again if you want to re-open the chat widget.
Note that these settings are attached to the response
When using the Rasa Webchat you can add further configuration to your responses.
Renaming responses
When you create a response, Clai generates a random response name. If you need more human readable names you can rename them as follows
Emojis 🎉🤔
Since Emojis are characters, they are generally supported by all channels and bot responses.
- All users: simply copy (e.g. from Emojipedia) and paste an emoji in your response.
- Mac users:
Ctrl+Cmd+[Space]
will open an emoji menu you can pick from. - Windows users:
Win + .
orWin + ;
will open an emoji menu you can pick from.