🤖 Automations & Chatbots

Starting a WhatsApp flow from your own system

One small piece needs a developer. Everything after it you build yourself on the canvas.

An External Event trigger starts a WhatsApp flow when your own software posts an event to us — a delivery slot needing booking, a subscription about to renew, a repair finished. It is the escape hatch for everything Shopify's seven store events do not cover.

This is the one place in the builder where a developer is genuinely needed, and it is worth being precise about how little they have to do: they post one message to one web address. Everything after that — the questions, the branches, the messages — you build yourself.

What your developer needs

  1. Your account API key, from Settings.
  2. The address to post to: /api/external/event.
  3. An event name they choose and you both agree on — for example delivery_slot_request.
  4. The customer's phone number, plus any fields you want available in the flow.

That is the whole developer task. Any field they include arrives in the flow as {{event.field_name}}, so a payload carrying an order number and a customer name makes both usable in your messages.

Always name the event. A rule with a blank event name fires on every external event your system sends, which turns one flow into a catch-all that messages people about the wrong thing. Set a specific name on both sides.

The thing that surprises people: you need a template

A flow started by your own system lands on a chat the customer may never have written to, so the 24-hour window is shut. Meta only allows approved templates outside it.

Practically this means the first message of an external-event flow must be a template, and if that first message asks a question, the question step has to be sent as a template too — with quick-reply buttons whose titles match your flow's options exactly.

It also means the first message is charged. But there is a compensation worth designing around: the customer's tap opens the 24-hour window, so everything after it is free text at no cost.

A complete example: delivery slot booking

Your system asks, the customer chooses, your system hears back

TriggerExternal event: delivery_slot_requestYour warehouse posts it with the order number
Ask via template"When suits you?" — Morning / Afternoon / EveningApproved template with three quick-reply buttons
Their tapAnswer saved, window opens
Call your systemPOST the chosen slot back
success
"Booked for the morning slot."

Free text — the window is open.

failure
"Someone will confirm shortly."
Assign the chat

Install the delivery-slot flow

Needs a contact field, an approved three-button template, and your endpoint.

Add this automation to my account It installs as a draft. Nothing is switched on and no customer is messaged until you press Publish.

Button labels must match exactly

When a question is sent as a template, the template's quick-reply buttons are what the customer taps — so each option in your flow must match a button title character for character. "Morning" and "Morning slot" are different strings, and a mismatch means the tap resolves to nothing and the flow stalls.

Check this before publishing. It is the single most common reason an external-event flow appears to work and then goes quiet.

Sending data back

The Call External API step posts the customer's answer to your system. Two things worth knowing:

What this unlocks that Shopify events do not

Use caseWhy a store event won't do it
Delivery slot bookingScheduling lives in your warehouse system
Subscription renewal reminderNo renewal event exists
Repair or service ready for collectionNot an ecommerce event at all
Appointment confirmationYour booking system owns the date
Back-office approval decisionsHappens inside your own tools

The general rule: if the moment that should start the conversation happens inside software you control, this is the trigger for it.

What it still cannot do

An external event starts a flow now. It does not schedule one for later — there is no per-contact scheduled send, so "message this customer on the 14th" has to be your system posting the event on the 14th. That is usually a one-line change on their side and it keeps the timing where the data lives.

And no amount of API access moves Meta's rules. The first message still needs an approved template, the recipient still has to be reachable on WhatsApp, and marketing content still cannot be delivered to a US number. The API changes what starts a flow, not what a flow is allowed to send.

Testing it

Have your developer post one test event with your own phone number before you publish. It is the only way to exercise the path, and it proves three things at once: the key works, the event name matches, and the template renders with real values. See testing an automation safely.

What to hand your developer

The whole developer task fits on one page, and it helps to give it to them in this shape rather than asking them to work it out:

  1. The endpoint: POST to /api/external/event.
  2. The API key from your Settings, sent as the request's key header.
  3. The event name you have agreed — a specific string, never blank.
  4. The customer's phone number, in full international format.
  5. Any fields the flow needs, which arrive as {{event.field_name}}.
  6. When to fire it — the exact moment in their system.

That last point is the one that needs a conversation rather than a spec. "When the order is ready" means something precise inside their software and something vaguer to you, and the gap between the two is where these projects go wrong.

Never leave the event name blank. A rule with no event name fires on every external event your system sends, so a delivery-slot flow would also run when your CRM posts a renewal reminder. Set a specific name on both sides and check they match exactly.

Designing for a cold chat

Because these flows land on a conversation the customer may never have started, three things follow that do not apply to customer-triggered flows:

ConstraintConsequence for your flow
The window is shutFirst message must be an approved template
A question must reach them anywaySend the question as a template, with quick-reply buttons
Button titles are fixed at approvalFlow options must match them character for character
The first message is chargedMake it earn a tap, so the rest is free

The fourth row is the design lever. Once the customer taps, the 24-hour window opens and everything after it is free text — so an external-event flow that asks rather than announces gets a day of unrestricted conversation for the price of one template.

Two patterns worth copying

  1. Ask, save, send back. External event → template question with buttons → save the answer to a contact field → POST it to your system. This is delivery slots, appointment confirmations and preference collection, all the same shape.
  2. Look up, then act. A GET call to read something — availability, a balance, a status — wired into a POST that submits the result. Chain the GET's success port into the POST.

In both, wire the failure branch to a human. An endpoint that is down should produce a handover and an honest message, not silence.

What this does not solve

It starts a flow now. It cannot schedule one for later, because there is no per-contact scheduled send — so "message this customer on the 14th" has to be your system posting the event on the 14th. That is usually a one-line change on their side, and it keeps the timing where the data actually lives, which is the better place for it anyway.

And API access does not change Meta's rules. The first message still needs an approved template, the recipient still has to be reachable on WhatsApp, and marketing content still cannot be delivered to a US number.

Keeping it maintainable

Agree the event name and the field names in writing, and treat them as a contract. A developer renaming a payload field is indistinguishable from a broken flow at your end — the variable simply resolves empty and the message sends with a gap in it, or fails outright.

Start with one event

Resist wiring three integrations at once. Pick the single event with the clearest value — usually the one your team currently handles by copying details into WhatsApp by hand — and get that working end to end before adding another. The second is far easier once the first has proved the plumbing.

Once the first event is live, the rest is repetition: a new event name, a new template, the same plumbing. The hard part is only ever the first one.

Start there, and add the second one only once the first is trusted.

The rules your API access does not change

It is worth being explicit that posting an event gives you a new way to start a flow, not permission to send anything you like.

None of that is a limitation of the trigger. It is the same set of rules every other flow lives under, and designing for them from the start is easier than discovering them after your system is already posting events.

Frequently asked questions

Can my own software start a WhatsApp automation?

Yes, using the External Event trigger. Your system posts an event with your account API key to /api/external/event, and any fields it includes are available in the flow as {{event.field_name}}.

Why does an API-triggered flow need an approved template?

Because it lands on a chat the customer may never have written to, so the 24-hour window is closed and Meta only allows approved templates outside it. The customer's tap then opens the window, making everything afterwards free.

Why does my template question go quiet after the customer taps?

The option labels in your flow must match the template's quick-reply button titles character for character. A mismatch means the tap resolves to nothing.

Can an external event schedule a message for a future date?

No. It starts a flow immediately. There is no per-contact scheduled send, so your system has to post the event at the moment you want the message sent.

Need help? Message us