Skip to main content
Developer docs
core/catalog

ALLOWED_TRANSITIONS

The static state-transition map that gates every catalog write. Invalid moves become operator-review rows, not Shopify mutations.

Every SKU lives in exactly one lifecycle state. ALLOWED_TRANSITIONS is the map of which moves between states are legal. The agent can only propose a transition that exists in the map; anything else is surfaced for a human instead of forced as a write.

The states

  • draft, active, throttled, promoted — live or pre-live.
  • watch — flagged for a metric breach, still live.
  • winding_down, archived — phasing out / removed from sale.
  • blocked — held by a policy or compliance flag.

The map

ALLOWED_TRANSITIONS (excerpt)python
ALLOWED_TRANSITIONS = {
    "active":        {"throttled", "promoted", "watch", "winding_down"},
    "throttled":     {"active", "winding_down"},
    "winding_down":  {"archived", "active"},
    "archived":      {"active"},   # revive only via active, never direct to promoted
}

Invalid moves become rows

If the agent wants archived → promoted (not in the map), it doesn't error and it doesn't mutate. It writes a review row describing the intent and the illegal transition, and asks an operator to open the transition or decline it. Those rows are where you learn your own rules are too strict.

// developer docs

Magistry runs your store. We run Magistry.

The SDK is the same one our worker uses in production. Same auth, same rate limits, same audit plane — no shadow surface.

Stable for a year · Versioned changelogs · No silent breaking changes