Operations
🧩 Overview
Operations let you define time‑bound (or recurring) assortments of product variants with quantity constraints and scoped visibility (public or private). Customer Users attached to eligible Accounts can browse active Operations and start an order (checkout v3) in one go.
Audience: integration teams and business operators. This page is functional‑first; API details are linked at the end.
💼 What is an Operation? (business value)
- Assortment packaging: group product variants for a campaign, season, or replenishment kit.
- Guided quantities: min / max / recommended quantities per product variant to steer purchasing.
- Targeting: share to all Accounts (PUBLIC) or a curated list (PRIVATE).
- Time window: start/end dates with automatic end‑of‑life handling.
- Localized & store‑scoped: names/descriptions use IETF language–region locales (e.g., en-GB, fr-FR); Operations are linked to a Store.
Who uses it?
- Operator & Customer user acting as admin (Sales Representative...): creates, configures, and publishes Operations.
- Customer User: sees eligible active Operations and initiates carts/orders.
🎯 When to use Operations
- Seasonal buys, launch campaigns, or negotiated assortments.
- “Pack” style recommendations with default quantities.
- Account‑targeted promotions with strict min/max constraints.
- Re‑runs of previous assortments by duplicating an Operation.
- Recurring order flow: a sales rep initiates the order, and the customer resumes and completes it.
✨ Key capabilities at a glance
- PUBLIC vs PRIVATE visibility: PUBLIC is open to all users, PRIVATE is restricted to all accounts associated with the Operation. Type cannot be changed later.
- Quantity rules per line:
minQuantity
,maxQuantity
,recommendedQuantity
. - Buyer flows:
- List available operations
- List operation details (available product variants)
- Start order
- Ownership & permissions: only the creator can modify; some actions require a specific right for Customer Users acting in admin (eg., Sales rep...).
- Locales & stores: admin DTOs are multilingual; front DTOs are single‑locale filtered by an input locale; Operations are scoped to a Store.
- Performance: designed for high volumes (thousands of lines and accounts) with pagination everywhere it matters.
🗺️ Concepts & relationships
The diagram shows how Operations relate to product variants, accounts, stores, and ownership.
%% See: operations-overview-erd.mmd (source file) graph TD Operation["Operation<br/>(code, name/description by locale,<br/>type=PUBLIC|PRIVATE, startDate, endDate, status)"] OperationLine["OperationLine<br/>(minQuantity, maxQuantity,<br/>recommendedQuantity, variantExtId)"] Variant["Product variant"] Account["Account"] Store["Store"] Owner["Owner<br/>(Operator or Customer User)"] CustomerUser["Customer User"] Operation -->|has| OperationLine OperationLine -->|targets| Variant Operation -->|visible to| Account Account -->|visible to all| CustomerUser Operation -->|scoped to| Store Operation -->|owned by| Owner
🔄 Lifecycle at a glance
- DRAFT — Configure metadata, lines, and (for PRIVATE) attach Accounts.
- ACTIVE — Visible for eligible Accounts; most fields are locked to avoid conflicts with carts/orders.
- INACTIVE — No longer usable by buyers (manual or automatic once
endDate
has passed).
%% See: operations-lifecycle-state.mmd (source file) stateDiagram-v2 [*] --> DRAFT DRAFT --> ACTIVE: Publish (manual) ACTIVE --> INACTIVE: Deactivate (manual)\nor endDate passed (auto) note right of DRAFT: Editable (lines, accounts, metadata) note right of ACTIVE: Mostly locked (safe for existing carts/orders)
👀💶 Visibility & pricing (summary)
- A product from an Operation is only visible if the Account is entitled to it via Catalog Views (same rule as outside Operations).
- Pricing precedence (when multiple offers apply): Operation price → Account → Tag → Public.
📦 Quantities & defaults (summary)
- Validation at add/update follows standard stock/pack rules plus Operation line constraints.
- Default line quantity when starting from an Operation:
recommendedQuantity
, else 2)minQuantity
, else 3)1
.
- If
minQuantity = 0
, the buyer can remove the line.
📈 Limits & performance (indicative)
- Up to ~5000 product variants per Operation (no bundles).
- Up to ~1500 accounts per Operation.
- Several hundreds of concurrent active Operations supported (use pagination and filters).
🔐 Security, roles & permissions (summary)
- Operator can view any Operation; can set PUBLIC; can manage all PRIVATE attachments.
- Customer User (admin) needs a specific right to create/manage Operations; can only attach Accounts they are attached to.
- Only the creator/owner can modify an Operation.
- All calls require standard Djust headers (e.g.,
dj-client
,dj-api-key
, optionaldj-store
,dj-store-view
).
🔗 Related pages
- Lifecycle & Status
- Visibility & Targeting
- Quantities & Constraints
- Buyer Experience
- Operator Experience
- API Reference
- 🔜 Troubleshooting
🧭 API quicklinks
- Admin — Operations
- GET /admin/operations — ADM-OPERATION-550 (List Operations). 
- POST /admin/operations — ADM-OPERATION-100 (Create an Operation). 
- GET /admin/operations/(operationId) — ADM-OPERATION-500 (Get Operation by ID). 
- PUT /admin/operations/(operationId) — ADM-OPERATION-200 (Update Operation metadata). 
- PATCH /admin/operations/(operationId) — ADM-OPERATION-201 (Change status (activate/deactivate)). 
- DELETE /admin/operations/(operationId) — ADM-OPERATION-300 (Delete Operation).
- Admin - Product Variants (Operation Lines)
- POST /admin/operations/(operationId)/lines — ADM-OPERATION-150 (Add product variants to an Operation).
- GET /admin/operations/(operationId)/lines — ADM-OPERATION-551 (List product variants of an Operation). 
- PUT /admin/operations/(operationId)/lines — ADM-OPERATION-250 (Update min/max/recommended quantities). 
- DELETE /admin/operations/(operationId)/lines — ADM-OPERATION-350 (Remove product variants from an Operation).
- Admin - Accounts (PRIVATE Operations)
- POST /admin/operations/(operationId)/accounts — ADM-OPERATION-151 (Add accounts to a PRIVATE Operation). 
- GET /admin/operations/(operationId)/accounts — ADM-OPERATION-552 (List accounts linked to a PRIVATE Operation). 
- DELETE /admin/operations/(operationId)/accounts — ADM-OPERATION-351 (Remove accounts from a PRIVATE Operation).
- 🔜 Shop:
/shop/operations
,/shop/operations/{id}
,/shop/operations/{id}/lines
. - 🔜 Start from an Operation:
/operations/{operationId}/order
(v3).
Updated 17 days ago