Solved

"Add order line item" throws "This value is not a product variant GID"

ShopITGears
Visitor
2 0 0

I am trying to specify to have some product variants be auto-added via Shopify Flow.

What I have done is:
- Start when: "order created"
- Check if: "tags is equal to add_extra_product"
- Do this: "Add order line item"

At the right panel, I am trying to specify "Product variant GID" with the existing product variant, but it always throws an error "This value is not a product variant GID".

Accepted Solution (1)
DavidETGB
Tourist
5 1 2

This is an accepted solution.

Try this format:

gid://shopify/ProductVariant/<ProductID>

You can also refer to this Developer Doc:
https://shopify.dev/api/examples/order-editing

I hope this helps!

View solution in original post

Replies 3 (3)

Jason
Shopify Expert
11196 226 2287

What is the GID you're using?

★ I jump on these forums in my free time to help and share some insights. Not looking to be hired, and not looking for work. http://freakdesign.com.au ★
ShopITGears
Visitor
2 0 0

I have tried both options: productID and variantID.

 

I have pasted these IDs from the below-formatted URLs.

https://<brand>.myshopify.com/admin/products/<productID>

https://<brand>.myshopify.com/admin/products/<productID>/variants/<variantID>

DavidETGB
Tourist
5 1 2

This is an accepted solution.

Try this format:

gid://shopify/ProductVariant/<ProductID>

You can also refer to this Developer Doc:
https://shopify.dev/api/examples/order-editing

I hope this helps!