[Feature request] Allow customAttributes input (line item properties) for orderEdit API

Currently it is not possible to specify customAttributes (line item properties) for a line item, when we try to add variant / custom item to an existing order (orderEdit API : orderEditAddVariant - GraphQL Admin and orderEditAddVariant - GraphQL Admin).

I would like to request the ability to specify customAttributes (line item properties) when adding variant or custom item during order edit.

Hope this request can be considered, thank you

3 Likes

Hey again @soulchild :waving_hand: - hope all’s well! Thanks for flagging this. This is a pretty desired feature that we have on our radar (there’s a pretty interesting discussion here from a while back in our old forums if you’d like to take a look at it).

In that thread one of the recommendations is to leverage metafields (more info here). There isn’t a specific line item metafield type, but you could use Order metafields to store the data needed (using the orderUpdate mutation).

Not the most ideal workaround for sure - but metafields are pretty robust and are the recommended method at the moment.

I’ll link to your thread in my notes here for the feature request record we have on our end though, just so we track it on our side - hope this helps!

Hi Alan,

Thank you for the reply. Unfortunately the workaround of using Order metafields does not work, as we can’t show order metafields on order confirmation / update email template (https://help.shopify.com/en/manual/fulfillment/setup/notifications/email-variables#order-fulfillment), as we have to convery the information of the line items to customers.

Thank you for linking the feature request!

1 Like

Hi Alan,

As Soul Child pointed out, this isn’t a workaround to the issue. Shopify could easily let you add a line item property, just like it lets users delete line item properties. If Metafields could be used for the same purposes then Line Item Properties would be depreciated. I’ve been asking for this feature for 5 years now. I have never gotten a response. It’s essential to editing orders for so many stores.

Hey @Alan_G - On a slightly related, it would be great to see the OrderLineItemDeleteCustomAttributeMutation be exposed to the Public Admin API - Last time I checked I saw it’s only available via the Internal API (Someone please correct me if I am wrong).

I think this could potentially also solve the other people’s use cases as an interim solution, since it’s already available within the Admin and therefore shouldn’t have any downstream effects that aren’t already triggerable within the Admin.

For some context, we have a setup where we use signed line item attributes to manipulate prices via functions, these attributes are then unpacked into an order level Metafield via a custom app. We tap into these attributes within email templates, functions, etc. but post-order, our point of reference is now that order level Metafield - Which we can make edits to.

It would be great if we can clear our these attributes via the Admin API, once we drop the data into an Order Metafield, for a cleaner Admin experience (These attributes are not very pretty).

Thanks for the additional context there folks. I definitely get how the metafield workaround doesn’t meet your needs due to the email template limitations. I believe this has been a fairly popular request, so I hope there is some time to look into this in the near future and I’m happy to log another request for this on our end to see if that helps gain some traction.

@kurt That’s an interesting point about OrderLineItemDeleteCustomAttributeMutation. Just out of curiosity, could you share where you saw this mutation? Just wondering if it’s being exposed in requests from the Admin that can pop up in the network logs in Chrome Dev tools for example.

I can’t confirm for sure if we’d expose that mutation publicly, but happy to look into this to see if I can share more info and potentially put in another feature request for this too.

Hey @Alan_G - it sure is - Here’s the request in full, pulled from the dev tools:

POST https://admin.shopify.com/api/shopify/xxxx?operation=OrderLineItemDeleteCustomAttributeMutation&type=mutation

{
    "operationName": "OrderLineItemDeleteCustomAttributeMutation",
    "variables": {
        "id": "gid://shopify/LineItem/xxxx",
        "orderId": "gid://shopify/Order/xxxx",
        "attributeKey": "YOUR_ATTR_KEY"
    },
    "extensions": {
        "client_context": {
            "page_view_token": "xxxx",
            "client_route_handle": "order:show",
            "client_pathname": "/store/xxxx/orders/xxxx",
            "client_normalized_pathname": "/store/:storeHandle/orders/:orderId",
            "shopify_session_token": "xxxx",
            "shopify_multitrack_token": "xxxx"
        }
    },
    "query": "mutation OrderLineItemDeleteCustomAttributeMutation($id: ID!, $orderId: ID!, $attributeKey: String!) {\n  orderLineItemDeleteCustomAttribute(\n    id: $id\n    orderId: $orderId\n    attributeKey: $attributeKey\n  ) {\n    lineItem {\n      id\n      customAttributesV2 {\n        type\n        key\n        value\n        __typename\n      }\n      __typename\n    }\n    userErrors {\n      message\n      __typename\n    }\n    __typename\n  }\n}\n"
}

Totally understand if it’s not possible, and appreciate you looking into it!

Thanks @kurt - still digging into this, but I’ll loop back with you once I have more info to share :slight_smile:

Hey @kurt - just following up with you here as I was able to get a definitive answer for you. Right now, there’s not a way to modify line item attributes in the cart via the order editing API and we don’t currently have a plan to allow for this via the public API.

That said, I’m definitely happy to put through another feature request for you on my end (it can sometimes help if we have lots of folks requesting a feature when it comes to considering adding new capabilities).

If you’d like to share your use case with me here, I can add that to the feature request report on my end and make sure our product teams take a look at it. I can’t guarantee that it will become something we enable, but we will have product take a look at the request for sure.

Hope to hear from you soon!

@Alan_G thanks for looking into this. Please note that this feature has been requested by thousands of merchants and developers for many years now.

Our team is serving 10k+ merchants and we get multiple support tickets every day asking for how to edit the line item properties of an existing order. (Always same answer Shopify does not allow it :frowning: )

An order editing API for line item properties is desperately needed.

Hey @michael :waving_hand: Thanks for sharing the context here. I can definitely understand the frustration there when you have to keep letting folks know that it’s not currently possible.

I’ll include your feedback in my feature request report. I can’t guarantee anything on my end here, but sometimes real-world numbers can help move the needle on prioritization.

1 Like

I am requesting this too !

Hey @gofortiss - thanks for reaching out! I don’t have much to share in terms of information on the feature request, but can confirm it is still logged on our end. Just wondering if you’re encountering the same limitations in terms of email template integration that @soulchild mentioned, or if you have a different use case?

If you could share a bit more detail about your specific scenario, I’d be happy to add that context to our feature request record. Like we were chatting about in the thread earlier, having multiple real-world use cases documented can sometimes help with prioritization on the product team’s side. Hope to hear from you soon :slight_smile:

Another frustrated merchant here needing the same functionality. No workaround is possible except cancelling and resubmitting the order, which is something no one wants.

There are millions of use cases for this like needing to update some text customization for a line item like correcting a typo and the last thing you want is to cancel the order and place it again just for this.

1 Like

Hey @Andrew_Jaanuu, thanks for adding your voice to this thread. I definitely understand the frustration of having to cancel and recreate orders just to fix something like a typo in customization text, it’s not ideal for sure.

Just to make sure I capture your use case accurately for a feature request, are you also running into the same limitation as @soulchild where you need these line item customizations to show in email confirmations? Or is your use case different?

The more specific details I can add to our feature request about how merchants are being impacted, the better. Would love to hear more about your workflow and what types of customizations you’re typically needing to edit. Hope to speak soon, I’ll get that feature request with your specific use case feedback set up as soon as I hear from you.

We require the order line items have accurate line item custom attributes to be synced to fulfillment center, when we used other platforms, we can always correct those custom attributes without issues like magento since they are not used for order calculation, but this unnecessary shopify limitation is causing us having to cancel the order instead for some minor correction. This limits shopify’s scalability for order customizations and will prevent merchants whose primary use case is to have orders with customized line items to sign up for Shopify since all other platforms support this.

Hey again @Andrew_Jaanuu, thanks for that detailed feedback there. The fulfillment centre sync requirement you mentioned does seem like a fair use case that I haven’t seen mentioned before on my end. You make a good point about how it would impact merchants focused on customized products for sure.

I’m going to add your specific scenario to our feature request here on my end. The fact that other platforms support this functionality and that it’s blocking some merchants from choosing Shopify is fairly valuable context for us, so I appreciate you sharing that.

Just to make sure I’m capturing the feedback accurately on my end:

  • You’d need to sync accurate line item custom attributes to your fulfillment center
  • These are typically minor corrections (like typos) that don’t affect order calculations
  • The current workaround of canceling/recreating orders basically just disrupts the workflow and customer experience because of the minor corrections?

Are there any other specific pain points or examples you’d like me to include? For instance, how often does this issue come up for your clients, or what types of customizations are most commonly needing corrections?

I can’t make any promises on timeline or if it will be released, but I want to make sure we document this thoroughly. The more concrete examples and business impact we can show, the better chance we have of getting this prioritized.

Typo doesn’t happen as often, but it is just an easy example to understand. For our team it comes from time to time where we have to correct some embroidery color or font for a large batch of orders already placed and this has caused lot of pains on us making us needing to talk to our fulfillment center to see if they want to accommodate or we really have to cancel all orders. Even if they accommodate, there are still risks of them making mistake when their system shows they should do color A on the Shopify line item, but we tell them to do color B instead, which will end up doing the wrong color to the customers making them frustrated and then we have to redo the orders for them with color B.

We indeed switched to a different platform for some of those larger orders with customizations rather than having them to be submitted to Shopify due to Shopify’s limitation.

Thanks @Andrew_Jaanuu , definitely hear where you’re coming from. I’ll set up that feature request on my end here so that we have this logged and pass your feedback on to our product team. Really appreciate the conversation here and your ideas, thanks again.

+1 for us. A pointless limitation that requires us to rebuild the order from scratch. Come on, Shopify…