Automatically Route WhatsApp Chats per Branch with Customer Data from Your ERP or CRM



Wholesalers with several branches often want one WhatsApp number for all customers, while each chat still needs to reach the branch that serves that customer. With the Saysimple Flow Builder, every incoming message passes an opening hours check, a lookup in your ERP or CRM and a routing step, so the chat lands with the right branch team automatically. This article explains the flow step by step, with examples of the logic and conditions.
Think of a wholesaler with 10 branches, each with its own team of 4 people. Customers don't want to look up which number belongs to which branch. They just want to send a WhatsApp and get an answer from the people who know them. That is exactly what this flow does, on one WhatsApp channel with 10 teams and 40 users.
Every incoming WhatsApp message goes through the same flow. Saysimple checks whether you are open, recognises the customer through your ERP or CRM, saves the most useful customer data on the contact profile and assigns the chat to the team of the right branch.
Why wholesalers use it

The Opening Hours node checks the moment the message comes in against your opening hours, per day and in your own time zone. It has two outputs: open and closed.

Both paths continue to the customer lookup. A message that comes in at night is routed straight away, so the right branch finds it waiting in the morning. Personalise the welcome with variables such as {{contact.name}}.
Add an HTTP Request node. It calls your ERP or CRM with the phone number of the person who sent the message. The examples below use an ERP, but the setup is the same for a CRM: any system with an API that can find a customer by phone number works.
Use the Test button in the node to see the response of your system. You need its field names in the next step.

With a Set Variable node per value, you take one field from the response, for example {{ERPContacts.BranchName}}, and store it as the variable branch. Then a Set Custom Field node writes those variables to the custom fields of the contact.
The result: whoever opens the chat sees right away which branch, customer number, company and sales representative belong to this customer. The data stays on the profile for every next conversation too.
A Variable Flow checks the branch variable. Every branch gets its own rule with the operator contains, and every rule leads to an Assign to Team node for that branch.

Why contains? Names in your ERP or CRM are often longer than your team names, for example Wholesale Utrecht North. With contains Utrecht the rule still matches. Make sure no branch name is part of another one, or the first matching rule wins.
A new customer, a different phone number or an empty branch field ends up on the Else path. The flow then asks the customer which branch they want to contact.

Everything runs on one WhatsApp channel. In Saysimple you create a team per branch, in this example 10 teams with 4 users each. Every team works in the shared inbox but only sees the chats assigned to them. Agents can always hand a chat over to another branch if a customer turns out to belong elsewhere.

Does this work with any ERP or CRM?
Yes, as long as your ERP, CRM or a layer in between offers an API that can find a customer by phone number and return the data as JSON.
Do I need a developer?
For the API connection, often yes: someone has to make the endpoint available and provide access. The flow itself you build in the Flow Builder without code.
Do I need a separate WhatsApp number per branch?
No. All branches share one WhatsApp channel. The routing happens in the flow.
What if a customer is linked to the wrong branch in the ERP or CRM?
The agent hands the chat over to the right team and updates the branch in your system. The next lookup then routes correctly.
Does the flow run again for every reply?
You decide. The flow nodes have an option not to trigger on replies, so a customer who is already talking to a branch is not sent through the routing again.
Can the sales representative get a notification?
The sales representative is saved on the contact profile. You can use that field to assign the chat to them or to inform them, depending on how your teams work.
