In order for the Logic to direct the conversation flow, we need a way to direct the conversation flow to the Logic. We can use any method that we normally use to direct a conversation flow, including buttons, Quick Replies, scripts, Questions, and other Logic. In this guide, we'll use an Inbound Question.
Logic can have Inbound Questions just like regular passages. When Logic matches a question, instead of sending message content, it uses the conditions to decide where to send the conversation next.
Our existing application passages already have questions specific to the account types, so we'll make Logic respond to more general credit card application questions:
- In the first tab of the Logic, click Inbound Questions.
- Add a Global question.
- Type some more general training phrases for credit card applications.
Add at least five training phrases. - Click Save.
Let's cover what we've achieved so far:
- If our user asks about a credit card application for a specific account type, the Inbound Questions for the application passages match, and the conversation goes straight to the passage.
- If the user asks a more general credit card application question, the Inbound Question of the Logic matches, and the Logic directs the conversation to the appropriate passage based on the user's account type variable.
To the chatbot user, it feels like the chatbot has remembered an answer they gave earlier, and is responding naturally to the conversation.
But what if the AccountType variable hasn't been set?
Because our Logic passage has global Inbound Questions, the user might ask the question so early in the conversation that they arrive at the Logic without ever seeing our welcome passage where we asked their account type. Let's take care of that with one more passage.
Comments
Article is closed for comments.