offer ↔ inventory_item links that define what stock an offer consumes. Validates the payload (no duplicates, no ID in more than one bucket, created items must exist, deleted items must already be linked), then batches the link changes — each link carries a required_quantity (default 1). Emits offer.updated. Triggered by POST /vendor/offers/:id/inventory-items/batch.
Usage
Input
The offer whose inventory links are managed; fails if not found.
Links to create; the inventory items must exist and not appear in
update/delete.Existing links to update.
Inventory item IDs to unlink; each must currently be linked or the workflow throws a 404.
Custom data passed through to the workflow hooks.
Result
The created offer ↔ inventory-item links.
The updated links.
Inventory item IDs that were unlinked.
Hooks
validate— runs first with{ input }.offerInventoryItemsBatched— runs after the batch with{ offer_id, result, additional_data }.