Text Message
This page describes where to use and find a text message type
Last updated
This page describes where to use and find a text message type
Last updated
A text message is a plain message with only text and is the primary message block we use to communicate with the user. It conveys information plainly conversationally and can also be used as a preamble to user choices using buttons, forms, and other message types.
Certain best practices apply to text messages.
For example, we recommend limiting text messages to 240 characters so that the information is easy to scan and read.
It is also important to break certain chunks of information up into different text messages. This will make it easier for users to read and digest what they are reading.
For example, separating out informative messages from the actionable question in a separate text message.
For more information on best practices for constructing messages, you can check out the Constructing Messages section of this documentation.
Text messages are a fundamental component of chatbot interactions, serving a wide array of purposes.
For example, to display welcomes and greetings, give instructions or guidance, and share basic information.
Text messages can display scripted information defined directly via the message editor or to display responses generated by a large language model.
Navigate to the Message Editor and create a text block by clicking the Add text block icon in the Layout section. You can add as many text blocks to your message as required.
If you would like to include a link in your text message, you can do this by pasting in the full URL in the message box. This will then be shown as a clickable link in OpenDialog's web chat Preview.
To use emojis in your text, you can copy and paste from a website such as https://emojihub.org/. If you are on a Mac, you can bring up an emoji keyboard with control + command + space.
Open your OpenDialog application
Select the Scenario that you wish to edit
Select Design from the left hand panel and select Messages
Go into the message that you want to add a message block to
Add a 'Text' message block
Add in your own text to the fields you want to customise
To preview your message, go to the Preview section
Navigate to the Message Editor and create a Custom Message. Select text-message
from the message type drop down menu and the XML Snippet field will automatically be populated with a code template.
Fill in the template with the properties of your particular message and when you are happy with it make sure to save your message and test it in the Test Preview chat window.
Open your OpenDialog application
Select the Scenario that you wish to edit
Select Design from the left hand panel and select Messages
Go into the message that you want to add a message block to
Add a 'Custom Message' block
Select 'Text message' from the drop down
Add in your own text to the fields you want to customise
To preview your message, go to the Preview section
A plain message with only text. Specially formatted links can also be included in the text body
<text-message>
Write the text you would like to display in your message here. Emojis can be inserted here too. For instructions see no-code text message.
Example:
Messages can also contain URLs in the text - that will be linkified. Links like opendialog.ai
in the message text will be turned to links.
There is no support at the moment for any other formatting such as bold, italics etc
If you change your mind and select a different message type after generating the XML code, the new message code will be appended in the same window so make sure to delete the old message code.
Saving a message: Always remember to hit 'Save Message' before closing or navigating away from the edit screen.
You can use a text message to display the responses from a large language model in your text message.
To do so, you can reference the attribute that contains the LLM response in the text message block as follows : {attribute_name}
For example, {llm_response}
This requires you to configure the attribute the LLM response will get stored to. For more information on attributes, check out our Attribute Management section.
When structuring a message, you are able to use multiple different message blocks together to create the message that you are looking for. However, when it comes to ordering and structing these, there are some rules that need to be followed. To learn more about this, please head to the Constructing Messages page for more information.
For all message types, a key element to take into consideration is Accessibility, especially for messages that include customisation with multimedia types such as buttons, images and links. For all information on accessibility within OpenDialog, please click here.