On this page
Sommatic Docs
Open portal

Drafts and versions

How a draft becomes an immutable version, which version each trigger and mode runs, and the statuses a version can have.

View as Markdown
Open in

A workflow has two lives at once: the draft you are editing and the versions you have published. Knowing which one a call runs is the difference between a safe change and a surprise in production.

From draft to version

  1. Edit the draft. Every Save draft in the studio, every PATCH of the flow definition and every sync from Git replaces draft_nodes and draft_edges.
  2. Publish. Deploy in the studio, or POST /workflow-orchestration/control-plane/flow-design/flow-definition/:id/publish, copies the draft into a new flow version:
    • its number is the highest existing number plus one;
    • it becomes the default version (is_default: true), and the previous default stops being one;
    • the flow definition records it in latest_version_id and version_counter.
  3. Run. From then on, production calls run that version. The draft can keep changing without affecting them.

An empty draft cannot be published. Publishing never changes an existing version: to roll back, open the history in the studio, Restore an earlier version into the draft, save it and publish again.

Which mode runs what

Started byModeRuns
Run workflow in the studiotestThe saved draft
Webhook URL with testtestThe saved draft
Webhook URL with prodprodThe default published version
cron.trigger or connectors.microsoft.outlook.triggerprodThe default published version (only active workflows with a published version are scheduled)
workflow.chain from a test runtestThe draft of the target workflow
workflow.chain from a published runprodThe default published version of the target workflow

Each run reads its graph when it starts. A run that is already in progress keeps the graph it started with.

Version statuses

Only the default version (is_default: true) receives production traffic; when no version is marked as default, the most recent one is used. Besides the common statuses, a version can be marked deprecated, and deleted versions are ignored when Sommatic AI picks the version to run or numbers the next one.

Next steps

Install agent tools

Give your coding agent the official Sommatic AI docs: skills, the docs MCP server and Markdown pages, so it never has to scrape the site.

Skills only. They do not update by themselves; run it again to refresh.

npx skills add https://docs.sommatic.ai
How agents read these docs