Exit context

What is an Exit context block?

An Exit context block is essential in building a multi-layered conversation on Automate. This block is used to return to the previous context, where the user entered a context block initially.


Contexts can be entered and exited using Context and Exit Context blocks. It allows conversations to be redirected into other flows or automated processes and return to the same point of the conversation where a user has left.

Use case: Exit context to the router

First, we are in the router (See Steering) and we are transferred to a given context, based on the intent we type. Let's take for example a context containing a flow to block your card. The user type "I would like to block my card" and is entering to the block_card context.

1136 626

Back to the router and the user continue with what is coming next, in this case, a flow asking the user if it needs anything else with the anything_else context block.


Use case: Exit context to user authentication

In this example, we have a flow/context to for users to block a bank card, a banking use case. The user types "I would like to block my card" and enters the block_card context.


However, before beginning this flow, the bot will needs to authenticate the user. In this case, we will redirect the user to another context to go through the authentication process.


Once the authentication is successful, the user is transferred back to the block_card context through the exit context block


The user can then continue with their task to block a bank card along with the authenticated customer information. The "block_card" context will use the customer's information to customise the task, reading what card the customer has.

Below is a simplified example, where a user may trigger one intent, redirect to that context, perform a specific action/solve a problem and then return.


Exit context vs context block


At the end of the flow of your context, you can choose to redirect back to the previous context, using Exit context blocks, or you may go further and redirect to a new context. An example may be to return to the main menu or a feedback context, collecting information about users experience.

Exit contextContext
The user will return to the previous context, where the user entered.The user will be redirected to an entirely new context. The specific context must be set within the context block.
✅ Very useful when you want each context's flow to have the same ending. For example, when we want the bot to ask if the user needs anything else. The Anything_else context would be the default ending.✅ Very useful when you want a specific context flow to have a specific ending and not the default ending.
So instead of having the bot ask the user if they need anything else, the bot could ask for feedback.