Whilst building engaging and interesting conversations for users to follow, it's important to consider that we don't want to create 1-way streets without giving the option to break out of the flow or restart.
The webchat widget comes with 2 things to help conversation designers in this situation - the restart and chat end buttons.
Out of the box, these buttons are not visible in the widget and must be turned on in the Interface Settings page:
In the flow of a conversation, if the user clicks on the Restart button, a
intent.core.restart intent is generated. Clicking on the End Chat button generates a
Both of these intents are dealt with slightly differently to a standard user intent from the webchat as they are
escalating - this means that if no local match is found, the conversation engine will work its way up through the current Turn, Scene and Conversation until looking for a top-level match.
The pattern is similar to the Contextual No Match pattern with the intent name being updated for each level of the conversation.
Chat End Intents:
When you create a new scenario, a
Trigger Conversation is created for you that handles the
WELCOME event from webchat as well as the global restart
With this in place, any time a user clicks the restart button, they will hit the
Trigger Conversation and this intent will transition them to the
Welcome Turn in the
Welcome Conversation. You should update this to suit your needs.
Individual Turns, Scenes and Conversations can handle restarts however they need.
Consider a scene in which we are trying to gather information about a user. Our conversational flow will be a question from the app, followed by an answer from the user.
It's easy to consider a situation where the user would want to restart this flow - if they've entered some wrong information for example.
A scene for this might look something like the one below
Notice that there is a Turn named
Scene Restart - the idea of this Turn is to handle the user restarting the flow and contextually at this point.
In this case, if the user restarts the flow at any point in this scene, we would want to route them back to the
Get Name Turn. We can set up 1 intent with a transition to do this for us
Now, if the user clicks the restart button at any point in within this scene, they will be routed straight back to the start.