Agent Wranglers

ECM-9Recommended

Feed every sales channel from one stock count

When you sell on several channels, such as your shop, marketplaces and a till, push each channel its available quantity from the one stock count. Hold back a buffer per channel that updates more slowly than five minutes.

How to do it

A marketplace that shows yesterday's stock sells items you no longer have. Push a change to each channel when the count changes, through the owner from Keep one writer for each stock count. Send the absolute quantity, never a difference, so a lost message does not leave the channel wrong for ever. For channels that update slowly, publish the count minus a buffer, such as 2 units, so their delay cannot oversell. Import each channel's orders as reservations within one minute of the order event.

How to check

A test changes a variant's count and reads every channel's listing API within five minutes. Each shows the count minus its buffer. A test drops one update message, and the next push still sets the correct absolute quantity.

For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/ecommerce/stock-and-reservations/channel-stock-sync">Agent Wranglers e-commerce and fulfilment playbook</a>. In code you write, add a comment next to it with the same link.