Editing orders from Shopify admin

Solved
Highlighted
Shopify Partner
14 0 1

Hi there,

I've having trouble editing the order from the admin interface. When I click on the "Edit" button on this page https://maxim-khanate.myshopify.com/admin/orders/2109272227904

 

unnamed.png

I get the message "This order cannot be edited by this app." (see screenshot). I've read the linked page and it does not mention why I cannot edit an order on the admin page.

Note that this order was created by the app I developed. I guess I have 2 related questions: Why can't a merchant edit an order if it created by my app? How do I allow a merchant to edit app created orders?

Thanks!

0 Likes
Highlighted
Tourist
6 2 3

This is an accepted solution.

You can only edit orders in the admin created by the Shopify Sales Channel. As of August, apps can now edit orders that they’ve created via the GraphQL Admin API.

See the change log entry here:

https://shopify.dev/changelog/apps-can-now-edit-orders-they-created

0 Likes
Highlighted
Shopify Partner
14 0 1

Thank you!

0 Likes
Highlighted
Shopify Partner
14 0 1

Turns out this doesn't quite work yet!

 

1. I created a draft order using https://shopify.dev/docs/admin-api/graphql/reference/mutation/draftordercreate?api%5Bversion%5D=2020...

2. then completed the draft order using https://shopify.dev/docs/admin-api/graphql/reference/mutation/draftordercomplete?api%5Bversion%5D=20...

3. which created this order https://maxim-khanate.myshopify.com/admin/orders/2805230207040

When I tried to edit the order on the admin UI at https://maxim-khanate.myshopify.com/admin/orders/2805230207040  I still get the same error message when I click on the Edit button.

Untitled.pngDo you have any idea what I am doing wrong?

0 Likes
Highlighted
Tourist
6 2 3

This is an accepted solution.

Hey! To clarify the distinction.

You are not able to edit the order via the Shopify admin UI as it was created by your app. You can edit the order using the Draft Orders API via your app. If you want to modify the order, you will need to make your own order edit screen on top the Draft Orders API or use the Draft Orders API directly to manipulate the order.

Does that make sense?

Highlighted
Shopify Partner
14 0 1

Got it! Thanks for the clarification.

0 Likes
Highlighted
Tourist
6 2 3

No worries! It's often surprising what you can and cannot do with the various APIs and permissions, I've certainly gotten caught out a few times!

0 Likes