Updated Deadline: Aug 1st -- [Deprecation] Important changes to ProductVariant, Refund and Fulfillment APIs

Shopify Expert
60 0 24

Hey Paul,

Can you explain what you're seeing in more detail?

0 Likes
Shopify Partner
14 0 3
1 Like
Shopify Partner
76 1 11

Hey Ryan,

After 1st July, for a shop that does not enable multi-location inventory, will each variant of the shop linked to an inventory_item? Or inventory_item only present if a shop has multi-location inventory enabled?

EDIT:
It looks like all variants will have an inventory_item :) irregardless multi-location inventory is enabled or not.

 

SimplyCost - Add costs and track profit (https://apps.shopify.com/simplycost)
0 Likes
Shopify Staff
Shopify Staff
469 36 92

Thanks a lot for all the help and insights you gave us so far. While performing our final acceptance tests, we found out that the `location_id` attribute of the order object is always set to `null` and instead, it is the fulfillement object which now holds the location from where the order is fulfilled. 

Will the `location_id` attribute of the order object be deprecated? 

Location_id on the order only exists if the order was made through a Shopify POS location.  These multi-location changes do not affect the Order API (this location_id was already there).

I just noticed that SKU will also need special handling, incurring even more calls. The Product Variant API guide doesn't have SKU marked as deprecated fwiw.

SKU will still be readable from the variant, but not writeable.  I'll look into a doc update for clarity.

After 1st July, for a shop that does not enable multi-location inventory, will each variant of the shop linked to an inventory_item? Or inventory_item only present if a shop has multi-location inventory enabled?

EDIT:
It looks like all variants will have an inventory_item :) irregardless multi-location inventory is enabled or not.

Inventory Items and Inventory Levels have been released and implemented since February.  All inventory logic has been using them since then, and yes they are useable without multi-location enabled.

Developer Experience @ Shopify
0 Likes
New Member
3 0 0

Will the Liquid template variable variant.inventory_quantity be affected by this change?

0 Likes
Shopify Staff
Shopify Staff
469 36 92

Will the Liquid template variable variant.inventory_quantity be affected by this change?

There are no liquid updates planned for the initial release of multi-location.

Developer Experience @ Shopify
0 Likes
Excursionist
25 0 5

Hi,

Will I be able to set the availability for multiple inventory_levels at once? The documentation seems to show that we'll only be able to set the availability of one inventory_level at one time.

If so, this will dramatically increase the amount of API calls we have to make. Previously, we were adjusting inventory at the Product-level (which only included the VariantID and InventoryQty) to help reduce the number of API calls we have to make.

Thanks

0 Likes
Shopify Staff
Shopify Staff
469 36 92

With the REST API, the only way to update multiple inventory levels in one call is by registering as a FulfillmentService and registering to be polled for inventory levels.

Using the new GraphQL Admin API however, you can easily update multiple inventory level in a single call (GraphQL doesn't use the concept of calls for rate limiting).  Example:

mutation {
  item1: inventoryAdjustQuantity (input: {inventoryLevelId: "gid://shopify/InventoryLevel/37685843?inventory_item_id=40011829139", availableDelta:3 }) {
    inventoryLevel {
      available
    }
    userErrors {
      field
      message
    }
  }
  
  item2: inventoryAdjustQuantity (input: {inventoryLevelId: "gid://shopify/InventoryLevel/37685843?inventory_item_id=40011857683", availableDelta:3 }) {
    inventoryLevel {
      available
    }
    userErrors {
      field
      message
    }
  }
  
  item3: inventoryAdjustQuantity (input: {inventoryLevelId: "gid://shopify/InventoryLevel/37685843?inventory_item_id=40011857875", availableDelta:3 }) {
    inventoryLevel {
      available
    }
    userErrors {
      field
      message
    }
  }
}

 

Developer Experience @ Shopify
1 Like
New Member
3 0 0

Hi,

1) What impact will it have on products for which inventory is not tracking?

2) How to fulfill orders with such products? We didn’t set up a FulfillmentService. It looks the only way, in this case, is fetch available locations and use one of them to set a location_id for the fulfillment?
Suppose we will set up a FulfillmentService soon, but if we are not on the schedule, need a way to create fulfillments.
 

0 Likes
Shopify Staff
Shopify Staff
469 36 92

1) What impact will it have on products for which inventory is not tracking?

The inventory item will still have a location_id but will have available = null

example from my store:

{
  "inventory_levels": [
     {
        "inventory_item_id": 871696400403,
        "location_id": 13968900152,
        "available": null,
        "updated_at": "2018-05-22T14:50:57-04:00"
     }
  ]
}

 

2) How to fulfill orders with such products? We didn’t set up a FulfillmentService. It looks the only way, in this case, is fetch available locations and use one of them to set a location_id for the fulfillment?

You can still create a fufillment without registering as a fulfillment service, and pass the required location_id parameter.

Developer Experience @ Shopify
0 Likes