less than a minute read • Updated 9 minutes ago
Track inventory with quantity_max and the transaction webhook
How to use the quantity_max product attribute together with Foxy's transaction webhook to automatically track inventory levels as orders come in.
Combine the quantity_max product attribute with the transaction webhook to automatically keep your inventory levels in sync as orders come in.
How to set it up
Notes
This approach works well for stores with low transaction volume, where the chances of two customers checking out for the same item at the same time are low, or where occasional overselling isn’t a major concern.
quantity_maxonly limits how many of a product a single customer can add to their own cart — it doesn’t reserve stock for that customer, so two customers could still complete overlapping orders for the same limited stock. If you need to prevent that, see Confirm inventory before checkout with the pre-payment webhook or Set up advanced inventory tracking with inventory locks.See the transaction webhook payload reference for the full list of data included in each transaction summary.