Solved

MISSING InventoryItemInput in ProductVariantSetInput

adearriba
Shopify Partner
13 1 10

Hi,

 

I want to create my variants using ProductSet new API but there is no way of marking the variants as "tracked". 

 

ProductVariantInput has an inventoryItem object where you can mark the tracked option as true.

 

ProductVariantSetInput doesn't have this option. It only allows for inventoryPolicy, but not for inventoryItem tracked.

 

It would be super helpful to have the ability to mark a variant a tracked by using the ProductSet API. If not, then you will always need multiple GraphQL mutations to achieve this and the new Product model goal won't be achieve.

Best,
Alejandro.
Accepted Solution (1)

AsafGitai
Shopify Staff
12 4 13

This is an accepted solution.

Hi @adearriba 

Our thinking is that If you want to create a product with tracking quantity, then you probably also want to be able to set quantities.
This means you will need to do inventory updates anyways. For those we currently support via

https://shopify.dev/docs/api/admin-graphql/unstable/mutations/inventoryItemUpdate
or
https://shopify.dev/docs/api/admin-graphql/unstable/mutations/productVariantsBulkUpdate

View solution in original post

Replies 2 (2)

AsafGitai
Shopify Staff
12 4 13

This is an accepted solution.

Hi @adearriba 

Our thinking is that If you want to create a product with tracking quantity, then you probably also want to be able to set quantities.
This means you will need to do inventory updates anyways. For those we currently support via

https://shopify.dev/docs/api/admin-graphql/unstable/mutations/inventoryItemUpdate
or
https://shopify.dev/docs/api/admin-graphql/unstable/mutations/productVariantsBulkUpdate

adearriba
Shopify Partner
13 1 10

Thanks, @AsafGitai.

My thinking is: I would like to have an API that lets me configure my product and all it's variants in one shot. I will then have a separate process to update inventory quantities per location as that is a many to many relationship which requires more resources.

 

The inventory tracking flag is at the inventoryItem level as others properties which are available like harmonizedSystemCode or weight and weight unit.  The inventory quantity is at inventoryLevel level. 

 

Being consistent with the property level, I think it would be best to have the tracking flag added too. Not sure if this can be suggested to the team for a future release.

Best,
Alejandro.