Omnisend
Omnisend is a marketing platform for online shops. The Webhook block of its automations sends a request with a
JSON body you write yourself, with [[...]] variables. Pointed at the Flows address, it starts your flows: an order
is placed or paid, a checkout is started and left, an order is fulfilled — and the customer gets the right message
in Viber or SMS.
This page is written from the public documentation of Omnisend and has not been checked on a live account yet.
What you need
- A paid Omnisend plan: on Free, automations have no webhooks.
- The address must be
https, on a domain and port 443 — the Flows address is. - The body is valid JSON of up to 64 KB. Omnisend sets
Content-TypeandUser-Agentitself. - One address for all automations: the event is written in the body.
Step 1. Create a connection
- Open
Flows → Connections, press Connect a system and choose Omnisend. - Press Copy address. It looks like
https://events.alphasms.net/hooks/<TOKEN>— keep it secret.
Step 2. Add the Webhook block
- Open Automation and the automation. Drag the Webhook block to the place where the event should go.
- URL — the address from the cabinet.
- Headers — not needed: the secret is already in the address.
- Paste the body below. Change
order_paidineventand inmessage_idto the event of this automation (see Events). - Test the webhook in the editor and switch the automation on.
The body:
{
"event": "order_paid",
"message_id": "omnisend:order_paid:[[contact.email]]:[[event.raw.created_at]]",
"contact": {
"phone": "[[contact.phone_number]]",
"email": "[[contact.email]]"
},
"traits": {
"first_name": "[[contact.first_name]]",
"last_name": "[[contact.last_name]]"
},
"properties": {
"total": "[[event.raw._total_price]]"
},
"context": { "source": "omnisend" }
}
[[contact.phone_number]],[[contact.email]],[[contact.first_name]]and[[contact.last_name]]are the contact's phone, email and name.[[event.raw.<property>]]is a property of the event that started the automation. The names of the properties depend on the event (Placed order, Started checkout and others) — see them in the Omnisend preview.occurred_atis left out on purpose: the format of[[event.raw.created_at]]is not described, and a time without a zone would make AlphaFlow refuse the whole event withinvalid_time. The time of the event is the time AlphaFlow receives it.
Step 3. Send a test
Test the webhook in the editor: the answer must be 200 OK. Then run the automation on your own contact with a
phone. The event appears in
Flows → Connections → Event journal within seconds. The
connection shows Recognised: Omnisend.
Events
| Omnisend automation | AlphaFlow event | Properties |
|---|---|---|
| Placed order | order_created | total |
| Paid for order | order_paid | total |
| Started checkout | cart_updated | the properties you add |
| Order fulfilled | order_shipped | the properties you add |
A name like order_paid goes only into the automation of its own trigger: order_paid — Paid for order,
order_shipped — Order fulfilled. An automation on Placed order sends order_created: a placed order is not
yet paid.
AlphaFlow takes the body as it is: the contact is the phone and the email from contact, the name comes from traits,
the properties from properties. Nothing has to be mapped. The names of the events are the ones the ready-made
templates expect — see Recommended events.
Good to know
- If the address cannot be reached, Omnisend retries several times within 24 hours with a growing pause and then
marks the webhook Failed in its statistics. A retry has the same
message_idand is not recorded twice. - The format of
[[event.raw.created_at]]is not described. If it has a space, the event id becomes invalid (not confirmed by the documentation) — then buildmessage_idfrom the order id,[[event.raw.<id>]]. - There is no signature: the secret in the address is enough.
- A contact without a phone comes with the email only: a message in Viber or SMS reaches it only if AlphaFlow already knows its phone.
- The address always answers
200. Above the daily event limit the event is refused in AlphaFlow withquota_exceededand shown in the journal; the webhook in Omnisend stays on.