Route Lead From HQ to Outlet
For businesses with multiple outlets, it’s common to have a central WhatsApp number (HQ) that captures all new leads before routing them to the appropriate outlet. This workflow ensures that leads are automatically directed to their preferred outlet based on their response.
Example Business: Artopia Kids
Disclaimer: Artopia Kids is an example business used for illustration purposes only. It is not a real representation of any existing business.
Let’s use Artopia Kids, an art school for kids, as an example. They have three outlets:
- Orchard: WhatsApp number
+65 2222 2222 - Somerset: WhatsApp number
+65 3333 3333 - Novena: WhatsApp number
+65 4444 4444
Their HQ WhatsApp number is +65 1111 1111. When a new lead reaches out to HQ, the workflow will:
- Ask the lead to choose their preferred outlet.
- Route the lead to the chosen outlet.
- Send an acknowledgment message to the lead.
- Notify the outlet to follow up with the lead.
Workflow Overview
Here’s how the workflow will work:
- New Lead Message: A lead (e.g., Jack) sends a message to HQ (
+65 1111 1111). - Automated Response: HQ sends an automated message asking Jack to choose his preferred outlet:
Hi! Here at Artopia Kids, we believe in nurturing creativity in children.
Let us know which is your preferred outlet:
Reply "1" for Orchard
Reply "2" for Somerset
Reply "3" for Novena
Please wait for a moment for the system to respond.
- Lead Chooses Outlet: Jack replies with
1(Orchard). - Acknowledgment Message: HQ sends an acknowledgment message:
You have chosen Orchard outlet. Our Orchard outlet manager will reach out to you shortly 😊
- Outlet Follow-Up: After 15 seconds, the Orchard outlet (
+65 2222 2222) sends a follow-up message:
Hi Jack, we are excited to be part of your child's art journey.
To ensure that we can best assist you, please let us know:
Your name:
Your child's age:
What is your preferred programme:
Workflow Setup
To achieve the above, you will need to set up two workflows:
- HQ Workflow: Handles the initial interaction with the lead and routes them to the chosen outlet.
- Outlet Workflow: Handles the follow-up interaction with the lead after they’ve been routed.
HQ Workflow
This workflow is set up on the HQ WhatsApp number (+65 1111 1111).
Trigger
- Trigger:
Contact Created - Activates when a new contact is created in HQ.
- Note: If Jack doesn’t exist in the Exabloom system yet, when he sends a message to HQ, the system will automatically create a contact record and tag it with
whatsapp-lead-capture.
Actions
- Send Initial Message:
- Add a Send WhatsApp action to send the initial message:
Hi! Here at Artopia Kids, we believe in nurturing creativity in children.
Let us know which is your preferred outlet:
Reply "1" for Orchard
Reply "2" for Somerset
Reply "3" for Novena
Please wait for a moment for the system to respond.
- Wait for Reply:
- Add a Wait For Reply action to pause the workflow until the lead responds.
- Set the Timeout to 24 hours (or any duration that makes sense for your business).
- Handle the Lead’s Response with IF/ELSE:
- Add an IF/ELSE action to handle the lead’s response.
- Create three branches:
- Branch 1:
Wait For Reply > Message > Textis equal to1(Orchard). - Branch 2:
Wait For Reply > Message > Textis equal to2(Somerset). - Branch 3:
Wait For Reply > Message > Textis equal to3(Novena).
- Send Acknowledgment Message:
- Under each branch, add a Send WhatsApp action to send the acknowledgment message. For example:
- For Branch 1 (Orchard):
You have chosen Orchard outlet. Our Orchard outlet manager will reach out to you shortly 😊 - For Branch 2 (Somerset):
You have chosen Somerset outlet. Our Somerset outlet manager will reach out to you shortly 😊 - For Branch 3 (Novena):
You have chosen Novena outlet. Our Novena outlet manager will reach out to you shortly 😊
- Trigger Outlet Workflow via Webhook:
- Under each branch, add a Webhook action to send an HTTP request to trigger the respective outlet’s workflow.
- Configure the webhook payload to include the lead’s details (e.g.,
first_nameandphone). For example:{
"first_name": "{{contact.firstName}}",
"phone": "{{contact.phone}}"
}
Outlet Workflow
This workflow is set up on each Outlet WhatsApp number (e.g., +65 2222 2222 for Orchard).
Trigger
- Trigger:
Inbound Webhook - Activates when the HQ workflow sends an HTTP request to this outlet’s webhook URL.
- Ensure the payload schema contains at least
first_nameandphone.
Actions
- Create / Update Contact:
- Directly below the trigger, configure the Create / Update Contact action (this action is automatically added whenever you set an inbound webhook trigger).
- Map the
first_nameandphonefields to ensure the system can identify the contact. This step ensures the system creates the contact if it doesn’t exist or updates it if it already exists.
- Send Follow-Up Message:
- Add a Send WhatsApp action to send the follow-up message. For example:
Hi {{first_name}}, we are excited to be part of your child's art journey.
To ensure that we can best assist you, please let us know:
Your name:
Your child's age:
What is your preferred programme:
Testing Your Workflow
Before using the workflow with real leads, test it to ensure it works as expected:
- Add a Test Contact:
- Go to your Exabloom contacts page and add a new contact using your test phone number.
- Trigger the HQ Workflow:
- Send a message from the test contact to HQ (+65 1111 1111).
- Check if the initial message is sent.
- Simulate a Response:
- Reply with
1,2, or3to choose an outlet. - Verify that the acknowledgment message is sent and the outlet receives the webhook request.
- Test the Follow-Up:
- Wait 15 seconds and check if the outlet sends the follow-up message.
Tips and Best Practices
- Customize Messages: Tailor the messages to match your brand’s tone and include relevant details.
- Test Thoroughly: Always test your workflow with a test contact before using it with real leads.
Extending the Workflow
The Route Lead From HQ to Outlet workflow can be extended to handle more complex scenarios. Here are two common extensions you can implement:
1. Handling Invalid Responses
If a contact does not respond with 1, 2, or 3, you can guide them to provide a valid response and retry the process. Here’s how to set it up:
Steps:
- Handle Else Branch:
- In the IF/ELSE action, there is an Else Branch by default - use this to handle cases where the contact’s response is invalid.
- Send a Reminder Message:
- Under the Else Branch, add a Send WhatsApp action to remind the contact to respond with
1,2, or3. For example:Sorry, we didn’t understand your response. Please reply with:
"1" for Orchard
"2" for Somerset
"3" for Novena
- Under the Else Branch, add a Send WhatsApp action to remind the contact to respond with
- Retry the Process:
- Add a Go To action to redirect the workflow back to the Wait For Reply step.
- Set the Iteration Limit to 2 (or any number of retries you prefer). This ensures the workflow doesn’t loop indefinitely.
Why This Works:
- The Else Branch ensures that invalid responses are handled gracefully.
- The Go To action allows the workflow to retry the process, giving the contact multiple chances to respond correctly.
2. Handling Varied Responses with AI
If you want the workflow to handle more varied responses (e.g., "I want Orchard", "Option 3", "three", or even typos like "novna"), you can use an AI Model action to interpret the contact’s response.
Steps:
-
Add an AI Model Action:
- After the Wait For Reply action, add an AI Model action to evaluate the contact’s response.
- Configure the AI Model to analyze the response and output a unique keyword based on the contact’s choice. For example:
- If the response indicates Orchard, output
$CHOSEN_ORCHARD. - If the response indicates Somerset, output
$CHOSEN_SOMERSET. - If the response indicates Novena, output
$CHOSEN_NOVENA. - If the response is unclear, output
$UNKNOWN_CHOICE.
- If the response indicates Orchard, output
-
Update the IF/ELSE Conditions:
- Modify the conditions in the IF/ELSE action to check for the AI Model’s output:
- Branch 1: Check if the ai model output contains
$CHOSEN_ORCHARD. - Branch 2: Check if the ai model output contains
$CHOSEN_SOMERSET. - Branch 3: Check if the ai model output contains
$CHOSEN_NOVENA. - Else Branch: Handle cases where the ai model output contains
$UNKNOWN_CHOICE.
- Branch 1: Check if the ai model output contains
- Modify the conditions in the IF/ELSE action to check for the AI Model’s output:
-
Handle Unknown Choices:
- Under the Else Branch, add a Send WhatsApp action to ask the contact to clarify their choice. For example:
Sorry, we couldn’t determine your preferred outlet. Please reply with:
"1" for Orchard
"2" for Somerset
"3" for Novena - Add a Go To action to redirect the workflow back to the Wait For Reply step.
- Under the Else Branch, add a Send WhatsApp action to ask the contact to clarify their choice. For example:
Why This Works:
- The AI Model action allows the workflow to interpret varied responses, including typos and natural language.
- The IF/ELSE conditions ensure the workflow routes the contact to the correct outlet based on the AI’s interpretation.
Tips for Using AI in Workflows
- Craft Clear Prompts: The accuracy of the AI Model depends on how well you craft your prompts. Be specific about the keywords you want the AI to output.
- Test Extensively: Test the AI Model with a variety of responses to ensure it interprets them correctly.
- Set Iteration Limits: Use the Go To action with an iteration limit to prevent the workflow from looping indefinitely.
Happy automating!