text
To send a text response, use the text
reply type.
Each response is displayed in a separate message.
tip
You can also use the equivalent
a
DSL tag or the reactions.answer
method.Properties
Property | Type | Required | Description |
---|---|---|---|
text | String | Yes | Response text. |
tts | String | No | Response text with speech synthesis markup. |
markup | String | No | Formatting method. Accepted values: html , markdown , plain . |
Syntax
{
"type": "text",
"text": "<b>Response example</b>",
"markup": "html"
}
How to use
-
Simple response text.
script:
$response.replies = $response.replies || [];
$response.replies.push({
"type": "text",
"text": "Lucky you! You’ve got 15% off for our service."
}); -
Response text with HTML markup.
script:
$response.replies = $response.replies || [];
$response.replies.push({
"type": "text",
"text": "<i>Hello!</i>",
"markup": "html"
});cautionOnly the chat widget, Chat API, and Telegram support HTML markup. In other channels, the client will receive a message without formatting. -
Response text with Markdown markup.
script:
$response.replies = $response.replies || [];
$response.replies.push({
"type": "text",
"text": "**I am your personal virtual assistant**",
"markup": "markdown"
});