Create Automation in Flexito OmniAI
The WhatsApp Ad Referral Trigger is a powerful tool for businesses looking to optimise their ad campaigns. By linking Facebook ads to specific WhatsApp chatbot automations, you can ensure that users receive tailored responses based on the ad they interact with. This feature helps
Listen to an audio overview
A short, AI-generated podcast-style summary of this article.
The WhatsApp Ad Referral Trigger is a powerful tool for businesses looking to optimise their ad campaigns. By linking Facebook ads to specific WhatsApp chatbot automations, you can ensure that users receive tailored responses based on the ad they interact with. This feature helps streamline communication, avoid message duplication, and enhance user engagement.
Whatsapp Ad Referral Trigger
The WhatsApp Ad Referral Trigger is an innovative feature that enables you to link Facebook ads with specific automation in your WhatsApp chatbot. When users click on your ads, it triggers these automations seamlessly.
This guide will explore two key aspects of using this feature:
triggering distinct flows for various ads
managing duplicate messages.
Watch the video tutorial below to get started:
Video Tutorial
Triggering Different Flows for Different Ads
When you have multiple ads for different products or services, it's crucial to ensure each ad activates the correct automation flow. You can achieve this by setting conditions to identify which ad a user has clicked.
Start by creating a new flow named "WhatsApp Ads Router." This flow will act as a hub, directing users to specific flows based on the ad they interacted with.
Creating a Trigger
Navigate to Automations -> Triggers -> +New Trigger -> WhatsApp Ad Referral
Here's an example of how the JSON CUF data appears:
Source_id -> This is linked to the specific ads you are running.
Source_url -> This can be utilised.
These identifiers are unique to your ads, indicated by Source_type -> which signifies they are ads.
Create the Sub-flow to Redirect to Specific Flows
By using Condition Nodes and Source_id, you can trigger different flows accordingly.
Create a new sub-flow named “Whatsapp_Ads_Router.” All ads will be directed to this flow, and based on the Ad's Source Id, they will be redirected to different sub-flows.
First, create an Action Node -> Set Variable Value -> Whatsapp_ads_ID (CUF created) and assign the JSON path value.
To learn how to create a JSON Path, use the JSONPath Online Evaluator at
Now, let's set up the CUF values using these JSON Paths.
Source_id -> $.source_id
Source_type -> $.source_type
Create a Condition Node to check if the WhatsApp_ads_ID has a specific number (using data from the </> 10_records JSON CUF variable). This source_id number helps identify which product or service ad the user came from, allowing you to trigger the appropriate flow.
Handling Default Replies and Main Flows to Avoid Duplicate Messages
If the default reply is active, manage it through the Condition Control of the triggered flow.
If the default reply is inactive, manage it through the Condition Control of the Main flow.
Add a Condition Node at the start of the triggered Flow.
If the default reply is inactive, it will trigger the Main-flow. Therefore, add the condition node at the beginning of the Flow.
Here's how it works in automations for Case 1, where the Default reply is Active:
Go to Automations -> keywords -> Default Reply -> Active -> Select the sub-flow example (Default Reply).
This sub-flow will always trigger when a new user enters the Bot.
In this Default Reply sub-flow, add a Condition Node. If the Traffic_type includes ad, do not send them anything because a sub-flow already handles this automation.
It's highly recommended to use the Last Message JSON system field instead of the WhatsApp referral Payload.
You have already set up the WhatsApp Ads Router flow to manage traffic from Ads.
If the Default reply is not active,
Go to Automations -> keywords -> Default Reply -> Not Active -> Trigger the Main flow.
In the main flow, add a Condition Node to check if the traffic_type is ad. If it is, do not send them anything.
The WhatsApp_ads_Router already handles these automations.
This setup ensures the user receives messages from only one automation, configured within the WhatsApp_ads_Router.
Users who arrive organically from your ref URL or website widget can still trigger the main flow.
This way, users coming from Ads won't receive duplicate messages.

