Event-triggered sequences

Start a flow from something that happened in your product.

When your backend does something worth emailing about (a signup, a purchase, a plan change), post an event to Pombo and a sequence picks it up.

The flow

  1. Build a sequence with a custom event trigger and give it an event name, for example donation.received.
  2. Set it active.
  3. From your backend:
POST /api/v1/events            scope: events:write
{
  "event": "donation.received",
  "email": "[email protected]",
  "properties": { "amount": "$50", "campaign_title": "Winter Appeal" }
}

Pombo records the event, finds the contact (creating them if the email is new), and enrolls them. Names match case-insensitively.

Using the payload

Everything in properties is available in every email step of that enrollment as {{ event.* }}:

Thank you for your {{ event.amount }} gift to {{ event.campaign_title }}.

This is per enrollment, not per contact. Two donations enroll the same person twice, and each run carries its own amount. Don't copy event data onto contact fields to work around this; there's nothing to work around.

If a property is only sometimes present (a campaign_title your backend doesn't always send, say), wrap the part of the sentence that depends on it in {% if %} rather than sending an empty string and hoping the surrounding punctuation still reads right. See conditionals in merge tags.

One event, two outcomes

The same event can also fire an event-triggered transactional email. A sequence and a transactional template can both be bound to donation.received, and both run.

Something unclear or missing? Tell us.