A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
How to differentiate which inventory level to update if an item is present on multiple locations...
as Shopify support multiple locations for the store, we are a warehouse how do we associate ourselves with one of those locations?
Solved! Go to the solution
This is an accepted solution.
Well each store can set up multiple locations each location is technically a warehouse. So your warehouse should be associated to a specific location, that location id is what you would use when updating the inventory level of a specific product_variant.
If you have a private app then you can work with the merchant to make sure that they provide you with the location id that they have set up for your warehouse. If you have a public app then the merchant should choose which location they have created for your warehouse during the onboarding process.
If you have a public app that is acting as a 3rd party fulfillment provider then your app should automatically create a location for itself and then you would know the location id as it would be associated to your app.
Cheers,
Gary
This is an accepted solution.
Well each store can set up multiple locations each location is technically a warehouse. So your warehouse should be associated to a specific location, that location id is what you would use when updating the inventory level of a specific product_variant.
If you have a private app then you can work with the merchant to make sure that they provide you with the location id that they have set up for your warehouse. If you have a public app then the merchant should choose which location they have created for your warehouse during the onboarding process.
If you have a public app that is acting as a 3rd party fulfillment provider then your app should automatically create a location for itself and then you would know the location id as it would be associated to your app.
Cheers,
Gary
I have an public app and want to create a new location for the merchant, is it possible through API
That depends. Your public app will need to be set up as a 3rd party fulfillment provider.
See: https://shopify.dev/docs/api/admin-rest/2023-01/resources/fulfillmentservice
And this guide: https://shopify.dev/docs/apps/fulfillment/fulfillment-service-apps
Both of these resources should provide you with the resources you need to decide whether you want to remain in the order management side of things using the merchant managed fulfillments, or move to a fulfillment service app. There are pretty cool benefits to the 3rd party fulfillment apps as I see it and if I were to build another fulfillment app I would strive to move in this direction instead of remaining in the order management side of things.
Cheers,
Gary