Skip to main content
Developer docs
core/catalog

Action enum

The product move set the decision engine can emit — one recommended action per product per cycle, each tied to a trigger and a lifecycle transition.

Actions are the verbs the decision engine can emit. Each is bound to the trigger that fired it and to a valid lifecycle transition, and lands in decision_log as evidence.action. There is no free-form action: the set is closed, made of this enum and a fixed list of catalog skills the executor runs beside it, such as variant edits and inventory hygiene.

The move set

  • keep / wait — no-op with a logged rationale (the agent considered and declined, or is waiting for more data).
  • scale_winner — surface a winner for variant and related-product research.
  • optimize_loser — copy/image rewrite cycle.
  • discount_test — temporary price drop; the only price action. An underperformer needs Tier A cost before one is proposed; a competitor repricing can propose one without that check. Every discount test skips a variant with no cost and refuses a price below 1.8× its cost.
  • draft / vault — pull from the feed, or hold for the season.
  • revive_seasonal — bring a vaulted product back.
  • flag_orphan — in the enum, but no path emits it today; a zero-traffic product is left untouched.

The enum, verbatim

The same enum also carries the Campaign Agent's ad actions, such as pausing or resuming a campaign, adjusting a budget or bid, and adding a negative keyword. Those target campaigns, ad groups and ads rather than products, so they are left out of the product list above and the code below.

decision_engine.Action (product actions)python
class Action(str, Enum):
    KEEP = "keep"
    SCALE_WINNER = "scale_winner"
    OPTIMIZE_LOSER = "optimize_loser"
    DISCOUNT_TEST = "discount_test"
    DRAFT = "draft"
    VAULT = "vault"
    REVIVE_SEASONAL = "revive_seasonal"
    FLAG_ORPHAN = "flag_orphan"
    WAIT = "wait"

Reversal is derived, not stored: because every action verb has a known inverse (a draft or vault republishes, a discount_test restores the price, an optimize_loser restores the previous content version), the revert executor computes the undo from evidence.action at revert time and stamps reverted_at on the row.

Developer docs

Magistry runs your business. We run Magistry.

The REST API and MCP server expose the same tool registry Magistry's own assistant uses, with the same scopes, approval model and audit trail.

Not installed yet? Start on the Free plan. API reference · Stable for a year · Versioned changelogs