Concept
How reply matching works
What is Reply Matching?
Reply matching is the process of evaluating incoming messages to determine the appropriate flow or action based on predefined criteria. This involves checking messages against active conversations, keyword-based rules, recipes for common patterns, and custom regex patterns for more complex scenarios.
By systematically applying these criteria, reply matching ensures that customer replies are handled accurately and directed to the correct flow, enabling dynamic and responsive two-way conversations.
Reply matching process
With any incoming reply to your Pendula tenant, Pendula will match it to a flow based on a specific priority list. The priority list first considers active Conversations then Triggers, before finally marking it as 'unmatched'. This article breaks down the details of this and expected outcomes.
1. Are there any active conversations?
Upon receiving an inbound message, Pendula immediately checks if there are any active conversations involving the sender.
Within these active conversations, Pendula first considers the ones which are listening for an exact-keyword. If no exact-keywords are matched, Pendula will then try to match the message to a Conversation node listening to any rules created by the user.
Pendula will always try match the sender's most recent Conversation first. If a message matches, the sender progresses onwards in the flow experience.
2. Are there any inbound SMS triggers?
If a message doesn't match any active conversations, Pendula will then try to match it to any Inbound SMS triggers. All flow triggers listening to the keyword will be matched and fired.
3. Mark it as 'unmatched' and redirect to Unmatched message trigger
Finally, if the message doesn't match anything in an active conversation, or any triggers, the message will be marked as "unmatched". If you have set up an Unmatched Message Trigger Flow, the experience will be redirected to there.
For a detailed guide, please see Unmatched Message Trigger
The priority list visualised
What if I have used the same exact-keyword in the Conversation node across multiple flows?
Only the most recent flow experience listening to an exact-keyword response will be matched.
For example, Annie is in two marketing flows which are both listening for the exact keyword UPGRADE
. The offer from Flow One is sent at 8am, and the offer from Flow Two is sent at 9am. She replies with UPGRADE
. Annie's reply is matched to Flow Two, because it is the most recent flow experience listening to UPGRADE
.
What if I have overlapping rules/recipes across flows, in the Conversation node, that can match a reply?
If your customer is concurrently in multiple active Conversations, the most recent Conversation will be given priority. Read best practices of creating rules here.
For example, Cyril is in two flows:
- The Appointment Flow has the
Includes text "yes"
rule. This is sent at 8am. - The Upsell Flow has the
Includes text "y"
rule. This is sent at 9am.
Cyril replies "Yes", and even though his reply matches the rules in both flows, it is only matched to the most recent flow experience, Upsell Flow.
What if I have multiple paths or rules in one single Conversation node that match a reply?
In both scenarios, the topmost rule or path that matches the reply will be matched.