Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

How to change an order name (as described in the docs)?

How to change an order name (as described in the docs)?

AkaiBukai
Tourist
3 0 1

Hello everybody,


For our shopify store, we are using a fulfillment service and for example during a given period we only want them to process some orders only.

 

It seems that the integration they are using have a very limited options for filtering among all the orders they are fetching. Basically they can only filter using the "name" of the orders..
Since there is no such edit option in Shopify dashboard, I looked into the API and at first I was very happy..


As you can see it's clearly stated that IT IS possible to change the order name using the API (last sentence of this paragraph).

AkaiBukai_0-1676676012942.png

This is from here https://shopify.dev/docs/api/admin-rest/2023-04/resources/order#resource-object (you need to expand the list of properties). That name field is not even marked as read-only as you can see.

 

However, no matter how I tried it's not possible to make the update working.

I tried to change for example the email field just to see if the API is working.. Which it did.

So I really don't understand why I'm not able to update the name according to the doc itself.

This is the closest discussion I found which is quite old though https://community.shopify.com/c/shopify-apis-and-sdks/can-t-update-order-name-not-number-using-order...
There, someone is suggesting to delete and recreate the orders directly with the given name..
Is this the only solution?

I can't think that our use case is the only one that needs to have different naming schemes among orders..
I know it's possible to add prefix and suffix but not in a dynamic way.

 

So can anyone please point me to the correct direction?

Thank you!

Replies 2 (2)

ShopifyDevSup
Shopify Staff
1453 239 534

Hi AkaiBukai,

 

The 'name' field of an order can only be set when the order is initially being created via API, and cannot be changed afterward with an update.

 

There's a point near the top of that orders documentation page you shared which mentions this without being specific about the field:

After an order is created, you can change only a few of its attributes using the API. 

Hope you have a great day

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

taraRCH
Excursionist
21 1 11

I also would like to be able to dynamically change the prefix or suffix of an order name after it has been created.  I need this for order filtering.  Is there any possibility of this being allowed?  It's becoming a more critical requirement.  As of now my only solution is to create a new Shopify store and that is not a viable long term solution.

Software Developer - Business Analyst