Oss
Demand Chain Management (DCM) modules model demand signals, orders, returns, and channels, using the same runtime and loop participation patterns as SCM.
1import { configureDcmOrdersRuntime } from "@betterdata/dcm-orders";2import type { ChannelReader, OutboxWriter } from "@betterdata/dcm-contracts";3 4configureDcmOrdersRuntime({5 outbox,6 readChannelMessages,7});1import { configureDcmReturnsRuntime } from "@betterdata/dcm-returns";2 3configureDcmReturnsRuntime({ outbox, readChannelMessages });@betterdata/dcm-demand focuses on forecast, velocity, threshold, and replenishment services plus loop-participation — wire adapters from your bootstrap (see package README); there is no configureDcmDemandRuntime export today.
Import the concrete service factories and state-machine helpers named in each package’s src/index.ts and README (names vary by module).
1import { orderLoopParticipant } from "@betterdata/dcm-orders";2import { EventNames, LoopIds } from "@betterdata/loop-definitions";3"cmt">// orderLoopParticipant.moduleId === "dcm.orders"4"cmt">// Handlers reference EventNames.* and LoopIds.* — see `loop-manifest.ts`| Package | What it does |
| ------- | ------------- |
| @betterdata/dcm-contracts | Shared DCM types and event envelopes |
| @betterdata/dcm-demand | Demand signals, thresholds, replenishment triggers |
| @betterdata/dcm-orders | Order lifecycle, allocation, fulfillment routing seams |
| @betterdata/dcm-returns | RMA, receipt, restock, credit |
| @betterdata/dcm-channels | Channel configuration (v0.1 stub — check README before adopting) |
Pair DCM packages with @betterdata/dcm-contracts for typed events end-to-end.
