Bot handover example - How to isolate conversation to a bot and pass it to an agent when needed?

Let’s suppose that you are receiving similar messages and inquiries from different Users frequently. You want to solve this problem with connecting a bot into Inbox. The bot will then handle most of your conversations by answering frequently asked questions.

But what if the question is new or your bot cannot give a valid answer for some other reason? In such cases, you re-assign the Chat to your team members or employees, and you keep the conversation ongoing. But how to do that automatically with the Inbox?


Let’s create a working setup that would demonstrate how to solve the above problem.

We will configure our Default Rule Engine so that whenever a message is received from a new User, the chat is automatically assigned to the Bot. To start, go to the Rule Engine section of the Admin Panel and hit Add new Rule button.

This will show you multiple options of the “trigger” of the Rule we are creating. In this case, we need a Rule that is activated whenever someone wrote a message to us, and nobody is currently handling them. We can achieve this using Tags. In our case, Tags will show us the state of the conversation. Our first rule will be activated when there is no state present yet. In other words, there are no Tags on the user’s Chat yet. Choose the following option: “WHEN: WhatsApp User wrote a message to an untagged Chat”

Bots are another Users. Similarly to human users, Bots receive and send messages, but they also perform any other available actions like tagging related Chat with one of the Tags specified by you.

On every new message to untagged Chat, we want to assign the conversation to a Bot User. The Bot will then be notified with an assigned message and will take over the conversation actively. (Consult with specific Bot developer or author on how it works individually)

To do that, go to Assign to User section and pick the Bot User you’ve got together with your Bot integration:

Scroll to the bottom and click SAVE to have the Rule stored in your Rule Engine.

As mentioned above, Bot will be able to do other things, apart from replying to incoming messages. Eventually, Bot will put a Tag on the Chat. Depending on how your Bot was designed, it will put Tags varying from simple End-User descriptions (for example severity of the request, country of origin, or language) to states of the conversation. Consult with your Bot feature set description and check if there is a Tag that corresponds to Agent Needed or Team Member Needed or similar, that indicates human user handover is needed. We will use this Tag, to create another automated Rule that will assign a specific chat to one of your selected team members or employees.

Go to the Rule Engine section again, click Add new Rule, but this time choose the following option: “WHEN: Chat or Message was tagged with a Tag”:

On the next page, under Tagged with form field, pick the Tag we considered above - in our case, this will be Team Member Needed Tag:

We are creating a Rule that is activated whenever Bot tagged our Chat with Team Member Needed Tag. In our example, Bot is doing that whenever he decides the conversation should be handed over to a human. To implement that with our Rule Engine, go to the Assign to User section or Assign to Group section and choose settings that work best for you. For the sake of our guide, we choose Assign to group: Regular user and we leave Assign method with Let Group members decide:

That means, Chats will always be assigned to Regular Users of the Inbox, whenever Bot decides he’s unable to continue the conversations for some reason. With our setup, Chat is assigned to the Group only, so it’s never assigned to any User automatically. That’s a very useful setting when you’re only interested in having “handed over” conversations visible to your team members and you want to keep it inside the team to decide who is handling which conversation, individually.

There is also a second option for the Assign method above and that is Round robin. With this option, the Default Rule Engine will automatically pick one of your Group members (team members) on a random basis. That scenario will work much better for bigger teams or companies where there are many Chats on a daily basis and the work needs to be split equally between all team members.

Remember that you don’t have to split your Chats between all existing Inbox Users. In our setting, we choose Assign to group: Regular user that will take into account all regular users. Instead of that, you can as well make a separate Group for specialized User (like Customer Support Specialists or Agents) and restrict the Assign to group setting only to their Group.

That’s all that is needed for a complete handover setup! Scroll to the bottom of the page and click the SAVE button.

With two very simple Rules inside the Rule Engine, we configured our Bot to be reassigned from the conversation based on our own human agent preference.