Update line items properties under order

HristinaBendeva
Visitor
1 0 2

Hi,

 

With the new versions of the Shopify API (2023-1) can you update the line items properties under order? Or is there any workaround to do this?

Replies 7 (7)

ShopifyDevSup
Shopify Staff
1310 214 454

Hi @HristinaBendeva . This guide on editing orders might be helpful for you. https://shopify.dev/docs/apps/fulfillment/order-management-apps/order-editing

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

aschweng
Shopify Partner
8 0 0

That guide doesn't say anything about adding or editing the Line Item Properties, which seem to be customAttributes of the line item. Do you have any resources that show how to add a product with customAttributes?

Rosstheboss
Shopify Partner
27 1 20

Did you ever get an answer to this? A lot of stores have issues reconciling accounting because of Shopify's lack of support for editing line items. Would love to figure this out and solve accounting headaches! 

aschweng
Shopify Partner
8 0 0

As far as I can tell, there is no way at all to edit the line item properties once an order has been placed. 

haibingcastle
New Member
4 0 0

hello Aschweng, is it possible to add customAttributes to line item, i see this  https://community.shopify.com/c/graphql-basics-and/how-to-add-additional-details-to-the-order-once-i... , it work well.but i want to add customAttributes to line item. is is possible. how i write the mutaion code. please help me,thanks very much!

aschweng
Shopify Partner
8 0 0

As far as I know, you can only add customAttributes to line items when the product is added to the cart. You cannot add them at any other point in the process, or edit them at any point in the future. The original poster on this link shares an example.

haibingcastle
New Member
4 0 0

thank your reply, i think the way to save the customAttributes of the line item is store those custom_attributes for line items of orders in a separate database outside shopify.  But it is not perfect