Patterna Docs

Roll back a flow

Put the previous flow version back in one click, with a note that says why.

Everyone 2 min read View as Markdown

A flow is the recipe of a surface: generators, filters, ranker, exploration and reasons. Every save creates a new version. Only one version is active per surface. Rolling back means activating an earlier version. Nothing is deleted, so you can roll forward again the same way.

In the panel#

  1. Open Flows and pick the surface.
  2. Open the version list. The active version is marked, with who activated it and when.
  3. Compare the active version with the one before it. Versions diff side by side.
  4. Choose Roll back on the earlier version.
  5. Write a short note: what went wrong and what you saw. The note is required and goes to the audit log.
  6. Confirm.

On a live surface with the tenant's two-person rule on, you request the activation and a second person approves it; approving applies it. Until then the current version keeps serving.

The rollback shows as a marker on every time chart of the surface, with your note on hover.

Through the API#

List the versions of a surface:

curl
curl -sS "https://api.patterna.nl/v1/surfaces/home_articles/flows" \
  -H "Authorization: Bearer $PATTERNA_ADMIN_KEY"

Each entry has version, config, note, created_at, activated_at and created_by. Pick the version you want back, then activate it:

curl
curl -sS -X POST "https://api.patterna.nl/v1/surfaces/home_articles/flows/3/activate" \
  -H "Authorization: Bearer $PATTERNA_ADMIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "note": "Roll back to v3: fallback rate rose after v4" }'

The engine accepts the call with or without a body; the note goes into the audit log and the notification. The panel always sends one and refuses an empty one, so every activation from the panel carries its reason. Do the same from scripts. On a live surface with the two-person rule on, the call answers 409 approval_required; request an approval instead (POST https://api.patterna.nl/v1/approvals).

Check that it worked#

  • Surfaces shows the version you activated as the active flow version.
  • The live request stream shows new slates with the old version.
  • Governance → audit log has the activation with your note.

When to roll back, and when to do something else#

  • A new version performs worse or behaves oddly: roll back.
  • The surface itself must stop: set the surface to off in Surfaces; requests then get 409 surface_off and your backend shows its own list. That is a status change, not a rollback.
  • Before activating a new version next time, use Simulate in the flow editor. It replays the version on logged traffic and shows the SNIPS estimate with its effective sample, without changing anything.

Rollback on your side#

You can always stop Patterna from your own backend, without the panel. Keep two switches:

  • Feature flag off. A flag in your own dashboard. Instant, no deploy. The app gets your own lists.
  • Empty URL. An empty Patterna URL in your backend's config, then a redeploy. The backend no longer calls Patterna and no catalog sync runs.

Both serve the customer's own lists, which is the same thing that happens on a timeout.

esc
  • Type to search every page, heading and code sample.