---
id: WF-COM-CAT-019
title: Prepare a new workspace's built-in audiences and store placements
trigger: >-
  Workspace setup inserts built-in price audiences and the five Commerce storefront placements. Verification
  reports missing records so provisioning can retry.
product_area: commerce
module: catalog
revision: 1
status: draft
design_intent: proposed
implementation_evidence: observed
inference: []
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
implements:
  - CAP-COM-CAT-010
  - CAP-COM-CAT-019
crosses:
  - SVC-COM-CAT-pricing
  - SVC-COM-CAT-recommendations
idempotency: >-
  Seeding inserts missing rows and adopts existing ones, preserving customer edits such as placement caps or
  retirement.
concurrency: Provisioning operates within the workspace; reruns adopt existing rows without replacing their settings.
hops:
  - 'n': 1
    actor_or_service: Workspace provisioning (orders participant)
    action: >-
      Provision Standard for everyone and Member for eligibility with fixed initial ranks and an empty Member
      binding.
    anchor: 'services-commerce:modules/pricing/services/persistence/pricing-audiences.ts:seedBuiltInPricingAudiences'
    seam: sync
    on_failure: Report missing audience setup and permit provisioning retry.
    left_inconsistent: The workspace may remain without required built-in audiences.
    observer: The run report or provisioning verification identifies incomplete work.
    provenance: test
    source: >-
      services-commerce:modules/pricing/tests/e2e/pricing-audiences.e2e.spec.js#lists standard for everyone at
      rank 0 and member by eligibility at rank 10, built in, member shown to visitors, with no binding yet
  - 'n': 2
    actor_or_service: Workspace provisioning (orders participant)
    action: Insert the five Commerce storefront placements and verify that each exists.
    anchor: >-
      services-commerce:modules/recommendations/services/persistence/recommendation-placements.ts:seedStorePlacements
    seam: sync
    on_failure: Report missing placements and retry provisioning.
    left_inconsistent: Rules cannot bind a placement that has not been created.
    observer: The run report or provisioning verification identifies incomplete work.
    provenance: test
    source: >-
      services-commerce:modules/recommendations/tests/integration/services/persistence/recommendation-placements.integration.spec.js#inserts
      the five store placements the first time, under commerce, declared now
branches: []
waits: []
evidence:
  - >-
    services-commerce at c8b66a98: modules/tenant-lifecycle/services/participants/orders-participant.ts (the
    caller); modules/pricing/services/persistence/pricing-audiences.ts;
    modules/recommendations/services/persistence/recommendation-placements.ts,
    services/placements/store-placements.ts.
controls: [TC-IAM-006, TC-AZ-001, TC-AZ-002, TC-AZ-003, TC-AZ-004, TC-AZ-005, TC-AZ-006, TC-TEN-001, TC-TEN-002, TC-TEN-003, TC-CRY-001, TC-DAT-001, TC-DAT-002, TC-DAT-003, TC-DAT-004, TC-LOG-004, TC-LOG-005, TC-AVL-004, TC-MON-001, TC-MON-002, TC-MON-004, TC-PI-001, TC-PI-002, TC-PI-003, TC-PI-004, TC-PI-005, TC-PRV-001, TC-PRV-002]
---

# Prepare a new workspace's built-in audiences and store placements

## What It Does

Workspace setup inserts built-in price audiences and the five Commerce storefront placements. Verification reports missing records so provisioning can retry.

## The Flow

```mermaid
sequenceDiagram
  participant T as Workspace provisioning
  participant P as Pricing audiences
  participant R as Recommendation placements
  T->>P: seed Standard and Member (insert or adopt)
  T->>R: seed five store placements (insert or adopt)
  T->>R: which are missing?
  R-->>T: none, or the list
```

## When Something Fails

Report missing audience setup and permit provisioning retry. The workspace may remain without required built-in audiences. Report missing placements and retry provisioning. Rules cannot bind a placement that has not been created.

## Open Design Questions

The implemented recovery and concurrency behaviour above defines the current boundary. Any change to transaction scope or product authority requires a recorded decision.
