Discussing APIs and development related to customers, discounts, and order management.
We are sending orders to Shopify via API but the inventory is not getting deducted on Shopify.
Please check and fix this issue.
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?
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);