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

Solved
ShopITGears
New Member
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".

0 Likes
Jason
Shopify Expert
10416 165 2066

What is the GID you're using?

I jump on these forums to help and share some insights. Not looking to be hired, and not looking for work.

Don't hand out staff invites or give admin password to forum members unless absolutely needed. In most cases the help you need can be handled without that.


★ http://freakdesign.com.au ★
0 Likes
ShopITGears
New Member
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>

0 Likes
DavidETGB
New Member
1 1 0

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!

0 Likes