---
id: SVC-ACC-PRD-products
title: Products Service Module
product_area: accounting
module: products
repository: services-accounting
source_module: modules/products
revision: 3
status: draft
design_intent: proposed
implementation_evidence: observed
inference: []
source_sha:
  services-accounting: f47cb263875bbc0c5640fba7dae6785ec32695f8
  react-console: baf6dae382d6f41dce976c7f848667ccc37e076f
owns:
- DOM-ACC-PRD-001
- DOM-ACC-PRD-002
- DOM-ACC-PRD-004
does_not_own:
- Books owns units, currencies, exchange rates, pricing defaults, accounts, dimensions, merchant accounts and
  tax classes used by product references.
- Transactions owns financial lines and their frozen commercial values; Billing owns installment references.
- Batch Management owns account resolution and posting from current product setup or unit defaults.
- Commerce owns audience and period registries and purchase pricing; Orders executes selling settings. The
  approved realignment also assigns future tax classification to Commerce.
- Each domain owns its specialized extension record.
- CRM owns the task types and queues validated by task instructions.
- Platform owns communication, metadata, authorization and workspace lifecycle infrastructure; Accounting maintenance
  hosts export and purge participation.
operations:
- operation_id: getProductsHealth
  intent: Report API reachability and the deployed build.
  access: public
  permission: 'none: public health route'
  realises: []
  published_to_submissions: 'not published: the local module has no publication or capture declaration; external
    registry verification remains outstanding (FND-ACC-PRD-049).'
- operation_id: listProductTypes
  intent: Return registered product kinds in display order with their owners, pricing and capability flags.
  access: console
  permission: accounting.products.read
  realises:
  - CAP-ACC-PRD-001
  published_to_submissions: 'not published: the local module has no publication or capture declaration; external
    registry verification remains outstanding (FND-ACC-PRD-049).'
- operation_id: createProduct
  intent: Create the product and local price and selling lists in one transaction, calling Platform independently
    for requested owned content before commit.
  access: console
  permission: accounting.products.create
  realises:
  - CAP-ACC-PRD-002
  - CAP-ACC-PRD-007
  - CAP-ACC-PRD-008
  - CAP-ACC-PRD-010
  - CAP-ACC-PRD-011
  - CAP-ACC-PRD-012
  - CAP-ACC-PRD-013
  - CAP-ACC-PRD-014
  published_to_submissions: 'not published: the local module has no publication or capture declaration; external
    registry verification remains outstanding (FND-ACC-PRD-049).'
- operation_id: listProducts
  intent: Return a product page ordered by name and key with combined kind, status, unit and literal-search
    filters.
  access: console
  permission: accounting.products.read
  realises:
  - CAP-ACC-PRD-003
  published_to_submissions: 'not published: the local module has no publication or capture declaration; external
    registry verification remains outstanding (FND-ACC-PRD-049).'
- operation_id: getProduct
  intent: Read one product with its lists, financial summary and effective tax answer.
  access: console
  permission: accounting.products.read
  realises:
  - CAP-ACC-PRD-003
  published_to_submissions: 'not published: the local module has no publication or capture declaration; external
    registry verification remains outstanding (FND-ACC-PRD-049).'
- operation_id: updateProduct
  intent: Replace at the read version, rewriting lists and clearing omitted optional values except confirmation,
    with supported lifecycle and lock changes.
  access: console
  permission: accounting.products.update
  realises:
  - CAP-ACC-PRD-004
  - CAP-ACC-PRD-005
  - CAP-ACC-PRD-007
  - CAP-ACC-PRD-008
  - CAP-ACC-PRD-009
  - CAP-ACC-PRD-010
  - CAP-ACC-PRD-011
  - CAP-ACC-PRD-012
  - CAP-ACC-PRD-013
  - CAP-ACC-PRD-014
  published_to_submissions: 'not published: the local module has no publication or capture declaration; external
    registry verification remains outstanding (FND-ACC-PRD-049).'
- operation_id: deleteProduct
  intent: Delete a product after owner, protection and dependency checks, then attempt owned-template cleanup.
  access: console
  permission: accounting.products.delete
  realises:
  - CAP-ACC-PRD-006
  - CAP-ACC-PRD-007
  published_to_submissions: 'not published: the local module has no publication or capture declaration; external
    registry verification remains outstanding (FND-ACC-PRD-049).'
- operation_id: retireProduct
  intent: Retire at the read version without replacing configuration, requiring reactivation before ordinary
    correction.
  access: console
  permission: accounting.products.update
  realises:
  - CAP-ACC-PRD-005
  - CAP-ACC-PRD-007
  published_to_submissions: 'not published: the local module has no publication or capture declaration; external
    registry verification remains outstanding (FND-ACC-PRD-049).'
- operation_id: reactivateProduct
  intent: Make an inactive or retired product active at its read version.
  access: console
  permission: accounting.products.update
  realises:
  - CAP-ACC-PRD-005
  - CAP-ACC-PRD-007
  published_to_submissions: 'not published: the local module has no publication or capture declaration; external
    registry verification remains outstanding (FND-ACC-PRD-049).'
- operation_id: getProductAccounting
  intent: Return the full setup and four financial collections for a product.
  access: console
  permission: accounting.product-accounting.read
  realises:
  - CAP-ACC-PRD-015
  - CAP-ACC-PRD-016
  published_to_submissions: 'not published: the local module has no publication or capture declaration; external
    registry verification remains outstanding (FND-ACC-PRD-049).'
- operation_id: replaceProductAccounting
  intent: Create an absent setup or replace an existing setup at its version while validating under the product
    lock.
  access: console
  permission: accounting.product-accounting.update
  realises:
  - CAP-ACC-PRD-015
  - CAP-ACC-PRD-016
  published_to_submissions: 'not published: the local module has no publication or capture declaration; external
    registry verification remains outstanding (FND-ACC-PRD-049).'
- operation_id: deleteProductAccounting
  intent: Delete the setup and its children while leaving the product for documented default accounting treatment.
  access: console
  permission: accounting.product-accounting.delete
  realises:
  - CAP-ACC-PRD-015
  published_to_submissions: 'not published: the local module has no publication or capture declaration; external
    registry verification remains outstanding (FND-ACC-PRD-049).'
- operation_id: listProductsWithoutAccounting
  intent: Find products lacking setups with ordinary list filters, defaulting to active status.
  access: console
  permission: accounting.product-accounting.read
  realises:
  - CAP-ACC-PRD-017
  published_to_submissions: 'not published: the local module has no publication or capture declaration; external
    registry verification remains outstanding (FND-ACC-PRD-049).'
- operation_id: replaceProductAccountings
  intent: Save at most one hundred setups under one commit or rollback boundary.
  access: console
  permission: accounting.product-accounting.update
  realises:
  - CAP-ACC-PRD-017
  - CAP-ACC-PRD-015
  - CAP-ACC-PRD-016
  published_to_submissions: 'not published: the local module has no publication or capture declaration; external
    registry verification remains outstanding (FND-ACC-PRD-049).'
- operation_id: listProductTypeTaxClasses
  intent: List stored workspace tax-default assignments by product kind.
  access: console
  permission: accounting.tax-classes.read
  realises:
  - CAP-ACC-PRD-018
  published_to_submissions: 'not published: the local module has no publication or capture declaration; external
    registry verification remains outstanding (FND-ACC-PRD-049).'
- operation_id: getProductTypeTaxClass
  intent: Read one product kind's workspace tax default.
  access: console
  permission: accounting.tax-classes.read
  realises:
  - CAP-ACC-PRD-018
  published_to_submissions: 'not published: the local module has no publication or capture declaration; external
    registry verification remains outstanding (FND-ACC-PRD-049).'
- operation_id: replaceProductTypeTaxClass
  intent: Create a default without a version or replace it using the current default version.
  access: console
  permission: accounting.tax-classes.update
  realises:
  - CAP-ACC-PRD-018
  published_to_submissions: 'not published: the local module has no publication or capture declaration; external
    registry verification remains outstanding (FND-ACC-PRD-049).'
- operation_id: deleteProductTypeTaxClass
  intent: Delete the kind default so products with no setup class resolve no class.
  access: console
  permission: accounting.tax-classes.delete
  realises:
  - CAP-ACC-PRD-018
  published_to_submissions: 'not published: the local module has no publication or capture declaration; external
    registry verification remains outstanding (FND-ACC-PRD-049).'
- operation_id: accounting.save_product
  intent: Save a domain-owned common product inside its caller's transaction using the SQL validation and omission
    contract.
  access: internal
  permission: EXECUTE held by the capability role rhythm_accounting_product_writer, granted to each macroservice
    application role; owner rule from the session role
  realises:
  - CAP-ACC-PRD-007
  - CAP-ACC-PRD-002
  - CAP-ACC-PRD-004
  published_to_submissions: 'not published: the local module has no publication or capture declaration; external
    registry verification remains outstanding (FND-ACC-PRD-049).'
- operation_id: accounting.retire_product
  intent: Retire the caller application's product at the read version inside its transaction.
  access: internal
  permission: EXECUTE held by the capability role rhythm_accounting_product_writer; owner rule from the session
    role
  realises:
  - CAP-ACC-PRD-007
  - CAP-ACC-PRD-005
  published_to_submissions: 'not published: the local module has no publication or capture declaration; external
    registry verification remains outstanding (FND-ACC-PRD-049).'
- operation_id: accounting.resolve_product_tax_class
  intent: Resolve setup class, then kind default, then no class under the caller's workspace policy.
  access: internal
  permission: SQL function under the caller's own workspace policy (security invoker)
  realises:
  - CAP-ACC-PRD-018
  - CAP-ACC-PRD-003
  published_to_submissions: 'not published: the local module has no publication or capture declaration; external
    registry verification remains outstanding (FND-ACC-PRD-049).'
events: []
jobs:
- name: accounting.products export dataset
  when: Workspace lifecycle requests the product dataset; Products has no local export schedule.
  does: Declare current product records with ten embedded lists, kind defaults and a books dependency for generic
    export delivery.
  realises:
  - CAP-ACC-PRD-019
- name: products purge steps
  when: Workspace lifecycle calls Accounting maintenance purge participation.
  does: Maintenance owns product and kind-default deletion order; the module provides no separate purge worker.
  realises: []
integrations:
- system: Platform communications (platform_communications_request)
  direction: outbound
  contract: Call Platform over IAM to save or clear an owned product-confirmation template and translate content
    validation to product field errors.
- system: Platform communication templates table
  direction: inbound
  contract: Read published owned content directly and check new shared references against workspace, purpose,
    activity and ownership.
- system: Platform metadata
  direction: outbound
  contract: Publish read-only standard product metadata without custom-field capability or a query dataset.
- system: Commerce pricing audiences
  direction: inbound
  contract: Read Commerce audience admission; HTTP checks always allow standard and member independently of
    registry existence.
- system: Commerce pricing engine
  direction: outbound
  contract: Expose price and handover rows as the documented read contract; Commerce realization remains unverified.
- system: CRM task types and task queues
  direction: inbound
  contract: Read CRM task types and queues used by task-generation settings.
- system: Domain applications (Membership, Commerce, Events)
  direction: inbound
  contract: Call the shared product save and retire functions inside the application's own transaction.
consistency:
- rule: Product rows and their local price, component and selling collections commit together.
  kind: transactional
  compensation: Rollback retains the committed local configuration.
- rule: An independent Platform template request finishes before Accounting's local commit, which cannot reverse
    remote persistence.
  kind: eventual
  compensation: No durable reconciliation or compensation covers lost answers or later response-read and commit
    failures.
- rule: Owned-template cleanup follows a committed product deletion.
  kind: eventual
  compensation: Failure is logged without restoring the product or scheduling another attempt.
- rule: The setup row and four child lists share a transaction under the product lock.
  kind: transactional
  compensation: Rollback retains the committed setup.
- rule: Bulk setups acquire product locks in key order and share one transaction.
  kind: transactional
  compensation: Rollback retains every setup's preceding values.
- rule: The recorded domain design places common product and extension writes inside the caller's transaction.
  kind: transactional
  compensation: The caller must roll back; a real domain execution of this failure remains unproved.
- rule: Console product, setup and host stages commit as separate requests.
  kind: eventual
  compensation: Successful baselines are retained and the failed stage is shown, without reversing earlier
    commits.
- rule: The documented posting boundary freezes the resolved current accounts.
  kind: eventual
  compensation: Posting owns that preservation; setup persistence supplies no posted-entry reversal.
evidence:
- 'services-accounting at f47cb263: modules/products/aws/api/products.routes.ts (productsRoutes, productsModuleRoutes),
  products.schemas.ts, products-api-mapper.ts; aws/products.module.ts; services/persistence/*.ts; services/confirmation-emails/confirmation-email-templates.ts;
  services/ports/communications.ts; export/products.dataset.ts; metadata/products.object.ts; aws/accounting.service.ts
  (ProductsPermissions, ProductAccountingPermissions, TaxClassesPermissions); docs/accounting/products.md (The
  domain write path, Permissions, Tax class); docs/migrations/accounting-modernization/products-shared/README.md
  (D-2).'
- 'services-accounting at f47cb263: node_modules/@rhythmsoftware/macroservice-http/dist/health-route.js (get<Module>Health
  operation id).'
- 'react-console at baf6dae3: lib/accounting/configuration/client.ts (createAccountingApi products, productTypes,
  productTypeTaxClasses).'
controls: [TC-IAM-001, TC-IAM-002, TC-IAM-004, TC-IAM-005, 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-TEN-004, TC-SEC-001, TC-SEC-004, TC-CRY-001, TC-CRY-002, TC-CRY-003, TC-CRY-004, TC-DAT-001, TC-DAT-002, TC-DAT-004, TC-DAT-005, TC-LOG-001, TC-LOG-002, TC-LOG-003, TC-LOG-004, TC-LOG-005, TC-CHG-001, TC-CHG-002, TC-CHG-003, TC-CHG-004, TC-CHG-006, TC-AVL-001, TC-AVL-002, TC-AVL-003, TC-AVL-004, TC-AVL-005, TC-MON-001, TC-MON-002, TC-MON-003, TC-MON-004, TC-PI-001, TC-PI-002, TC-PI-003, TC-PI-004, TC-PI-005, TC-PRV-001, TC-PRV-002]
---

# Products Service Module

## What This Service Is For

Products keeps the common catalogue used by finance and domain applications. It maintains product identities, prices, selling instructions and optional accounting setups, exposing console operations and database functions for supported domain writes.

## Boundary

The service checks stored configuration but does not price purchases, execute selling instructions or post entries. Reference records remain with their owners. Platform handles confirmation content independently. Existing product tax assignments remain here until the approved Commerce transfer is implemented.

## Operations in Words

Catalogue requests read kinds and products, create and replace records, retire or reactivate products, and delete records whose protection and dependencies permit removal. Product writes include complete price and selling collections.

Financial requests read, save and delete setups under separate permissions. Missing-setup queries and bulk saving support grouped administration. Tax-class permissions govern kind defaults, and a database helper resolves the effective class.

Domain save and retire functions operate inside their caller's transaction. Their SQL checks differ from HTTP validation in several documented variants; this contract does not claim full parity.

## Events and Jobs

The module deploys one API function and declares no local queue, schedule, background worker or change event. Maintenance hosts workspace export and purge participation. Products supplies an export declaration, but delivery and recovery remain outside the verified behavior. No model call is present, so all inference lists are empty.

## Consistency Guarantees

Local product, setup and bulk writes have transaction rollback boundaries. Product locks stabilize same-product writes, with independent product and setup versions. Remote template operations and successive console requests have separate commits and no compensation. No local Submissions publication is declared; the external registry remains unverified.
