I recently came across an order line item with negative unfulfilledQuantity (-1).
Is this expected behaviour?
For reference: order was in partial refund, all line items had fulfillmentStatus: 'fulfilled', and had quantity fields as follows:
{ "currentQuantity": 1, "unfulfilledQuantity": 0, "refundableQuantity": 1, "quantity": 1, "nonFulfillableQuantity": 0 }
{ "currentQuantity": 1, "unfulfilledQuantity": 0, "refundableQuantity": 1, "quantity": 1, "nonFulfillableQuantity": 0 }
{ "currentQuantity": 1, "unfulfilledQuantity": 0, "refundableQuantity": 1, "quantity": 1, "nonFulfillableQuantity": 0 }
{ "currentQuantity": 1, "unfulfilledQuantity": 0, "refundableQuantity": 1, "quantity": 1, "nonFulfillableQuantity": 0 }
{ "currentQuantity": 1, "unfulfilledQuantity": 0, "refundableQuantity": 1, "quantity": 1, "nonFulfillableQuantity": 0 }
{ "currentQuantity": 1, "unfulfilledQuantity": 0, "refundableQuantity": 1, "quantity": 1, "nonFulfillableQuantity": 0 }
{ "currentQuantity": 0, "unfulfilledQuantity": -1, "refundableQuantity": 0, "quantity": 1, "nonFulfillableQuantity": 0 }
{ "currentQuantity": 1, "unfulfilledQuantity": 0, "refundableQuantity": 1, "quantity": 1, "nonFulfillableQuantity": 0 }
{ "currentQuantity": 1, "unfulfilledQuantity": 0, "refundableQuantity": 1, "quantity": 1, "nonFulfillableQuantity": 0 }
The docs read as though all of the line item quantity fields should be positive, or zero, but never negative.
If negative values are expected, is there any guidance available to help interpreting these cases?
| field | type | optionality | description |
|---|---|---|---|
| currentQuantity | Int! | non-null | The number of units ordered, excluding refunded and removed units. |
| nonFulfillableQuantity | Int! | non-null | The total number of units that can’t be fulfilled. For example, if items have been refunded, or the item is not something that can be fulfilled, like a tip. Please see the FulfillmentOrder object for more fulfillment details. |
| quantity | Int! | non-null | The number of units ordered, including refunded and removed units. |
| refundableQuantity | Int! | non-null | The number of units ordered, excluding refunded units and removed units. |
| unfulfilledQuantity | Int! | non-null | The number of units not yet fulfilled. |