Route conversations based on sentiment

Use this flow to route incoming messages to agents based on whether the tone of the message is ‘positive’, ‘negative’, or ‘neutral’!

How it works

  1. Conversation created: The flow is triggered when an incoming message is received from a customer.

  2. Predict sentiment: The flow passes the incoming message through an AI sentiment analysis action. This tool will analyze the content of the message and classify it as either positive, negative, or neutral based on the emotional tone conveyed.

  3. Conditional: The flow splits into three separate branches, one for each sentiment category (positive, negative, or neutral).

  4. Add tags to a conversation in Inbox: Within each of the three branches, the next flow action adds a tag. For example, if the message is classified as positive, it adds a "positive" tag to the conversation.

  5. Assign to agent in Inbox: The next flow action routes the conversation to the agents who have also been assigned that sentiment to handle.

How to use the flow

What you’ll need

  • At least one installed channel

  • Three tags set up in Inbox (Positive, Negative, and Neutral)

  • Inbox agents with correlating tags

How to setup


  1. Go to Flows > Template library and locate and select the ‘Routing Bot: Sentiment’ flow.

  2. Click Save to my library in the top right-hand corner.

  3. The trigger is automatically configured for WhatsApp, but you can change the trigger to a channel of your choice.

Predict sentiment

  1. If you’ve changed the channel trigger, send a message to that channel, then run a test on the ‘Predict sentiment’ action to pull in the data from your message.

  2. Click Save when you’re ready to move on.

Add tags to a conversation

  1. Select one of the three sentiment branches.

  2. Click the Add tags to a conversation in Inbox action.

  3. In the Configuration > Tags field, type the name of the tag that you want to use. For example, if you are using the ‘Sentiment = Positive’ branch, search for the ‘Positive’ tag you’ve created for your agents.

  4. Click Run test to check your tag configuration, then click Next.

Assign to Agent in Inbox

  1. Click the Assign to Agent in Inbox action.

  2. Click the Tags toggle to turn it on.

  3. Click Next.

Repeat the ‘Add tags to a conversation’ and ‘Assign to Agent in Inbox’ steps for each of the remaining two sentiment branches.

For the ‘Else’ branch, choose a default language tag for unrecognized languages, and make sure the flow jumps to that action.

Click Publish flow to start routing conversations based on sentiment.

Last updated