Skip to content

DocsGuides

Pausing a flow: the kill switch

View as Markdown

Pause a flow and within a few seconds everyone sees your default choices, while your product keeps working. Resume it and Zigbongo carries on from what it had learned.

Pause and resume from code

await zb.pause("checkout");  // everyone sees your default choices
await zb.resume("checkout"); // Zigbongo chooses again
$zb->pause('checkout');
$zb->resume('checkout');
  • Both throw on failure (a ZigbongoError or ZigbongoException); they aren't retried. A flow that doesn't exist yet answers 404: you can only pause a flow that has been used or set up.
  • Over HTTP, they're POST /v1/flows/{flowKey}:pause and POST /v1/flows/{flowKey}:resume, and each answers with the flow's settings and its status, paused or learning.
  • They count against the other allowance, not decide, so the kill switch stays reachable while your decide traffic is at its limit (Retries and rate limits).
  • A flow is paused in one environment: pausing the live flow leaves the test flow of the same name as it was.
curl -X POST "https://zigbongo.com/v1/flows/checkout:pause" \
  -H "Authorization: Bearer $ZIGBONGO_KEY"

Pause and resume from the dashboard

On the flow's page, "Pause this flow" (click it twice to confirm) pauses it for the environment you're looking at. The page then shows "paused · showing your default choices", and "Start choosing again" starts it again. Anyone who can open the project can do it, and the organization's audit log records who did.

How fast it applies

A pause or a resume applies on every one of Zigbongo's servers within about a second, the one that took it included, and within a few seconds when they're busy. Calls already on their way may still get the old answer.

What your customers see while a flow is paused

  • Your default at every decision point. Each decision answers with the default you sent and arm: "paused".
  • A registered flow's default path. Each step is your definition's default: optional nodes at their optional.default, defaultRules on the session's inputs, a sequence in defaultOrder. These are the same steps the SDK walks when it falls back (Registered flows).
  • New sessions too. A session that starts while the flow is paused gets your default choices for as long as the pause lasts, whichever side of the holdout the person is on.

What a paused flow records

  • Calls still work. Sessions start and decisions are recorded, marked as paused, and outcomes are accepted as usual. Your code needs no change.
  • Nothing is learned from paused decisions. What Zigbongo learned before the pause is kept, and resuming carries on from it.
  • The lift comparison leaves paused sessions out. A session that saw the pause got your default choices on both sides, so it's left out of both and counted apart. See Holdout and lift.
  • Paused sessions still count as sessions in your usage (Sessions and outcomes).

When a payment fails

If a payment fails, you have 30 days to pay it. After that, Zigbongo stops choosing for your organization in every environment, test environments included, until the invoice is paid:

  • Your customers see your default choices, and your product keeps working. Every flow answers with your default and arm: "paused", flows created later included. Your data is kept.
  • Your own pauses are kept apart. Each flow keeps its own status. Resuming a flow doesn't start Zigbongo choosing again, and once you've paid, a flow you had paused yourself stays paused.
  • Paying restores it. Zigbongo starts choosing again within seconds of Stripe confirming the payment.
  • Those days aren't billed. Days on which Zigbongo didn't choose for you at all aren't billed; amounts due remain due.
  • You're told. Owners and billing members get an e-mail when the payment fails, with the date Zigbongo would stop choosing, and another when it stops. A banner on the organization's pages says so too: during the 30 days to owners and billing members, and to everyone once Zigbongo has stopped choosing.

Zigbongo can stop choosing up to an hour after the 30 days end. The terms set out the rest.

When the month passes the free allowance

Without a subscription, each calendar month's live sessions are free up to the free allowance (Pricing). Past it, Zigbongo stops choosing for your organization in every environment, test environments included, until you subscribe or the next month starts:

  • Your customers see your default choices, and your product keeps working, as when a payment fails: every flow answers with your default and arm: "paused", flows created later included, your own pauses are kept apart, and your data is kept.
  • Adding a card restores it. Zigbongo starts choosing again within seconds of Stripe confirming your subscription. Otherwise it starts again on the 1st, in UTC, with the new month's allowance.
  • You're told. Owners and billing members get an e-mail when 80% of the allowance is used, and another when Zigbongo stops choosing, each once a month. The usage page says how much is left, and a banner on the organization's pages says when Zigbongo has stopped choosing.

Zigbongo can stop choosing up to an hour after the month passes the allowance, and start again up to an hour after midnight on the 1st. Zigbongo never stops choosing for an organization with a subscription: what's past the allowance is billed.

For AI assistants and agents: every docs page is plain Markdown at its address with .md (this one is /docs/pausing-flows.md), and llms.txt lists them all.