How can I customize message length in widgets?

How can I customize message length in widgets?

How to customize the "Read more" character count

You can set the maximum length of bot answers that are presented in a conversational widget. When a bot answer exceeds this character limit, it is truncated and a Read more button is displayed, which opens the article in full length.

When set to 0, articles are displayed in full length.

To define when the Read more button is displayed, do the following:

  1. In the AI Console, go to Touchpoints > Widgets.
  2. Click Personalize under the widget type that you want to change.
  3. Select a knowledge base or URL to customize.
  4. On the Basics tab, make sure you have Conversational selected for Widget Mode.
  5. In the Maximum Length Before Answer is Truncated field, click Customize.
  6. Type the number of characters to display without truncating the article.
  7. Save your changes.

How to override "Read more" character count at article level

You can manually change when the Read more button is displayed for a specific article.

Note: This setting only applies to conversational web widgets.
  1. In the AI Console, go to Knowledge > Articles.
  2. Select an article that you want to modify.

In the menu bar, click the Read More button.

The Read more separator is displayed.

  • In the article, hover your mouse over the Read more separator. Click and drag the multi-arrow icon on the left to move the separator.
  • Save your changes.

When the widget displays the article, the Read more button is now displayed at the revised place in the article.

Message length customization with the API in conversational widgets

You can define the length of messages before they are truncated and the Read more button is displayed in conversational web widgets. For example, to set visible message length to 400 characters, you can use the setReadMoreLimit Widget API method as follows:

nanorep.floatingWidget.api.conversation.setReadMoreLimit(400);

By default, the first 320 characters of a message are displayed.

Message length customization with the API in mobile widgets

You can define the length of messages before they are truncated and the Read more button is displayed in conversational mobile widgets. You can set the visible message length between 320 and 640 characters in the mobile application.