Skip to main content

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

PropertyTypeRequiredDescription
textStringYesResponse text.
ttsStringNoResponse text with speech synthesis markup.
markupStringNoFormatting 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"
    });
    caution
    Only 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"
    });