Discuss all the new features introduced with the new product model in GraphQL.
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?
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?
Can anybody help me, please?
@kyo00710 did you find a solution for this? I'm going through the exact same problem
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