When adjusting inventory with inventoryAdjustQuantities, if the reason is set to “shrinkage” the inventory is adjusted and appears in the inventory history, but when inventory adjustments are queried in shopifyQL, any inventory adjustment with the reason “shrinkage” is not returned.
Steps to reproduce
- Use inventoryAdjustQuantities - GraphQL Admin to change a quantity of an item, ensure you set the reason as “shrinkage”
- Check the quantity has changed and appears in the inventory history in the admin
- Query shopifyQL for inventory adjustments
1 Like
Hey @AdvancedApps, I tested this and the shrinkage reason is working correctly in the latest API version 2026-01. Both the mutation and the ShopifyQL query are returning shrinkage adjustments as expected, although I see the same as you when I test 2025-10. Was this working previously for you on 2025-10? Can you test with API version 2026-01 and let me know if you see the same results?
Here’s what I used to test:
Mutation:
mutation {
inventoryAdjustQuantities(input: {
name: "available",
reason: "shrinkage",
changes: [{
delta: -10,
inventoryItemId: "gid://shopify/InventoryItem/1234567890",
locationId: "gid://shopify/Location/9087654321"
}]
}) {
inventoryAdjustmentGroup {
id
reason
changes {
name
delta
}
}
userErrors {
field
message
}
}
}
ShopifyQL Query:
query {
shopifyqlQuery(query: """
FROM inventory_adjustment_history
SHOW inventory_adjustment_change
GROUP BY day, product_variant_sku, inventory_app_name, staff_member_name,
inventory_change_reason, inventory_state WITH TOTALS
TIMESERIES day
HAVING inventory_adjustment_change != 0
SINCE startOfDay(-30d) UNTIL today
ORDER BY day ASC
LIMIT 1000
""") {
parseErrors
tableData {
columns {
displayName
name
dataType
}
rows
}
}
}
The shrinkage adjustment appeared correctly in the results with "inventory_change_reason": "shrinkage".
1 Like