Sending WhatsApp Updates From Priority ERP: A Working Architecture
Back to blog
automation·September 3, 2026·11 min read·By Yehonatan Saadia

Sending WhatsApp Updates From Priority ERP: A Working Architecture

How to notify customers on WhatsApp when something happens in Priority ERP - the BPM trigger, the queue in between, why you cannot call Meta directly from the ERP, and the template rules that decide what you are allowed to send.

Key takeaways

  • Do not point the Priority webhook at Meta. You need a service in between to hold the template mapping, normalise phone numbers, retry, and log failures - Priority has no documented retry and Meta will reject most raw payloads.
  • Every message you initiate must be an approved template. The customer has not messaged you, so the 24-hour window is closed by definition and free text is rejected with error 131047.
  • Keep the notification UTILITY. An operational update with a URL button gets reclassified as marketing and priced accordingly - put the link in the body as plain text instead.
  • Phone numbers in an ERP are not E.164. Normalising 05X, 9725X and formatted variants to +9725X is a prerequisite, not a detail - an unnormalised number fails with 131009 or silently never arrives.

The request sounds simple: when a shipping document is created in Priority, notify the customer on WhatsApp. Both sides expose an API, so it looks like a direct connection. In practice a direct connection will not work - not because of a technical limitation, but because of three requirements neither side provides.

This assumes familiarity with Priority webhooks and WhatsApp Cloud API setup.

Why not to connect them directly

You can define a Priority webhook pointing at any URL. It is tempting to point it straight at Meta's Graph API. That will not work, for four reasons:

  1. Payload shape. Priority sends JSON in its own format, organised by form. Meta requires a completely specific structure with messaging_product, to, type and a components array. There is no way to bridge them through configuration.
  2. Authentication. Meta requires a System User token in an Authorization header. Priority sends its own token in a priority-bpm-token header. These are different mechanisms.
  3. Phone normalisation. The number on a customer card is almost never in E.164 format.
  4. No retry. Priority has no documented retry policy. If Meta returns a transient error, the message is simply lost and nobody finds out.

So the architecture is always three parts, never two.

The architecture

Priority (BPM rule)
   → webhook →
Middleware service (queue + mapping + log)
   → Graph API →
WhatsApp Cloud API

1. The Priority side

Define an endpoint in the Webhook Definitions form under BPM Maintenance, then a BPM rule on the relevant document's flow chart with action type Webhook.

Send little in the body: the document number, the customer number and the event type. Not every field. The reason - any extra field you need later requires editing the rule inside Priority, which usually needs access you do not have. Fetch the rest over the REST API.

If there is a business condition - only customers who consented, say - put it in the rule's condition inside Priority rather than in your code. Less traffic and fewer places to check.

2. The middleware

This is the component doing the real work:

  • Validates priority-bpm-token and rejects anything without it. It is the only protection - without it, anyone who discovers the URL can make you send messages.
  • Writes to a queue and responds immediately. Never call Meta inside the webhook.
  • Enriches - pulls what is missing from Priority: customer name, phone, document details.
  • Normalises the phone to E.164.
  • Maps the event type to a template name and variable values.
  • Sends, logs and retries according to the error code.

3. Phone normalisation is not a detail

The phone field on an ERP customer card contains, in practice, anything: 052-1234567, 0521234567, 972521234567, +972-52-123-4567, sometimes two numbers in one field. Meta accepts only E.164.

The practical rules for Israel: a number starting with 0 - replace it with +972; a number starting with 972 - prefix a +; strip spaces, hyphens and parentheses. A number that does not resolve - do not send, flag it for review. Do not guess.

What you are allowed to send: templates only

This is the point that breaks plans. You are initiating the message - the customer has not written to you - so the 24-hour window is closed by definition. Free text is rejected with error 131047. Every such notification must be an approved template.

The design consequence: every event type needs its own pre-approved template, in every language. You cannot compose dynamic text - only substitute values into positional variables {{1}}, {{2}}.

So the template set has to be designed before any code is written. For example:

Priority eventTemplate shape
Order confirmed{{1}} customer name, {{2}} order number
Shipping document created{{1}} name, {{2}} order number, {{3}} tracking number
Invoice issued{{1}} name, {{2}} invoice number, {{3}} amount

Keep them UTILITY. These are operational updates, so they are cheaper and clear approval faster. The easy way to lose that is adding a URL button to your website - Meta will reclassify as MARKETING. If you need a tracking link, put it in the body as plain text.

Handling failures

Not every error is handled the same way. A practical split by Meta's error codes:

KindCodesWhat to do
Transient131000, 131016Retry with exponential backoff
Permanent per recipient131026, 131050Do not retry. Flag on the customer card
Configuration190, 131005, 132001Alert the operator - nothing will send until fixed
Rate131048, 131056, 80007Slow down. Never retry in a loop

Error 131026 - "no WhatsApp" - is useful business information. It is worth writing back to the customer card so the system knows next time that this channel is unavailable and falls back to email or SMS.

What not to do

  • Do not send without consent. An operational update about an order the customer placed is accepted; using the same pipe for marketing content is something else entirely, both legally and in terms of Meta's quality rating - which is what causes templates to be paused.
  • Do not put the Meta token in Priority. It belongs to the middleware only.
  • Do not rely on the webhook alone. Priority has no documented retry. A daily job that scans the last day's documents and verifies a message was sent for each is what makes this reliable.
#Priority ERP#WhatsApp Cloud API#webhooks#API integration#automation

Frequently asked questions

Can Priority ERP send WhatsApp messages directly?

Not usefully. A Priority webhook can call any URL, but Meta's Graph API requires a specific payload structure, a System User token in an Authorization header, phone numbers in E.164, and retry handling that Priority does not provide. A middleware service between the two is required, not optional.

Why can't I send free-text WhatsApp notifications from my ERP?

Because you are initiating the conversation. WhatsApp only allows free-form text inside a 24-hour window opened by the customer messaging you first. Since an ERP notification is unprompted, that window is closed by definition and free text is rejected with error 131047 - only an approved message template will be delivered.

How many WhatsApp templates do I need for ERP notifications?

One per event type, per language. Templates cannot compose dynamic text - they only substitute values into positional variables - so an order confirmation, a shipping notification and an invoice notification are three separate templates, each needing separate approval in Hebrew and in English if you serve both.

How should ERP phone numbers be prepared for WhatsApp?

Normalise to E.164 before sending. For Israel that means replacing a leading 0 with +972, prefixing a plus to numbers starting 972, and stripping spaces, hyphens and parentheses. Any number that cannot be resolved confidently should be skipped and flagged rather than guessed - an unnormalised number fails with 131009 or never arrives.

Are ERP order notifications on WhatsApp charged as marketing?

They should qualify as UTILITY, which is priced lower, because they are operational updates tied to something the customer did. The common way to lose that classification is adding a URL button pointing at your website, which Meta reads as promotion. Putting the tracking link in the body as plain text usually keeps the template UTILITY.

Keep reading

Related service

WhatsApp Cloud API

Templates, a two-way inbox and reminders on the official Meta API.

Learn more

About the author

Yehonatan Saadia

Freelance automation, web & MVP engineer

I'm Yehonatan Saadia, a senior engineer who builds business automation, custom websites, and MVPs for small and mid-sized companies across the US, Europe, and Israel. These guides come from real client work, not theory.

Work with me

Have a project like this?

Tell me what you're trying to automate or build and I'll tell you the fastest reliable way to ship it.