Last updated: 10 May 2023
If you want complete control over the conversations your chatbot users are having, you may want to force-close a conversation.
By force-closing and re-starting a conversation, you control your users' experience of the chatbot.
Below are two distinct ways to achieve this.
Approach #1: Reset on close
This works on Converse, Embedded, and Full page. With Converse, the chatbot will reset upon closing and re-opening the widget, refreshing the page and when navigating from one web page to the next. With the other two channels, the reset will only trigger upon refreshing the page.
Go to Engage → Channels.
For the purpose of this doc, we will follow the steps in Converse. The steps are the same for Embedded and Full page.
Find Converse and click Options.
Under the Main settings, tick the box Reset chatbot on close box.
Step 2: Tweak your welcome conversation
Closing and re-opening a conversation renders the subscriber inactive.
It’s important to know that your chatbot users will actually go inactive when they close the chat. This doesn’t mean their data is wiped. It simply means the user is now inactive until they perform a new action (e.g. send a new message).
This has implications to the experience you would like to design for them when they re-open the chatbot.
Do you want them to receive the welcome message again? Adapt your welcome conversation trigger to include
AND when user is inactive AND when a message is not sent
Do you want them to receive a different message? Use the conditionals above to create a new ‘re-open’ conversation.
Step 3: Test the reset
To test this, you must have a live chatbot set up on your website with a working license.
Go to your website and open the widget. Engage with the chatbot by sending a few messages, then click the X in the top right.
Re-open the chatbot and notice your entire chat history has disappeared. You should be thrown back at the start of the conversation, receiving the welcome message.
Step 3: Understand the implications of turning this feature on
Turning reset on close on allows you to control the chatbot experience every single time a user comes back to it. Your chatbot may, for instance, focus on answering HR questions. Resetting it on close every time provides a better experience for the user, allowing them to start fresh.
Here’s everything else you need to know about this feature.
1. Closing and re-opening a conversation will not create a new subscriber
Even though for the user it feels like they’re starting fresh, the platform doesn’t actually wipe their data clean upon closing the widget. If a user closes and re-opens the chat widget, their new interaction will be associated with their previous one.
2. Users will lose their message history every time they close the chatbot
It is worth double-checking this is the experience you want for your users. If there’s a benefit for them to keep their chat history, you may want to turn this feature off.
Approach #2: Close current session action
Go to the Builder.
On a step of your choice (both message or automated), drag and drop an action.
In the action modal, select Close current session.
Step 2: Understand the implications of using this action
Closing the current session action is a drastic measure and should be used sparingly. Here’s what you should know about it.
1. When a user reaches this step, their session with the bot will end.
This means three things:
Their chat history will disappear.
They will see your welcome conversation again.
A new subscriber will be automatically created.
2. A new subscriber is created.
When a user’s session ends, a new one automatically starts. This new session assigns a brand new conversation ID (Analyse → Conversations).
3. Closing a session is irreversible.
When a user reaches the step and the session ends, the user can no longer be tied to their previous session.
4. Attaching this action to a message step will first send the message.
If you set this up:
The user will first receive the message, then five seconds will elapse before the session is force-ended and their conversation resets.
5. Triple-check your use of the action (and use case)
Because ending a session is irreversible, you will want to make sure you use this action appropriately. The clearest use cases for this action are:
Your chatbot is often used by people on public devices (e.g. library computers).
Your chatbot (or live chat) is used to discuss sensitive topics and resetting the conversation would reassure the user.
You require your chatbot to treat every new usage as a brand new interaction for metrics and tracking purposes.
If you are unsure on whether to use
End current session or
Reset on close, contact your account manager for guidance.