What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Troubles with fulfillment service location

Troubles with fulfillment service location

kyo00710
Shopify Partner
15 0 7

Hi, 

 

I stuck at update or adjust values for variants with 2024-04 version, with fulfillment service location.

 

 

I wanna  update the workflow updating the quantity of products, from my development app, using GraphQL in 2024-04 version API.

 

The mutation inventorySetQuantities , it will be used for version 2024-07, it's so far.

 

I turned off inventoryManagement, set it to false, and surely that its location is active.

Then I use the inventorySetOnHandQuantities mutation for updating quantity, I received the error

{
     "field": [
         "input",
         "setQuantities",
         "0",
         "locationId"
     ],
      "message": "The specified inventory item is not stocked at the location."
}

I used another mutation is inventoryBulkToggleActivation for activating inventory item in this location  ( the location associated with fulfillment service), and I got the NOT_FOUND location

 
 "userErrors": [
        {
          "field": [
            "inventoryItemUpdates",
            "0",
            "locationId"
          ],
          "message": "The quantity couldn't be updated because the location was not found.",
          "code": "LOCATION_NOT_FOUND"
        }

I tested with shop location which created manually, and it was successful.

 

I wonder that how can I update quantity of products from my app to Shopify, with fulfillment service location?

 

Can anybody show me how to do it?

Replies 4 (4)

kyo00710
Shopify Partner
15 0 7

I realized that the location id created with fulfillment service API.

 

If you create product and variant with this location. You can then use mutation  inventorySetOnHandQuantities  for updating quantity.

 

In case using the mutation productSet for creating product and variant. The created variants could not be handled quantities with the mutation  inventorySetOnHandQuantities, concerning the error product was not stocked on this location.

 

So, how can I update products which created from the productSet mutation?

kyo00710
Shopify Partner
15 0 7

Can anybody help me, please?

pribr
Shopify Partner
1 0 0

@kyo00710 did you find a solution for this? I'm going through the exact same problem

kyo00710
Shopify Partner
15 0 7

I find a way to resolve is: 

- use mutation productCreate

- then use productVariantBulkCreate mutation to create variant

- then you can update quantity for new variannts