Discussing APIs and development related to customers, discounts, and order management.
Hello,
Properties are not listed in the arguments for the orderEditAddVariant mutation (https://shopify.dev/api/admin-graphql/2022-01/mutations/ordereditaddvariant). Is it possible to include line item properties on a new line item when creating it, either with the above mutation or through another endpoint/method?
Thanks,
John
I'm running into the same issue, did you find a solution?
Unfortunately, no...
Did you ever find a solution? I am sure one must exist since there are third party apps that say they can edit the line item properties (they seem to remove the existing product and add it back with the new customAttributes).
That's the only workaround I've seen. It's acceptable in some situations, but not in others.
Do you know how to make that workaround work? I haven’t been able to figure it out but it would work for our situation.
What is your use case? Will the line item have been paid for? Fulfilled?
This is for existing orders. The line item has not been fulfilled. The credit card payment has been authorized but not captured.
We use the line item properties to store certain custom information, and we sometimes need to change that custom information (and sometimes a customer managers to checkout without filling in that information, so we need to add it to the line items that are missing the information).
We are okay with removing a particular line item and then adding it back again with new line item properties. I just can't seem to figure out how to add a product to an existing order and include line item properties.
Actually, I don't see a way to do it properly because a custom line item isn't really a product. In some cases, it may be an option to delete the entire order and recreate it with the properties. We didn't have that option, so our workaround was to put the data on line item discounts on the description property using the orderEditAddLineItemDiscount mutation.
It's worth mentioning that this all could have been avoided by having validation on the front end.
I have the same issue, can someone from Shopify partners chime in here?