A space to discuss GraphQL queries, mutations, troubleshooting, throttling, and best practices.
As the title suggested, we can not update customAttributes, also known as properties (confusing? I know right), of an item in an Order (LineItem) from anywhere (REST,GraphQL,AdminUI). Why is this design?
It makes absolutely no sense whatsoever as these attributes are 90% (I made that up, lol) used for customer personalizations and other wishes. Customers make mistakes (typo's etc) and might ask through support channels to fix said mistakes before orders are fulfilled (go into production). So, why on earth are we blocked from editing these attributes is beyond me. With outsourced production, manufacturers etc. the only options are to contact them, add confusing notes to orders, or outright refund the order and beg the customer to order again. How stupid is that?
These properties can actually be deleted through Admin UI, but they should be editable right there or at the very least through API's.
I want answers. I hope I'm wrong in my entire premise and look like a fool or at least want a legitimate reason why this design is in place?
Thank you for coming to my TED talk.
Orders are mostly immutable for good reason. If Shopify let anyone change them willy nilly, chaos would result. While line item properties are not entangled with money, taxes etc, they are data that originated with the order. If you find they are incorrect, and would like to correct them, you are limited in what you can do, but as you point out, you could always add to the order notes that line item X required open heart surgery and therefore is unavailable for beers after the game. Thanks you for coming to my TedX talk.
You can mutate plenty of fields in Orders, such as Order.customAttributes. So your entire premise is misleading. lineItem.customAttributes are not crucial to the integrity of Shopify API anymore than Order.customAttributes as far as either of us know for a fact.
Therefore I am still waiting on a better answer why lineItem.customAttributes can not be mutated.
I don't appreciate these kind of hasty generalization's that are often just "confidently incorrect" answers from the "expert" dev community.
I agree this is an important use case for us as well and now we have to cancel and replace order to fix
You can mutate plenty of fields in Orders, such as Order.customAttributes. So your entire premise is misleading.
No it's not. Order attributes relate to the order, not the line items therein.
Therefore I am still waiting on a better answer why lineItem.customAttributes can not be mutated.
Here's one: it took almost ten years of customer requests and posts like yours for order editing (adding/removing line items of an order) to be released by Shopify so you can be guaranteed editing of line-item properties via the GraphQL API is years off, if ever (it will never come to REST).
Custom orders often utilise line-item properties to capture the specifics of an order. I built a jewellery store that sells engraved rings with some starting at €5000; changing properties like material type or customisation details post-order could cause serious issues. What if an order goes to the jeweller via email and they engrave a €5k ring with "Love John" but unbeknownst to them a staff member edited the order so the engraving said "From J. x" after production of the physical item had begun. Now you have two orders floating around with the same order number but different line item properties. In this instance, the safest thing is to cancel the order and then recreate it. Fixed line item properties ensure that consistency from the point of sale to fulfillment is maintained. The requirements of immutability of an order's line item properties goes far beyond the reasons why you need it.
I don't appreciate these kind of hasty generalization's that are often just "confidently incorrect" answers from the "expert" dev community.
No one here appreciates that kind of a response either. HunkyBill took the time to respond to your post and you chastised him with "I don't appreciate these kind of hasty generalization's (sic)...". A lot of us here are Shopify experts simply through experience and we contribute to the forum for free to help people like you. We didn't build shopify, we aren't on their product development teams. We've simply been through a lot of front and back-end issues lots of times before the majority of people who post here.
We're not "confidently incorrect", we're experientially informed. If you have an issue with the platform take it up with Support.
Custom orders often utilise line-item properties to capture the specifics of an order. I built a jewellery store that sells engraved rings with some starting at €5000... changing properties like material type or customisation details post-order could cause serious issues. What if an order goes to the jeweller via email and they ... ... ...
I mean that's just bad fulfillment pipeline. Meanwhile the production staff of my store click a button on a tool, which changes a "note" (status) on the order to "production" when they in fact start manufacturing. I could then easily use that note on my custom backend to make it physically impossible for staff to mutate LineItem customAttributes any longer. We are asking this feature for Admin API (graphql) after all, not necessarily Shopify Admin UI, which ironically, and as I said in my original post, allows you to completely delete order LineItem customAttributes.
Why is it OK to completely delete LineItem customAttributes (accidentally or not) from the basic UI and not mutate the field through API, which without a shadow of a doubt would be intentionally developed feature by a design? Doesn't sound "experientially informed" to me lol.
I respectfully disagree and stick to my original comment about HunkyBill "making hasty generalizations".
So appropriate that your handle is TryHard. Given your efforts here I can summarize them as, you're loose with facts, fuzzy with technical details, and still have not overcome your perceived problems by adopting easy, recommended even, possibilties. Want one small example? Customer scewed up? Line Item Property is wrong? A smart person would simply copy said properties into a handy Metafield resource, surface that to all on the team, knowing that property is easily edited, to carry the day.
See. Another hasty generalization for you, for free, to perhaps save you from trying hard, and instead succeed easily. Of course, you choose to shackle yourself, no one else, so I leave you with that, and no hard feelings that you're slagging me for helping you. I am used to it happening from time to time. The times we live in! So great!
So instead of answering my question, you decide to double down, keep moving goalposts and ridicule me, as if you had any idea what sort of system I have implemented (the very same day of my OP) to overcome this illogical limitation. Again:
Why is it OK to completely delete LineItem customAttributes (accidentally or not) from the basic UI and not mutate the field through API, which without a shadow of a doubt would be intentionally developed feature by a design? Doesn't sound "experientially informed" to me lol.
Which part of the question above is "loose with facts" or "fuzzy with technical details"?
I understand, not everybody is a senior software engineer like us, which is why you probably made your passive aggressive reply originally, but we are way beyond that and now you just come out hostile. Your idea of moving the LineItem.customAttribute to a metafield with orderUpdate is not the worst idea, but it is overhead and moving goalposts, which is a logical fallacy.
Look, I would be ok with all of the above toxicity if your premise of "if Shopify let anyone change them willy nilly, chaos would result." was at least true, but it clearly isn't since anyone can literally remove the entire property directly from the Admin UI without leaving any trace whatsoever. You are free to shill for Shopify, but it's not cool that you mock others for bringing in to light obvious inconsistencies in the platform. At least "Shopify Staff" has now seen this and apparently shared the feedback forward for whatever that is worth.
TL;DR - Your logic doesn't compute and you are being unnecessarily hostile and passive aggressive with your "answers".
You're correct in that they don't offer edit when to they offer delete. You agonize over that. Fine. We all get it.
You complain of having to work. You call it overhead. Moving goalposts. Fine. You win.
Also, if you're going to call me hostile, toxic, bothersome, and then complain to Shopify, well, that is on you, and reflects on your lack of comprehension about how to operate on free public community forums. While I will live to engage another issue on another day, I am not sure you and your approach will pay off, but, if it does, good for you. You got lucky. Enjoy your luck.
Your persistent evasion of accountability is troubling and makes you look extremely arrogant.
I have not reported your behavior to Shopify. Your misunderstanding is perplexing, and it seems you're projecting your frustrations onto me.
Take a deep breath and step down from your high horse.
Thanks @Kristen_Z , this feedback has been shared with our product teams.
- Kyle G.
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