---
id: JNY-COM-CAT-004
title: A coordinator prepares codes and an administrator launches the offer
feature: FEAT-COM-CAT-04
product_area: commerce
module: catalog
revision: 1
status: draft
product_intent: confirmed
implementation_evidence: observed
supersedes: []
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
actor: ACT-COM-002
goal: Prepare a controlled marketing campaign for authorized activation.
capabilities:
  - CAP-COM-CAT-014
  - CAP-COM-CAT-015
  - CAP-COM-CAT-018
screens:
  - '/console/{tenantId}/configuration/orders/promotions'
  - '/console/{tenantId}/configuration/orders/promotions/new'
  - '/console/{tenantId}/configuration/orders/promotions/{id}'
  - '/console/{tenantId}/configuration/orders/promotions/{id}/codes/new'
  - '/console/{tenantId}/configuration/orders/promotionCodes'
steps:
  - 'n': 1
    surface: '/console/{tenantId}/configuration/orders/promotions/new'
    action: Prepare Books and Apparel benefit parts and a minimum purchase
    capability: CAP-COM-CAT-014
    expected: The draft presents the configured parts and summary
    provenance: test
    source: >-
      react-console:e2e/mock/promotions.mock.spec.ts#a new promotion is created
      for a category, shown on its view, and an edit to 15% comes back to the
      view
  - 'n': 2
    surface: '/console/{tenantId}/configuration/orders/promotions/{id}/codes/new'
    action: Create restricted single-use and organization-limited shared codes
    capability: CAP-COM-CAT-015
    expected: The saved code pages present their dates and capacity choices
    provenance: test
    source: >-
      react-console:e2e/mock/promotions.mock.spec.ts#a code is added in the code
      editor with a limit and a note, and lands on its page
  - 'n': 3
    surface: '/console/{tenantId}/configuration/orders/promotions/{id}/codes'
    action: Request a generated batch and export its completed codes
    capability: CAP-COM-CAT-015
    expected: Issuance history identifies the batch and provides its downloadable export
    provenance: test
    source: >-
      react-console:e2e/mock/promotions.mock.spec.ts#Generate Many starts a job
      that the Issuances tab lists
  - 'n': 4
    surface: '/console/{tenantId}/configuration/orders/promotions/{id}'
    action: Assess a member’s sample cart through Try It
    capability: CAP-COM-CAT-018
    expected: 'The response shows sample discounts and pre-tax, pre-shipping totals'
    provenance: test
    source: >-
      services-commerce:modules/promotions/tests/e2e/promotion-previews.e2e.spec.js#is,
      line for line and total for total, what the real checkout preview answers
  - 'n': 5
    surface: activatePromotion
    action: Have an authorized administrator activate the campaign
    capability: CAP-COM-CAT-014
    expected: Active state and the transition appear in promotion history
    provenance: test
    source: >-
      services-commerce:modules/promotions/tests/e2e/promotions-security.e2e.spec.js#activates
      a draft and resumes a paused promotion
alternates:
  - from_step: 5
    condition: The manager requests launch without the separate grant
    path: >-
      Launch remains absent from permitted console actions and fails backend
      access
    outcome: An authorized activator is required to leave preparation state
    provenance: test
    source: >-
      services-commerce:modules/promotions/tests/e2e/promotions-security.e2e.spec.js#cannot
      activate a draft, 403 permission_missing
failures:
  - from_step: 5
    condition: No usable claim exists for the coded offer
    path: Activation fails validation saying a code is needed
    outcome: Activation leaves preparation state unchanged
    provenance: test
    source: >-
      services-commerce:modules/promotions/tests/e2e/promotions.e2e.spec.js#refuses
      to activate a coded promotion with no active code, 409 no_active_code
  - from_step: 2
    condition: Entry duplicates an occupied claim after normalization
    path: The code fails validation as taken
    outcome: The invalid operation persists no change
    provenance: test
    source: >-
      services-commerce:modules/promotions/tests/e2e/promotion-codes.e2e.spec.js#refuses
      “EARLY25” beside “early 25”, 409 code_taken
rules_in_play:
  - BR-CAP-COM-CAT-014-02
  - BR-CAP-COM-CAT-014-10
  - BR-CAP-COM-CAT-014-11
  - BR-CAP-COM-CAT-015-01
  - BR-CAP-COM-CAT-015-06
  - BR-CAP-COM-CAT-015-07
  - BR-CAP-COM-CAT-015-10
  - BR-CAP-COM-CAT-018-01
  - BR-CAP-COM-CAT-018-03
assertions:
  - id: AS-JNY-COM-CAT-004-01
    statement: Promotion history retains each lifecycle action and supplied reason.
    provenance: test
    source: >-
      services-commerce:modules/promotions/tests/e2e/promotions.e2e.spec.js#records
      every transition on the history, newest first, with the reason given
  - id: AS-JNY-COM-CAT-004-02
    statement: Management authority does not include launch authority.
    provenance: test
    source: >-
      services-commerce:modules/promotions/tests/e2e/promotions-security.e2e.spec.js#cannot
      activate a draft, 403 permission_missing
  - id: AS-JNY-COM-CAT-004-03
    statement: A saved console edit returns to the updated promotion view.
    provenance: test
    source: >-
      react-console:e2e/mock/promotions.mock.spec.ts#a new promotion is created
      for a category, shown on its view, and an edit to 15% comes back to the
      view
  - id: AS-JNY-COM-CAT-004-04
    statement: Repeated issuance requests reuse their existing batch.
    provenance: test
    source: >-
      services-commerce:modules/promotions/tests/e2e/promotion-code-issuances.e2e.spec.js#answers
      the same batch for a repeat under the same key and makes no second batch
  - id: AS-JNY-COM-CAT-004-05
    statement: All Codes provides cross-promotion code discovery.
    provenance: test
    source: >-
      react-console:e2e/mock/promotions.mock.spec.ts#All Codes lists the codes
      of every promotion and narrows them by search
  - id: AS-JNY-COM-CAT-004-06
    statement: Sample assessment leaves sale records and usage unchanged.
    provenance: test
    source: >-
      services-commerce:modules/promotions/tests/e2e/promotion-previews.e2e.spec.js#consumes
      no use of any promotion
e2e_policy: required
e2e_reason: >-
  It crosses the promotion, code and issuance screens and depends on the console
  offering each action exclusively to the right role.
evidence:
  - 'Pinned service inputs: COMM-M1b record and engine plan, promotions tests'
  - 'Pinned console inputs: the promotion screens and their mock browser tests'
proved_by: []
---

# A coordinator prepares codes and an administrator launches the offer

## Story

The coordinator builds an offer and the codes buyers will use to claim it. A generated batch provides additional claims for distribution. Try It helps the coordinator review sample outcomes without consuming capacity. An administrator then performs launch after reviewing the prerequisites. The separate permissions keep preparation and activation accountable to their respective staff roles.
