> ## Documentation Index
> Fetch the complete documentation index at: https://betterdatainc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Loop definitions

# Loop definitions

`@loop-engine/definitions` is the **canonical source** for Commerce Chain **loop IDs**, **event names**, and the **`LoopParticipantManifest`** shape domain modules implement.

## LoopIds

```typescript theme={null}
import { LoopIds } from "@loop-engine/definitions";

LoopIds.SCM_PROCUREMENT; // "scm.procurement"
LoopIds.SCM_FULFILLMENT; // "scm.fulfillment"
LoopIds.SCM_QUALITY; // "scm.quality"
LoopIds.SCM_REPLENISHMENT; // "scm.replenishment"
LoopIds.SCM_INVENTORY; // "scm.inventory"
LoopIds.SCM_EXECUTION; // "scm.execution"

LoopIds.DCM_DEMAND_SIGNAL; // "dcm.demand-signal"
LoopIds.DCM_DEMAND; // "dcm.demand"
LoopIds.DCM_ORDER; // "dcm.order"
LoopIds.DCM_RETURNS; // "dcm.returns"
LoopIds.DCM_CHANNELS; // "dcm.channels"
```

## EventNames

Convention: `{family}.{module}.{snake_case_past_tense}.v{N}`

```typescript theme={null}
import { EventNames } from "@loop-engine/definitions";

EventNames.INVENTORY_STOCK_RESERVED; // "scm.inventory.stock_reserved.v1"
EventNames.INVENTORY_STOCK_RESERVATION_FAILED;
EventNames.INVENTORY_STOCK_RETURNED;

EventNames.PROCUREMENT_PO_CONFIRMED; // "scm.procurement.po_confirmed.v1"
EventNames.EXECUTION_GOODS_RECEIVED; // "scm.execution.goods_received.v1"

EventNames.DEMAND_REPLENISHMENT_TRIGGERED;
EventNames.DEMAND_THRESHOLD_BREACH_DETECTED;

EventNames.ORDERS_ORDER_CONFIRMED;
EventNames.ORDERS_ORDER_LINE_SHIPPED;

EventNames.RETURNS_RMA_APPROVED;
EventNames.RETURNS_RETURN_RECEIVED;
EventNames.RETURNS_RETURN_CREDITED;
```

## LoopParticipantManifest

```typescript theme={null}
import type { LoopParticipantManifest } from "@loop-engine/definitions";

// Every module exports a manifest:
// { moduleId, description?, handles: [{ event, loops, description? }] }
```

## Participant validation

`@loop-engine/actors` ships tests that fail CI when a participant references an unknown **loop** or **event** constant — keeping the graph consistent as you add modules.

## Serializable definitions

The package also publishes **data-first loop definitions** (states, transitions) for dashboards, compliance maps, and tooling. Browse:

* [registry.betterdata.co/loop-definitions](https://registry.betterdata.co/loop-definitions)

## Install

```bash theme={null}
npm install @loop-engine/definitions
```

→ [Loops](/platform/loops)\
→ [SCM packages](/oss/scm-packages) · [DCM packages](/oss/dcm-packages)
