Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
Hi, wonder if anyone can help.
I can update Order Custom Attributes, but I'm stuck on line items.
In the orders screen I have
I can update 1, but not 2.
In 1 I am using
Send Admin API request
orderUpdate
{
"input": {
"id": "gid://shopify/Order/116544546654200",
"customAttributes": [
{
"key": "Essences",
"value": "Apple, Walnut, Peach"
}
]
}
}
This works on 1.
I have tried adding after the ID, the following
"lineItemId": "gid://shopify/LineItem/348823433194936",
But I get the following error
Mutation had errors: "Variable $input of type OrderInput! was provided invalid value for lineItemId (Field is not defined on OrderInput)"
What is it I am missing?
Is there any good tutorials on the basic of using Flow for this type adjustment.
kind regards
You can’t update line item properties in an existing order using the Admin API. Shopify only allows order-level updates.
Workarounds
FirstlyUse Draft Orders – Edit before checkout.
Then,Refund & Recreate – Only way to fully change line items.
Also Use Metafields – Store extra info instead of editing the line item.
Let me know if you need help with a workaround
That is a bit of a bummer.
1. FirstlyUse Draft Orders – Edit before checkout.
This is for Shopify subscription orders, so if they want to edit their line items for next time, by the admin able to edit the order line items I thought it'd be able to edit it for next subscription run. I really don't fancy recreating the order as a draft, etc
2. Also Use Metafields
This would probs take a bit rebuild, it was built in Shopify 1 a few years ago and doesn't use the standard basket. It is a custom build a box, so people can add different attributes (upto 7) to a single order and then checkout.
These are added to a Orders Line Items Custom Attributes.
eg:
if (Shopify.queue.length) {
var request = Shopify.queue.shift();
var data = {};
if (request.properties) {
data = {
id: request.variantId,
quantity: request.quantity,
selling_plan: choosenFrequency,
properties: {
Essences: essenceString,
Price: '£' + boxPrice.toFixed(2),
'Base': choosenBase
}
};
So would need to rebuild
It originally came from:
https://www.slicedbread.agency/blogs/shopify/how-to-develop-a-build-a-box-product-in-shopify
But now customer is investigating Subscriptions and this type of custom basket is not the most compatible if you want to edit subscriptions
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025