GraphQL API Error on Reverse fulfillment and dispose

As per the Shopify document, we tried to create a reverse fulfillment order with disposition option as RESTOCKED and got an error from Shopify as follows:-

{
  'errors': [
    {
      'code': 'INVALID',
      'field': [
        'dispositionInputs',
        '0',
        'dispositionType'
      ],
      'message': 'RESTOCKED is an invalid disposition type for a custom line item.'
    }
  ],
  'reverseFulfillmentOrderLineItems': {
    
  },
  'cost_and_rate_limit': {
    'maximumAvailable': 2000,
    'currentlyAvailable': 1990,
    'restoreRate': 100,
    'code': ''
  }
}

We need some clarity on RESTOCKED is an invalid disposition type for a custom line item.

We tested this GraphQL on our test store and followed this document

GQL Mutation Query we used as follows:-

mutation reverseFulfillmentOrderDispose($dispositionInputs: [ReverseFulfillmentOrderDisposeInput!]!) {
  reverseFulfillmentOrderDispose(dispositionInputs: $dispositionInputs) {
    reverseFulfillmentOrderLineItems {
      id
      dispositions{
        id
        location{
          id
          name
        }
        type
        quantity
      }
      fulfillmentLineItem{
        lineItem{
          sku
        }
      }
      totalQuantity
    }
    userErrors {
      code
      field
      message
    }
  }
}

Variables:

{
  "dispositionInputs": [
    {
      "dispositionType": "RESTOCKED",
      "locationId": "gid://shopify/Location/75634802903",
      "quantity": 1,
      "reverseFulfillmentOrderLineItemId": "gid://shopify/ReverseFulfillmentOrderLineItem/12267454679"
    },
    {
      "dispositionType": "RESTOCKED",
      "locationId": "gid://shopify/Location/75634802903",
      "quantity": 1,
      "reverseFulfillmentOrderLineItemId": "gid://shopify/ReverseFulfillmentOrderLineItem/12267487447"
    }
  ]
}

Need some urgent help on this.

Thanks!!

1 Like

Hey @Abhisek_Roy

The error RESTOCKED is an invalid disposition type for a custom line item occurs because custom line items can’t be restocked. Unlike regular products, custom products don’t have inventory items associated with them, so there’s no existing inventory to add them back to when using the RESTOCKED disposition type.

For custom line items, try use the PROCESSING_REQUIRED disposition type instead, which is designed for items requiring manual handling rather than automatic inventory updates.

Let me know if that works and helps clear this up!

1 Like

@KyleG-Shopify, after considering the disposition option as PROCESSING_REQUIRED,
I am not getting any error from Shopify

1 Like