> ## 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.

# Contracts

# Domain Event Contracts

`@betterdata/scm-contracts` and `@betterdata/dcm-contracts` define typed event envelopes and contract-level request/response models used across supply and demand domains.

## What Contracts Are

Contracts are the stable message layer between modules. Producers and consumers can type-check against these packages without coupling to runtime internals.

## SCM Events (`@betterdata/scm-contracts`)

### Procurement

* `scm.procurement.po_created.v1`
* `scm.procurement.po_confirmed.v1`
* `scm.procurement.po_amended.v1`
* `scm.procurement.po_cancelled.v1`
* `scm.procurement.invoice_match_triggered.v1`

### Execution

* `scm.execution.receipt_scheduled.v1`
* `scm.execution.goods_received.v1`
* `scm.execution.shipment_picked.v1`
* `scm.execution.shipment_packed.v1`
* `scm.execution.shipment_shipped.v1`
* `scm.execution.pick_completed.v1`
* `scm.execution.shipment_dispatched.v1`

### Inventory

* `scm.inventory.stock_updated.v1`
* `scm.inventory.stock_reserved.v1`
* `scm.inventory.stock_reservation_failed.v1`
* `scm.inventory.stock_returned.v1`

## DCM Events (`@betterdata/dcm-contracts`)

### Orders

* `dcm.orders.order_line_allocation_requested.v1`
* `dcm.orders.order_confirmed.v1`
* `dcm.orders.order_cancelled.v1`
* `dcm.orders.order_line_shipped.v1`
* `dcm.orders.order_line_allocation_failed.v1`

### Returns

* `dcm.returns.rma_requested.v1`
* `dcm.returns.rma_approved.v1`
* `dcm.returns.rma_rejected.v1`
* `dcm.returns.return_received.v1`
* `dcm.returns.return_restocked.v1`
* `dcm.returns.return_credited.v1`

### Demand

* `dcm.demand.forecast_generated.v1`
* `dcm.demand.signal_captured.v1`
* `dcm.demand.threshold_breach_detected.v1`
* `dcm.demand.replenishment_triggered.v1`

## Regulatory Alignment Notes

Both contracts packages include compliance-oriented audit request/response interfaces and event-level regulatory alignment guidance.

* [SCM regulatory alignment](https://github.com/betterdataco/bd-forge-main/blob/main/packages/oss/scm-contracts/REGULATORY-ALIGNMENT.md)
* [DCM regulatory alignment](https://github.com/betterdataco/bd-forge-main/blob/main/packages/oss/dcm-contracts/REGULATORY-ALIGNMENT.md)

## Usage Example

```typescript theme={null}
import type { ScmProcurementPoConfirmed } from "@betterdata/scm-contracts";

export function handlePoConfirmed(event: ScmProcurementPoConfirmed) {
  return `${event.payload.purchaseOrderId}:${event.eventType}`;
}
```
