Skip to main content

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.

Written from Omnisend documentation

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-Type and User-Agent itself.
  • One address for all automations: the event is written in the body.

Step 1. Create a connection​

  1. Open Flows → Connections, press Connect a system and choose Omnisend.
  2. Press Copy address. It looks like https://events.alphasms.net/hooks/<TOKEN> — keep it secret.

Step 2. Add the Webhook block​

  1. Open Automation and the automation. Drag the Webhook block to the place where the event should go.
  2. URL — the address from the cabinet.
  3. Headers — not needed: the secret is already in the address.
  4. Paste the body below. Change order_paid in event and in message_id to the event of this automation (see Events).
  5. 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_at is 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 with invalid_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 automationAlphaFlow eventProperties
Placed orderorder_createdtotal
Paid for orderorder_paidtotal
Started checkoutcart_updatedthe properties you add
Order fulfilledorder_shippedthe 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_id and 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 build message_id from 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 with quota_exceeded and shown in the journal; the webhook in Omnisend stays on.

Omnisend documentation​