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:
    1. List available operations
    2. List operation details (available product variants)
    3. 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 priceAccountTagPublic.

📦 Quantities & defaults (summary)

  • Validation at add/update follows standard stock/pack rules plus Operation line constraints.
  • Default line quantity when starting from an Operation:
    1. 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, optional dj-store, dj-store-view).

🔗 Related pages


🧭 API quicklinks