Hi there. I’m having an issue whereby the SKU quantities associated with fulfillments in the Shopify UI do not always match the quantities being returned via the GraphQL API. This only happens on multi-fulfillment orders.
Example:
'fulfillments': [
{'createdAt': '2023-10-16T16:58:57Z', 'name': '#124122-F3', 'trackingInfo': [{'company': 'UPS', 'number': 'REDACTED-3'}], 'fulfillmentLineItems': {'edges': [{'node': {'lineItem': {'sku': 'Sample1', 'quantity': 4}}}, {'node': {'lineItem': {'sku': 'Sample2', 'quantity': 6}}}]}},
{'createdAt': '2023-10-16T16:58:06Z', 'name': '#124122-F2', 'trackingInfo': [{'company': 'UPS', 'number': 'REDACTED-2'}], 'fulfillmentLineItems': {'edges': [{'node': {'lineItem': {'sku': 'Sample3', 'quantity': 12}}}]}},
{'createdAt': '2023-10-16T16:56:59Z', 'name': '#124122-F1', 'trackingInfo': [{'company': 'UPS', 'number': 'REDACTED-1'}], 'fulfillmentLineItems': {'edges': [{'node': {'lineItem': {'sku': 'Sample3', 'quantity': 12}}}, {'node': {'lineItem': {'sku': 'Sample4', 'quantity': 3}}}]}}]
The total number of ‘Sample3’ skus purchased in the order was 12, however the fulfillments are returning 12 for each tracking number (total 24). In the Shopify UI, I see 4 of Sample3 shipped in the first fulfillment (F1) and 8 shipped under fulfillment F2.
In other words, the fulfillments are returning the total number of items for a SKU on every fulfillment that contains some of the items for that SKU. It should return only the items that were shipped under the tracking number in question.
^ Screenshot of order in UI. I’m expecting 25 items to be returned as shipped under the three fulfillments, but instead the API is returning 37 items split between the three fulfillments.
Any help is much appreciated. Thank you!