Triggering Different Flows with Similar Sounding Phrases

(Pete) #1

Hello hello. This should be such a basic one, but I’m having a total mind-blank.

We’ve built quite a complex set of flows, it all works well… except the different flows present different chapters in a handbook. We need to be able to trigger Flow 1 using ‘Chapter 1’ or ‘Chapter One’ as the command… however, it also triggers ‘Chapter 2’ and ‘Chapter 3’ etc too… is there any way of making the Trigger words not conflict with each other? We’re using;

Read Chapter 1 [chapter1]
Read Chapter One [chapter1]

As the trigger on flow 1.

Problem is, it also triggers

Read Chapter 2 [chapter2]
Read Chapter Two [chapter2]

On flow 2.

(Daniel Beckett) #2

Hi @pete_nexus

Triggers should always be as unique as possible to avoid any conflicts, this means that any repeated trigger words should be avoided.

There are two ways that this can be handled:

  1. Change your new message triggers to be unique words/phrases. E.g. 'One, ‘Two’, & ‘Three’.
  2. Use Filters on the triggers so that they only run if an exact match is detected.

If you decide to use the filters then they will only run if the message sent to the bot exactly matches what the filter is set to. For example if you have a trigger for ‘Read chapter 1’ and then a filter for {{message}} Equals Chapter 1 then it will only run if the bot is sent a message with the words ‘Chapter 1’.

You could experiment with broader filers. Something like {{message} contains Chapter & {{message}} contains 1. You’d need to setup a few variations though.