orderEditSetQuantity issue with zero quantity

Solved

orderEditSetQuantity issue with zero quantity

Darren8
Shopify Partner
11 0 2

Hello,

Having challenges using the orderEditSetQuantity mutation.  Am receiving the error:


Mutation had errors: "Variable $lineItemId of type ID! was provided invalid value"

Have tried a number of permutations of different order states and with and without passing restock and location  variables but always seem to get this error.  Guessing doing something incorrectly in working with the calculatedorder object but not sure what that might be.

Following screenshots show the Flow I am using and the errors.  Help is greatly appreciated!

flow_1.pngflow_2.pngflow_error.png

Accepted Solution (1)

paul_n
Shopify Staff
1679 184 386

This is an accepted solution.

That error is about your lineItemId not the quantity. It looks like you have a space in the quotes before the GID. Use hyphens in liquid to remove whitespace like {%- var -%}

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.

View solution in original post

Replies 2 (2)

paul_n
Shopify Staff
1679 184 386

This is an accepted solution.

That error is about your lineItemId not the quantity. It looks like you have a space in the quotes before the GID. Use hyphens in liquid to remove whitespace like {%- var -%}

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
Darren8
Shopify Partner
11 0 2

Thanks very much Paul! much appreciated, working great now.