OpenSequence
DocsAPI referenceSDKs and CLIReference
Sequences

Waits

Timed waits, event waits, timeouts, business days, send windows and jitter.

Edit on GitHub
"wait_2d":    { "type": "wait", "params": { "duration": "2bd" }, "next": { "then": "check" } },
"wait_reply": { "type": "wait_for", "params": { "events": ["reply", "meeting_booked"], "timeout": "5bd" },
                "next": { "reply": "end_replied", "meeting_booked": "end_booked", "timeout": "call_1" } }

Timed waits

wait computes until = now + duration when the step is entered and stores it on the run and as the enrollment's next_run_at; the planner picks the enrollment up when the time comes. Timers are rows, not process timers, so a restart loses nothing.

UnitMeaning
m, h, dminutes, hours, calendar days, wall-clock
bdbusiness days: step forward one calendar day at a time in the zone, counting Monday to Friday only; the time of day is kept. Holidays are not modelled

The zone is the contact's when settings.send_window.tz is contact (the default) and the contact has one (set, or inferred from their phone for SMS); otherwise the sender's.

Event waits

wait_for closes the step when one of the listed events arrives, and takes that event's transition. Each listed event must be wired (BAD_EVENT).

EventWoken by
replyan inbound email in a thread the service started, an inbound text, a reply you report, a linkedin_message task completed with replied, a connected call
reply:email, reply:sms, reply:linkedinthe same, on that channel only
call_connecteda task completed with an outcome in its connected_outcomes (by Allo or by you)
connection_accepteda linkedin_connect task completed with accepted
meeting_bookedan event on the sender's Google Calendar with the contact as attendee, or a meeting_booked you report

When a signal matches several listed events, the first in this order wins: the exact reply:<channel> after reply; call_connected before reply. A signal that exits the enrollment (because of exit_on, or an opt-out) exits instead of waking. A signal that arrives while the enrollment is paused does not wake it.

Timeouts

timeout is a duration; when it passes, the run closes on the timeout branch and the flow continues there (or the enrollment completes when timeout is unwired but the time passed). Without a timeout the step waits until a signal, an exit, or you act. A cycle through a wait_for without a timeout is a validation error (CYCLE); through one with a timeout, a wait, or a task, it is allowed.

Send windows and jitter

Timing is computed when an outreach step is entered and re-checked when it runs. Inside the interpreter, an outreach step outside settings.send_window is scheduled for the next opening (next matching day at from); at execution the gate checks again and defers to the next opening if the window closed meanwhile. jitter adds a random delay up to the duration, pushed back inside the window if it falls outside. SMS has an extra, fixed window: 08:00 to 21:00 in the recipient's zone, every day.

What the journey shows

A wait run records until; a wait_for run records until and events, then branch (the event name or timeout) and woken_by (the signal id) when it closes. An exit closes the waiting run on the exit branch.

On this page