Contextual restart / chat end
This pattern allows the user to break out of the current conversational flow or restart the interaction.
The webchat widget provides two options to end a conversation: restart or end.
This functionality is not activated by default; it must be activated in the Interface Settings page:
Restart and Chat End buttons can be turned on in Interface Settings
Webchat widget with End Chat and Restart buttons turned on
In the flow of a conversation, if the user clicks on the Restart button, a
intent.core.restartintent 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 Conversationis created for you that handles the
WELCOMEevent from webchat as well as the global restart
Global Restart intent in the Trigger Conversation
With this in place, any time a user clicks the restart button, they will hit the
Trigger Conversationand this intent will transition them to the
Welcome Turnin the
Welcome Conversation. You should update this to suit your needs.
Note the End Chat is not handled out of the box and you will need to set this up as required
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
A scene to gather user information
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
The Scene Level Restart
Notice the intent is named
intent.core.SceneRestartas we want to capture all restarts within this scene
Now, if the user clicks the restart button at any point in within this scene, they will be routed straight back to the start.