A definition file
sequences/onboarding.yaml
sequenzy sequences new onboarding. It writes a working example to sequences/onboarding.yaml.
The trigger
Any other trigger is written as
type and config, the way pulls return it. The trigger’s key is trigger unless you set key.
Steps
Each step has akey and one of these:
Any step can also take a
label, shown on the step in the dashboard, and config with extra settings for its type.
A branch or split path lists its own steps, which can include more branches. When a path finishes, its contacts continue with the step after the branch. A path with no steps, or else: [], continues straight on. To leave a path early, end it with end: true, or point its last step somewhere else with next: <step key>.
Conditions
Branch paths (if) and continueIf use the same conditions:
Give a path an
id to keep its stats stable when you reorder paths; otherwise paths are numbered branch-0, branch-1 and so on. Paths are checked in order, and the first match wins.
To check only activity since the contact entered the sequence, write the condition in its stored form, for example if: { conditionType: link_clicked, activityScope: this_sequence }. Pulls show any condition that has no shorthand in this form.
Emails
An email step has asubject, an optional previewText and name, and its content as either html or blocks. Pulls always return blocks. Leaving out name or previewText keeps the stored value.
To reuse an email you designed in Sequenzy, name it with template and its ID, from sequenzy templates list:
template replaces the template’s value. The step keeps its own copy, so editing it in the sequence never changes the template. When the template changes, the next dry run shows the step’s email as changed, and the push after it updates the step.
Settings
settings holds the enrollment mode, sending window, stop condition, frequency cap, BCC addresses and sender and Reply-To profile IDs. A setting you leave out keeps its current value. The easiest way to get the exact shape is to set it in the dashboard once and pull the sequence.
Pull and push
--raw. See The explicit format.
To start managing an existing sequence from code, pull it by its ID with a key of your choice. Its steps get keys based on their content, such as welcome-aboard for an email with that subject or wait-2d, and the first push saves them without replacing any step:
get_sequence_definition and push_sequence_definition MCP tools.
What a push does
- Steps are matched by key. A new key adds a step, a changed step is updated in place, and a step missing from the file is removed. A step keeps its key for life, so its stats and history stay with it. Rename a step’s
label, never its key. - Contacts on a removed step move on. They continue to the step that follows it, or complete when nothing follows. The dry run shows how many are waiting and where they go. If contacts are waiting on a removed step that could lead to more than one place, the push is refused until you connect it to a single next step.
- A push never turns a sequence on or off. New sequences start as drafts, and pushes leave the status and enrollment pause alone. Turn sequences on in the dashboard, with
sequenzy sequences enableor with the API. - Changes to an active sequence need confirmation. They affect current and future recipients, so pass
--confirm-live-change(orconfirmLiveChange=truein the API) after you have checked the dry run. - A push changes the whole sequence or none of it. If anything in the file is invalid, the sequence is not changed, and the error names the place in the file, such as
steps[2].branch[0].if. Tags and events named in the file may already have been created in your workspace. If someone edits the sequence while your push is running, the push fails instead of overwriting their change; push again.
Managed by code
Sequences created by a push are managed by code. The dashboard shows their steps and settings read-only, with a note that they come from your definition, so the dashboard never drifts from your files. Everything else stays available to your whole team: turning the sequence on or off, pausing enrollment, test sends, enrolling contacts and the stats. SetmanagedBy: dashboard in the definition to allow dashboard edits again, or have an owner or admin click Unlock for dashboard editing on the sequence. The next push still replaces the steps with what is in your file, so update the file or stop pushing it. Pulled files leave managedBy out, so pushing one never locks a sequence again; write managedBy: code in the file to lock it. Only owners and admins can change managedBy on an existing sequence.
The lock applies to the dashboard. The API and MCP update tools, such as update_sequence, can still change a code-managed sequence, and the next push replaces those changes with your file. Make the change in the file instead.
The explicit format
The explicit format lists every step with itstype and config, plus a connections list saying which step follows which. A document with connections is read in this format. It can describe any sequence, and it is what --raw and ?format=raw return.
action_webhook with isEndNode: true. Branch steps (logic_branch) label each outgoing connection with a condition such as { branchId: else }.
Limits
- A/B test steps pass through a push unchanged: a push keeps their stored settings and cannot create or remove them. Manage A/B tests with the A/B test API or MCP tools, or in the dashboard while the sequence is not managed by code, then pull again.
- A push can only relabel an inbound webhook trigger; change its event and settings with
sequenzy sequences webhook configure. A push cannot remove an inbound webhook trigger, replace it under another key, or switch a trigger to or from one. - Email attachments that use
{{event.*}}need an event-based trigger. - Discount steps (
action_create_discount) needprovideranddiscountTypewritten out. - Webhook header values are pulled as
[REDACTED]. Pushing them back unchanged keeps the stored values, so secrets stay out of your repository. - A step’s type cannot change under the same key, except between trigger types. Give the new step a new key instead.
endis the key of the sequence’s automatic end step; give your own steps other keys.- A definition holds up to 200 steps.