Inventory Not Deducting Once Order Is Received in Shopify via API

DisplayTech
New Member
1 0 1

We are sending orders to Shopify via API but the inventory is not getting deducted on Shopify.

 

Please check and fix this issue.

Replies 2 (2)
julie-ownit
New Member
2 0 0

We're also experiencing this issue. Did you ever get an answer for this? I'm creating an order using ShopifySharp and the inventory in my UI is not deducting from the quantity of that product/variant combination (even when I mark the order as fulfilled in the UI I see that there's no inventory deduction).
Does the shop need to be not in test mode or does the Shopify app creating the orders need to be approved before it removes inventory? 

julie-ownit
New Member
2 0 0

Figured it out for anyone else looking into this - had to use the OrderCreateOptions when calling orderservice.CreateAsync and set the inventory behavior there since it was not available directly on the order object itself in Shopify Sharp.

                OrderCreateOptions orderCreateOptions = new OrderCreateOptions();
                orderCreateOptions.InventoryBehavior = "DecrementObeyingPolicy";
                orderService.CreateAsync(order, orderCreateOptions);