Define what quantity means
Separate physical stock, reserved stock and available-for-sale quantity. Agree on inventory and policies for canceled orders. Mapping should work at the desired product or variant level by a stable SKU or ID. Two different options with the same SKU create ambiguity.
Continue with: Merchant Center: fix price and availability mismatches.
Prepare the initial state
The change webhook does not necessarily transfer all existing stock levels. For KeyCRM, you need to consider the initial download and subsequent events separately. Reconcile control items and available-stock formula. Do not deduct the reserve twice if the source is already returning a available-to-sell quantity.
Continue with: OpenCart catalog imports: SKUs, options and validation.
Add periodic reconciliation
In addition to events, a way to find missed or incorrectly applied changes is needed. Test zero stock, returns, the last unit and changes to a single variant. For delayed events, define the application order so that an older message does not overwrite a newer state. Deviations must be visible to the person in charge.
Can you guarantee an instant stock synchronization?
There are delays and possible failures between systems. An agreed tolerable delay, redundancy, and discrepancy detection mechanism are required.