Keep your target channels in mind
One of the goals and challenges in developing interactions is creating a unified implementation and consumer experience across channels. When working with structured content in particular, LivePerson recommends that you find the "common denominator" across mobile messaging, web messaging, and Facebook Messenger with respect to a given element's attributes. For example, in a structured question, Conversational Cloud allows up to 128 characters for the button label, but Facebook does not allow more than 20 characters. Depending on your implementation, constraints like this might play a role.
For details on constraints like this, refer to Rich Messaging best practices on this site and the Messaging channels section in the LivePerson Knowledge Center.
Your bot implementation should meet Conversational Cloud requirements and those of the specific channels in use.
Interaction naming
Give interactions names that are appropriate and easily understood. Also consider numbering them. And match the name/numbering that you're using in your bot design. All of this helps you to find an interaction when you need it.
If you need to add an extra interaction in the middle of the dialog flow, you can always name it 2.1, 2.2, and so on.
Number of interactions
Strive for no more than 10 interactions in a dialog.
Working with rich content
- If possible, use the Multiple Choice question instead of the other question interactions.
- If you need to put a link into a button or you're going to use a slide-out menu, use the Button question.
- Use the code-based Universal interaction if you need a dynamic interaction.
Working with rules in interactions
-
Validate the consumer's input. Things like phone number, zip code, and email address can be validated using a RegEx expression in the rule:
Validate other types of input using a Pattern match or Evaluate Options match:
- Take care when using patterns with asterisks ( * ) in rules. This can sometimes lead to unexpected behaviors.
- Take care when using No Match conditions. They can break your fallback logic.
More best practices
- Use the more advanced interactions instead of the legacy ones. For example, use the Agent Transfer interaction; don’t use the Integration interaction coupled with a LivePerson Agent Escalation integration.
- If special interactions are available for a channel, use them. Examples: List Picker and Rich Link for the Apple Messages for Business channel.
- Give an interaction an appropriate name that matches the name in your bot design document.
- When answering questions, sometimes consumers prefer to type “1” or “a” for the first option, “2” or “b” for the second, and so on. While this depends entirely on your requirements, considering using an approach like this. In this case, in the custom rule, you can use a pattern match in the rule’s condition.
- Use logCustomEvent to save all errors and main points (events) in dialogs. Learn more in our debugging article. Also see the example guide in our best practice article.
- Use delays between interaction to avoid messages being sent in the wrong order.
- Don’t duplicate interactions; handle slightly different scenarios using variables. For example, if you’re using an Agent Transfer interaction, don’t duplicate it. If needed, you can pass the skill ID dynamically to the interaction.