03 — Integration

Supplier is a member of the Work & Supply network (message protocol v1). Its contract is schema/supplier.integration.dsl (authoring spec docs/implementation/integration_authoring_spec.md), generated with python -m codegen.cli integration supplier --network work_supply; the handlers are in integration/handlers.py. The whole network is in networks/work_supply/NETWORK_MAP.md.

What it owns

Network entity Model Business reference
supplier.supplier Supplier supplier_number (SUP-{sequence:04})
supplier.capability SupplierCapability —
supplier.approval SupplierApproval —
supplier.item SupplierItem —
supplier.issue SupplierIssue issue_number (SI-{sequence:04})

Messages (all implemented)

Kind Message What
publishes supplier.supplier_status_changed a supplier's status changes (e.g. suspended)
publishes supplier.approval_changed / capability_changed an approval's or capability's status changes
publishes supplier.item_changed a supplier item's status changes
publishes supplier.issue_opened a new supplier issue, with the order / receipt it concerns
consumes purchasing.order_placed counted in the month's performance
consumes purchasing.delivery_delayed missed: one late delivery and a delivery issue per order; at risk: noted
consumes inventory.receipt_rejected counted, and a quality issue per receipt
answers supplier.search_suppliers text search on number and names — the picker on other apps' forms
answers supplier.profile a supplier with its current approvals and capabilities
answers supplier.item_sources who can supply a catalogue item (approved and preferred first)
answers supplier.approval_status is this supplier approved for a category / capability / site?
answers supplier.performance_summary latest month, on-time rate, open issues
accepts supplier.register_supplier create a prospective supplier (rejects a duplicate name or number)
accepts supplier.register_supplier_item create or update a supplier's offer for a catalogue item

Nothing in the network consumes supplier events yet; Purchasing will use approval and supplier-status changes to warn on orders in a later stage.

Who refers to it

purchasing (requirements' preferred and selected supplier, orders, shipments) and inventory (goods receipts) hold supplier_cid + supplier_ref: the number links ↗ to the supplier here, and their forms pick suppliers with supplier.search_suppliers (lookup: on their reference supplier.supplier). Purchasing's delivery_delayed and Inventory's receipt_rejected / receipt_quarantined carry the supplier so it can be matched here.

Differences from the pack

supplier.issue is a network entity of its own (the pack published issue_opened against the supplier); item_changed fires on status changes (the pack's created_or_changed is not a spec form); search_suppliers is new. See the contract's header for the full list.