We're a Same-Day and On-Demand fulfillment and delivery provider and we built a Shopify app awhile back to allow for shops to instantly integrate with us. Part of the installation process creates a FulfillmentService and we provide the shop our inventory levels using the FulfillmentService API. We've had issues in the past when integrating with a shop that already has an existing Fulfillment Service from another provider and wishes to use both.
The issue is that a ProductVariant can only have one value for `inventory_management` and `fulfillment_service` and it's unclear to me what the behavior is when multiple Fulfillment Services have been registered for a shop.
If a shop has multiple FulfillmentServices registered against it and they all manage their own inventory, is there a way to leverage the new Shopify Location API so that a product variant's inventory levels are combined and managed properly from all its registered fulfillment services?
I mention the Location API since each fulfillment service is considered as a location.
A shop can definitely contain multiple custom fulfillmentServices, but as you mentioned a variant can only be assigned to a single fulfillment service at once, so it's not currently possible to combine inventory for a variant located at a fulfillment service.
This behaviour is available through the Locations API for products with inventory managed by Shopify. This API allows you to create multiple locations with their own distinct inventory level, and variants can be located at all or just some locations. Inventory can be kept in sync through the Inventory API, and when an order is created Shopify will suggest a fulfillment location based on available inventory. You also have the flexibility to create fulfillments from any location that the variant is stocked.
JB | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Click Accept as Solution
Hi @_JB , many thanks for taking the time to reply.
I want to make sure that I 100% understand what you've said. Can you let me know if the following statement is true?
If a product variant has its inventory managed by a FulfillmentService, one cannot take advantage of multiple locations via the Locations API because multiple locations is something that must be used in tandem with having Shopify manage a product variant's inventory.
A follow up question:
We're a same-day fulfillment and delivery company so inventory is very localized and usually cannot be used to serve another region. For example, let's say we have inventory in San Francisco and Los Angeles and that "Product A" is out of stock in San Francisco but in stock in Los Angeles. I'd like to a customer in the San Francisco region to see that "Product A" is unavailable for purchase. There doesn't seem to be way to utilize product availability in liquid or otherwise to render a product as unavailable based on its availability with respect to a location. Is there an elegant way to accomplish this?
The documentation on liquid objects for products makes availability out to be an all or nothing toggle.
Many thanks again