Jumploon

Automations & events

An automation is a workflow each contact walks through once it's triggered: a welcome series, an abandoned-cart reminder, a birthday email, a re-engagement campaign. Steps can wait, send email, branch on what the contact did, split traffic for A/B tests, update the contact and call your server.

Build them visually in the dashboard under Automations: start from a template or a blank canvas, click a + to add a step, and click any step to edit it. The canvas shows how many contacts reached each step, how many are waiting there, and opens and clicks for each email.

Triggers

TriggerStarts when
{ "type": "contact.created" }A contact is created. Add segment_id to start only for contacts created in that segment.
{ "type": "segment.added", "segment_id": "…" }A contact is added to the segment, by the API, the dashboard or another automation.
{ "type": "contact.updated", "property": "plan" }A contact's property (or first_name, last_name, unsubscribed) changes. Leave out property to start on any change.
{ "type": "event", "event": "trial.started" }Your app sends that event for a contact.
{ "type": "email.opened" }A contact opens a tracked email. Add broadcast_id to start only for one broadcast.
{ "type": "email.clicked" }A contact clicks a tracked link. Supports broadcast_id and url_contains.
{ "type": "date", "property": "birthday" }A date property (YYYY-MM-DD) comes round. Options: offset_days (−365 to 365, negative means before), hour (0–23 UTC, default 9), repeat (yearly or once).

Email triggers only start runs for existing contacts, and an automation's own emails never trigger it.

Steps

Every step has an id. Send one to refer to the step elsewhere (email conditions need it), or leave it out and one is generated.

StepFieldsDoes
send_emailtemplate_id, from, optional subjectSends a template. Skipped, ending the run, if the contact is unsubscribed.
waitminutes (1 to 525,600)Pauses the run.
wait_untilhour, minute, timezone, optional weekdays (0 = Sunday)Pauses until the next matching time, e.g. 10:00 Europe/Berlin on a weekday.
wait_forrule, timeout_minutesPauses until the rule is true, e.g. the contact opened an email, or the timeout passes. Then carries on either way.
branchrule, yes, noIf/else: runs the yes or no list of steps, then carries on after the branch.
splitpercent, a, bA/B split: sends percent% of contacts down a and the rest down b, then carries on after the split.
conditionruleEnds the run unless the rule is true.
update_contactpropertiesSets contact properties.
add_to_segmentsegment_idAdds the contact to a segment.
remove_from_segmentsegment_idRemoves the contact from a segment.
webhookurlPOSTs the contact, run and event data to your server. A failed call is logged and the run carries on.
exitEnds the run.

An automation can have up to 100 steps, with branches nested up to 8 deep.

Rules

Conditions, branches, waits and goals use the same rule shapes:

RuleIs true when
{ "kind": "property", "property": "plan", "operator": "equals", "value": "pro" }The contact's property matches. Use event.field for the triggering event's data, and FIRST_NAME, LAST_NAME or EMAIL. Operators: equals, not_equals, contains, not_contains, greater_than, less_than, exists, not_exists.
{ "kind": "segment", "segment_id": "…", "operator": "in" }The contact is in (or not_in) the segment.
{ "kind": "email", "step_id": "welcome", "operator": "opened" }The email that send step sent in this run was opened, clicked, not_opened or not_clicked. A click counts as an open.

Re-entry and goals

  • reentry decides whether a contact can start the automation again: allow (every time, the default), after_finish (only when their previous run has ended) or never.
  • goal is a property or segment rule checked before every step. Once the contact matches, for example once they've bought, their run ends.

Create an automation

curl https://api.jumploon.com/automations \
  -H "Authorization: Bearer $JUMPLOON_API_KEY" -H "Content-Type: application/json" \
  -d '{
    "name": "Trial onboarding",
    "status": "active",
    "trigger": { "type": "event", "event": "trial.started" },
    "reentry": "after_finish",
    "goal": { "kind": "property", "property": "plan", "operator": "equals", "value": "pro" },
    "steps": [
      { "id": "welcome", "type": "send_email", "template_id": "d-welcome", "from": "Acme <hello@acme.com>" },
      { "type": "wait_for", "rule": { "kind": "email", "step_id": "welcome", "operator": "opened" }, "timeout_minutes": 2880 },
      {
        "type": "branch",
        "rule": { "kind": "email", "step_id": "welcome", "operator": "opened" },
        "yes": [{ "type": "send_email", "template_id": "d-tips", "from": "Acme <hello@acme.com>" }],
        "no": [{ "type": "send_email", "template_id": "d-reminder", "from": "Acme <hello@acme.com>", "subject": "Did you miss this?" }]
      },
      { "type": "wait", "minutes": 7200 },
      { "type": "wait_until", "hour": 10, "minute": 0, "timezone": "America/New_York", "weekdays": [1, 2, 3, 4, 5] },
      { "type": "send_email", "template_id": "d-trial-ending", "from": "Acme <hello@acme.com>" }
    ]
  }'

An automation's status is draft, active or paused. Only active automations start new runs, and pausing one stops its runs at their next step. You can edit an active automation: runs carry on from the step they're at, and a run whose step was deleted fails.

Sending events

Tell Jumploon something happened, and every active automation listening for that event starts a run for the contact:

curl https://api.jumploon.com/events \
  -H "Authorization: Bearer $JUMPLOON_API_KEY" -H "Content-Type: application/json" \
  -d '{ "event": "trial.started", "email": "ada@example.org", "data": { "trial_days": 14 } }'
{ "object": "event", "event": "trial.started", "contact_id": "…", "automations_started": 1 }
  • event: 1–64 letters, digits, or _ . : -.
  • email: the contact. It's created if it doesn't exist, which also fires contact.created triggers.
  • data: optional, up to 32 KB. Available to the run's templates as {{event.field}} and to rules as event.field.

A mail.send key can send events, so your app doesn't need a full-access key.

Runs and stats

  • GET /automations/:id/runs lists runs with the step they're at (cursor) and a log of every step taken. Filter with ?status=running (or completed, exited, failed, canceled).
  • POST /automations/:id/runs with { "email": "…", "data": {…} } starts a run for an existing contact by hand, whatever the trigger. It's useful for testing.
  • POST /automations/:id/runs/:run/cancel stops a run.
  • GET /automations/:id/stats returns run totals and, per step id, how many runs reached it, how many are waiting there, branch and split outcomes, and email delivered, open, click, bounce and unsubscribe counts.