Sending Users to your Main Menu
Many chatbots require sending a main menu of options to your users to give them some guidance on what the bot can do for them. Once they have completed a task, received an answer to a FAQ, or accomplished whatever goal they set out to achieve, you may want to send them back to your main menu to select another option and complete another task. There are several ways to accomplish this depending on whether you want to prompt the user to trigger a menu by clicking a button, or if you want to automatically trigger a menu flow for them.
TLDR: If you prefer to learn by exploration, here's a sample flow that illustrates the concepts in this article. Also, if your menu has more than one level (i.e. nested categories that need navigation), you should consider combining the techniques in this article with our Menu feature.
1. Prompting the user to manually trigger or re-trigger a main menu using a shortcut
The easiest way to send someone back to a menu, or restart the current flow if the current flow contains the main menu, is to include a shortcut in the last message of your flow that has a value that matches one of the phrases in the New Message trigger of your menu flow. For example, lets say that your flow has a New Message trigger that is configured like this:
Note: if you want to learn more about New Message triggers and other kinds of flow triggers, please see this article.
As you can see, this flow will be triggered any time Flow XO receives a message with "hi", "hello", etc. If you want to trigger this flow automatically, rather than making the user type in one of the trigger phrases, you can provide them with a 'Shortcut' at the end of your flow that they can click to automatically send one of the trigger phrases to your bot and thus kicking off the flow:
While this technique only works if it is the very last step in your flow, you can still use it in the middle of the flow as long as you stop the flow for the current user at this point. You can do this by checking the 'Stop the flow if the conditions are met' checkbox in the 'Filter' of the 'Send Message' step:
That's all there is to it for prompting the user to trigger or re-trigger a menu flow (or any other flow for that matter) at the end of the conversation.
2. Triggering a menu flow automatically
You can also trigger a flow yourself using a 'Trigger a Flow' action. This is a very useful technique in many scenarios, not just returning a user to the main menu, and you can read all about it in this article. For the purpose of re-triggering the current flow, or triggering a different main menu flow, all you need to understand is that you should use a 'Trigger a Flow' action and use one of the keywords in your New Message trigger as the "trigger phrase". For example, if your New Message trigger looks like this:
You might configure your Trigger a Flow action like this:
You can insert the Trigger a Flow step anywhere you want. If you want your menu to show automatically when the user has completed the conversation, simply include this step at the end of your flow. If you want to trigger the menu flow as a response to an Ask a Question (as in the example flow) you can include the Trigger a Flow step in the middle of your flow with a filter. It is important that you end the conversation with the user when inserting the Trigger a Flow step into the middle of your flow - otherwise you will start two competing flows and your user will likely get confused or experience an error:
Menu Triggering Sample
We have put together a sample flow you can install into your account and experiment with. Simply click the link, install the sample, and enable it. Then you can see these concepts in action.
Let us know at firstname.lastname@example.org if you have any questions/comments or other feedback about this or any other Flow XO concept. Happy flowing.