If you serve customers from multiple countries, you can automatically route conversations and send messages in their preferred language based on their phone number's country code. This guide shows you how to set up country-based routing using conditions in Spur automation flows.
Why Route by Country Code?
Routing by country code allows you to:
Send messages in the customer's language (French for France, Arabic for UAE, etc.)
Assign agents who speak the customer's language
Personalize the customer experience based on their location
Note: This feature only works for WhatsApp, since phone numbers include country codes. Instagram and Facebook don't provide country codes, so routing by location isn't possible on those platforms.
How Country Code Routing Works
You'll use a Condition block in your automation flow to check the customer's phone number. Based on the country code, you can:
Send a message in the appropriate language
Assign the conversation to a specific agent or team
Trigger different flows for different regions
Example 1: Sending Order Confirmation in Different Languages
Let's say you want to send an order confirmation message in French for customers from France and Belgium, and in English for everyone else.
Step 1: Create a New Flow
Go to Automations in Spur
Click + New Workflow
Add a trigger: Shopify: Order Created
Step 2: Add a Condition to Check Country Code
Click the + button to add a new block
Select Condition from the Logic section
Step 3: Set Up Conditions for French-Speaking Countries
In the condition settings, click Add Condition
Set the variable to:
{{contact.number}}Set the operator to: begins with
Set the value to:
+33(France)Click + Add Condition to add another condition in the same group
Set the operator to: begins with
Set the value to:
+32(Belgium)
Why group them together?
If either condition is true (the number starts with +33 or +32), the flow will proceed to send the French message.
Step 4: Add a French Template Message
Connect the True branch of the condition to a WhatsApp message block
Select a French template (e.g., "Order Confirmation - French")
Configure the template with the order details
Important: Since this is triggered by an order creation, you may not have an active 24-hour messaging window with the customer. That's why you must use a template message (not a regular free form text message).
Step 5: Add an English Template for Everyone Else
Connect the None of the conditions match branch to another WhatsApp message block
Select an English template (e.g., "Order Confirmation - English")
Configure the template with the order details
Flow Diagram:
Shopify: Order Created ↓
Condition: Does contact.number begin with +33 or +32? ↓
Yes → Send French Template ↓
No → Send English Template
Example 2: Routing "Hi" Messages by Language
Let's say customers message you with "Hi" and you want to reply in their language.
Step 1: Create a Keyword Trigger
Create a new flow.
Add a trigger: WhatsApp: Keyword.
Set the keyword to:
hi(orhello).
Step 2: Add Conditions for Each Language
French Reply (France & Belgium):
Add a Condition block.
Create a condition group:
{{contact.number}}begins with+33(France){{contact.number}}begins with+32(Belgium)
Connect the True branch to a WhatsApp message block.
Write your French reply (e.g., "Bonjour! Comment puis-je vous aider?")
Arabic Reply (UAE):
In the same Condition block, add a new condition group (not in the same group as French).
Set:
{{contact.number}}begins with+971(UAE)
Connect this condition to a WhatsApp message block.
Write your Arabic reply (e.g., "مرحبا! كيف يمكنني مساعدتك؟")
English Reply (Everyone Else):
Connect the None of the conditions match branch to a WhatsApp message block.
Write your English reply (e.g., "Hi! How can I help you?")
Flow Diagram:
WhatsApp: Keyword "hi" ↓
Condition: What country is the customer from? ↓
+33 or +32 → French Reply ↓
+971 → Arabic Reply ↓
None match → English Reply
Example 3: Assigning Agents Based on Country
You can also assign conversations to specific agents based on the customer's country.
Step 1: Add a Condition to Check Country Code
Use a Condition block to check
{{contact.number}}(similar to Example 2).
Step 2: Add an Action to Assign an Agent
Connect the True branch (e.g., for UAE customers) to an Action block.
Select Assign ticket to agent.
Choose the agent who speaks Arabic.
Step 3: Repeat for Other Countries
Add separate conditions and actions for each country/language group.
Flow Diagram:
WhatsApp: Keyword "hi" ↓
Condition: Is contact.number +971 (UAE)? ↓
Yes → Assign to Arabic-speaking agent ↓
No → Assign to default agent
Important: Handling Numbers With and Without the "+" Symbol
Sometimes, phone numbers come with a "+" sign (e.g., +44) and sometimes without (e.g., 44). This depends on how the number is formatted by Shopify, WhatsApp, or other integrations.
To ensure your flow works in both cases, always add two conditions in the same condition group for each country code:
Example: UK Country Code (+44)
Condition Group:
{{contact.number}}begins with+44{{contact.number}}begins with44
This way, whether the number is formatted as +447123456789 or 447123456789, the condition will still match.
Why This Matters:
When using triggers like Shopify: Order Created, Shopify may send the phone number with or without the "+" sign. By including both formats in your condition, you ensure the flow works regardless of how the number is formatted.
Country Codes Reference
Here are some common country codes you might use:
Country | Country Code (with +) | Country Code (without +) |
France | +33 | 33 |
Belgium | +32 | 32 |
UAE | +971 | 971 |
UK | +44 | 44 |
USA | +1 | 1 |
India | +91 | 91 |
Australia | +61 | 61 |
Germany | +49 | 49 |
Spain | +34 | 34 |
For a full list of country codes, search for "international calling codes" online.
Best Practices
✅ Always use template messages when triggered by events like "Order Created" (since you may not have a 24-hour messaging window open with the person).
✅ Include both + and non-+ formats in your conditions to handle all number formats.
✅ Group related country codes together (e.g., France and Belgium both use French, so group them in one condition).
✅ Use separate condition groups for different languages (don't put French and Arabic conditions in the same group).
✅ Test your flow with different phone number formats to ensure it works correctly.
✅ Assign agents based on language skills, not just country, to provide the best customer experience.
Frequently Asked Questions
Q: Can I route by country on Instagram or Facebook?
A: No. Instagram and Facebook don't provide country codes, so you can only route by country on WhatsApp.
Q: What if the customer's number doesn't have a country code?
A: If the number doesn't include a country code, the condition won't match, and the flow will proceed to the "None of the conditions match" branch (usually you'd want to connect your default English message to this).
Q: Can I assign different agents for different countries?
A: Yes! After checking the country code with a condition, you can use an Action block to assign the conversation to a specific agent or team.
Q: Do I need to create separate templates for each language?
A: Yes. If you're reaching out to the customer first, you need to create and get approval for templates in each language you want to use (e.g., a French template, an Arabic template, etc.). Submit these templates in Meta Business Manager.
Q: What if I want to support more than 3 languages?
A: You can add as many condition groups as you need. Just create a separate condition group for each language/country code and connect it to the appropriate message or action.
Summary
Task | How To Do It |
Route by country code | Use a Condition block to check |
Send French message | Check if number begins with |
Send Arabic message | Check if number begins with |
Handle + and non '+' formats | Always include both |
Assign agents by country | Use an Action block to assign tickets after checking country code |
Use templates for order events | Always use templates when triggered by events like "Order Created" |
Need help setting up country-based routing? Reach out to our support team anytime :)




