Skip to main content
The two plan-building actions create (or reuse) a plan and then fill it. The other two actions — webhook and email — are on the Integrations page.

CREATE_OR_GET_PLAN

Creates a plan, or reuses a matching one, for the run. Common fields: name and description (both interpolated). The rest depends on planType.
brandSource and collectionSource are each { kind: "static", … } or { kind: "fromTrigger" } (resolve from the triggering entity). deadline is a date offset.
outgoingShopId / ingoingShopId (source / destination) are required.
season, startDate, endDate are optional.
supplierId is the required discriminator for find-or-create; sourceShopId is optional.
supplierId required; sourceShopId (RETURN side) and destinationShopId (RECEIVE side) optional.
Output: planId, planType, planName, isNew — available downstream as {{steps.<nodeId>.output.planId}} etc.

ADD_ITEMS_TO_PLAN

Adds items to the plan created by a CREATE_OR_GET_PLAN node. Common fields:

Scopes

  • Shop scope (shopScope): { kind: "all" }, { kind: "specific", shopIds: [...] }, or { kind: "fromTrigger" }. (Not used for rebalance — shops come from the plan header.)
  • Size scope (sizeScope): { kind: "all" } or { kind: "belowStockThreshold", threshold: <n> }.

Strategies

  • fixed — add a literal quantity per item.
  • fillToTarget — top each item up to target (only the delta is added).
  • scoreDriven — the data platform’s resolver reads the decision vector to set the quantity (no app-side parameters).
scoreDriven routes to the rebalance matching resolver (surplus/deficit/transfer-urgency scores → bipartite matching of source to destination shops).
  • fixed — apply a literal percent (0–100).
  • scoreDriven — the decision layer’s recommended-discount resolver.
  • recommended — decision-layer discount with three bounded knobs; defaults shown (fallbackPercent 15, maxDiscountPct 70, marginFloorPct 0).

Per-plan-type fields

Output: addedCount, skippedCount — available as {{steps.<nodeId>.output.addedCount}}.
Items added by a workflow carry their decision-vector attribution into the plan’s activity log, and the same business rules apply as for manual edits.