Text bot response control
Summarize
Summary of Text bot response control
The Text bot response control in ServiceNow’s Virtual Agent allows you to present bot responses as formatted text within conversation topics. This enables clear, engaging interactions by using rich text features such as bold, italics, links, lists, and emojis. The control supports both static messages and scripted responses using Glide record or script variables, including dynamic content like temporary passwords.
Show less
Key Features
- Response Message Formatting: Use a text editor to style messages, insert links (static or dynamic via data pills), bulleted/numbered lists, and emojis for enhanced user experience.
- Alternate Messages: Add multiple alternate responses so Virtual Agent can randomly select varied replies for each conversation.
- Advanced Options:
- Shorten Responses: Automatically truncate long messages with a "Show more" link (enabled by default) to improve readability.
- Make Response Secure: Display the response once but mask it afterward to protect sensitive information.
- Request Feedback: Enable thumbs up/down icons for users to provide immediate feedback on bot responses.
- Conditional Display: Use no-code conditions or low-code scripts to show or hide the response node based on specific logic.
- Channel Support: Fully supported across major platforms including Web UI, Mobile UI, Now Assist panel, Microsoft Teams, Slack, Workplace, SMS (Twilio), LINE, WhatsApp, Apple Messages for Business, and Alexa (voice with screen support). Some channels (e.g., Facebook Messenger) only support plain text.
- Scripted Responses: Write JavaScript to dynamically generate response text, including user-specific data and multiple links formatted with Markdown.
Practical Use for ServiceNow Customers
By leveraging the Text bot response control, you can craft personalized, visually appealing Virtual Agent replies that improve user engagement and clarity. The ability to insert dynamic data and secure sensitive information ensures your bot responses are both relevant and compliant with privacy needs. Feedback options help you monitor and improve the conversation quality. Conditional display and multi-channel support allow you to tailor responses for different contexts and user environments.
Overall, this control empowers you to deliver rich, adaptable, and user-friendly chat interactions within your ServiceNow Virtual Agent implementation.
Use the Text bot response control in a Virtual Agent topic to display a bot response as text. You can format the Text bot responses using the text editor controls. For example, you can bold or italicize the text, as well as include links, bulleted lists, and emojis.
Text bot response properties
Use the Text response properties panel to design bot responses to the user.
| Property | Description |
|---|---|
| Node name | Name that identifies this Text bot response node in the topic flow. |
| Response message | The Text bot response to the user. The response can be one of the following:
You can format the text messages using the text editor controls. For example, you can use the icons on the Response Message field to bold or italicize the text, as well as include links, bulleted lists, numbered lists, and emojis. You can also include an input variable, such as a temporary password, in the response message. To include a link, do one of the following:
Fill in the fields in the Confirmation window. Enter the text to use as the link, and then enter the URL in the Link field. Enter the display label for the link and a static URL, or use the data pill picker to create a dynamic URL. |
| Add alternate message | Add one or more alternate response messages for the user. Virtual Agent randomly chooses one of your responses for each conversation. |
| Shorten responses | |
| Enable | When turned on, long bot responses are shortened. A Show more link is shown along with the truncated response. When the option is turned off, the entire response is used. By default, this option is turned on. |
| Make this response secure | |
| Enable | When enabled, the bot response is displayed to the user, but thereafter securely masked and not viewable by others. |
| Request feedback | |
| Enable | When turned on, thumbs up and down icons are displayed next to bot responses for feedback. |
| Hide this node | |
| Conditionally show this node if |
A no-code condition statement or low-code script that specifies a condition for presenting this node in the conversation. The condition must evaluate to true. |
Channel support
| Channel | Support | Constraints |
|---|---|---|
| Web UI | Supported | None |
| Mobile UI | Supported | None |
| Now Assist panel | Supported | None |
| Microsoft Teams | Supported | None |
| Slack | Supported | None |
| Workplace | Supported | None |
| Facebook Messenger | Supported | Plain text string only |
| SMS Twilio | Supported | None |
| LINE | Supported | None |
| Supported | None | |
| Apple Messages for Business | Supported | None |
| Alexa (Voice) | Supported | For screen devices, full support. For nonscreen devices, the header is read. |
Example Text bot response script
In this example, the script returns a string that greets the user. The gs.getUser().getFirstName() property is used to append the first name of the current user.
(function execute() {
return 'Hello ' + gs.getUser().getFirstName();
})()
In this example, the script returns links to three instances in the response. Use Markdown to include multiple links in the script.
(function execute() {
var output = 'Hello\n';
output += '\n- [Instance 1](http://instance1.com)';
output += '\n- [Instance 2](http://instance2.com)';
output += '\n- [Instance 3](http://instance3.com)';
return output;
})()
Example Text bot response control
| Response properties | Text bot response output |
|---|---|