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?
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).
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.