Keyword Routing

This article will cover the use of the ‘Keyword Filter’ action in a flow to create a simple ‘reason for contact’ routing logic. This type of routing can be used to make sure specific query types reach specific teams in your contact centre, saving everyone precious time and effort! Having routing like this in place will also allow you to generate useful management reports and dashboards, so you can analyse the volume of work against a topic in real-time.

Getting started

For this guide, we’re going to assume you’re building a keyword filter that aims to detect a reason for contact in the customer message, and split the flow accordingly. We’ll create two main ‘groups’ of reasons, as follows:

  • Delivery - containing keywords like ‘timeslot’, ‘driver’ and ‘late’

  • Returns - containing keywords like ‘print label’, ‘drop off’ and ‘return’

First, head to the builder in your domain. Create a new action with the ‘+' button on the map, then select ‘Keyword Filter’.

creating keyword filter.gif
Create a new ‘Keyword Filter’ action

By default, you’ll have one branch on the filter. For each group of keywords, we’d recommend creating a separate branch. Set up your first branch as follows:

  • Add a new condition to the branch with the ‘+ Add’ button

  • Select or type Echo.Body as the source from the Explore menu - this is the content Gnatta will be searching in for your keywords

  • Change the function to Contains

  • Check Static Value because we’re just checking if the message contains a string of characters

  • Add your first keyword - in this case, we’re using delivery

In Gnatta, Echo.body is a shortcode for the message body. You can select any source you like in the Explore menu, such as the email subject line or the sender, depending on your specific use case for the Keyword filter.

At this point, our condition is technically valid and we could hit ‘Submit’, but it wouldn’t function very well because delivery is a relatively narrow search for such a large topic. To help capture as many relevant messages as possible into this branch, we’ll need to add more keywords to broaden the net.

image-20240614-134617.png
Create a branch for each keyword group, and add a condition

Adding values individually

If you’ve got a small handful of keywords to add, you can use the ‘Add Value’ button to type them in, just like this:

Bulk import

If you’ve got a very long list to add, it might make more sense to copy and paste them in all at once, or upload a CSV file. So for that, use the bulk import by clicking the import icon image-20240617-090450.png next to ‘Add Value’:

Paste or type in your values, separating each with a comma and then clicking image-20240617-083011.png to submit. Alternatively, use image-20240617-090508.png to select a CSV file from your computer.

When you’ve added all of the keywords you want to look for under that reason for contact, you can close the branch with the image-20240617-090554.png and open your next branch. Make sure you’re not duplicating any keywords - when the flow is triggered Gnatta will check the branches in order, so if the keyword is in multiple branches it will only work in the first one its found in.

Click ‘Submit’ in the top right hand of your panel when the filter branches are ready.

Branching & routing

You should now have three branches - one for Delivery, one for Returns, and one for your ‘else’ criteria. Assuming you already have relevant queues set up, we can go right on to adding a ‘Create Interaction’ action underneath each branch.

To make sure your flow will make sense to other users, it’s a good idea to give your actions a unique name that explains what it’s for, or what it’s doing. In our example we’re using ‘Delivery Interaction’ for the action under the ‘Delivery’ branch.

A good naming convention on actions in your flow will also help when you’re scanning Logs after your flow is fired, so you can more easily see which branches were used.

Whilst creating the interaction, you’ll also want to select a data group to display to your agents, and preset the Status field to ‘New’ (or another open state).

Give your flow a name by clicking the title in the nav bar - we’ve used ‘Keyword Filter’. Next, you’ll need to hit File > Save in the top left to save your flow as a draft, then when you’re ready to use it, File > Publish to put it into a published state. Once published and attached to an event, it’ll start firing whenever the event is triggered.

Â