Skip to main content

SCM packages

Supply Chain Management (SCM) modules share a common runtime bootstrap pattern and export loop participant manifests for the Loop Engine graph.

Module interface (factory / runtime pattern)

1. Configure the runtime once

At application startup, call the package configure*Runtime with infrastructure dependencies (getDb, outbox, readChannelMessages).
Other SCM packages expose parallel entry points:
  • configureProcurementRuntime@betterdata/scm-procurement
  • configureExecutionRuntime@betterdata/scm-execution
Catalog-focused flows use adapter seams documented in each package README.

2. Call domain services

Loop participation

Every SCM module ships a *LoopParticipant manifest typed as LoopParticipantManifest from @loop-engine/definitions.
@loop-engine/actors includes validation tests so participants only reference known LoopIds and EventNames.

Package list

Event contracts are centralized in domain contracts.

Key exports (high level)

@betterdata/scm-inventoryStockService, reservation helpers, LotService, inventoryLoopParticipant, configureInventoryRuntime. @betterdata/scm-catalog — product resolution, marketplace search services, catalogLoopParticipant, adapter interfaces for ranking and trust. @betterdata/scm-procurement — procurement services, loop-participation / preload-contribution, configureProcurementRuntime. @betterdata/scm-execution — shipment and warehouse engines, configureExecutionRuntime, execution loop participation.