Notifying customer when their order is edited

Solved
evris_k
New Member
3 0 1

Good day,

I use a private app to update orders using the GraphQL Admin API. When I commit the edited order using https://shopify.dev/docs/admin-api/graphql/reference/mutation/ordereditcommit?api[version]=2020-04 I set the notifyCustomer argument as true but the customer does not receive a notification email. What might be the problem and are there any workarounds?

0 Likes
Greg_Kujawa
Shopify Partner
1016 83 219

I too went through a test case and never received any e-mail notification after this commit completed successfully. I added a dummy custom item to the order and committed it. Saw the transaction in the web admin order timeline, with the added order item along with a test note. But no e-mail was triggered. Perhaps someone from Shopify's team can chime in? 

0 Likes
_JB
Shopify Staff
Shopify Staff
760 89 169

This is an accepted solution.

Hey @evris_k @Greg_Kujawa,

I just tested this myself but everything worked as expected. Editing an order to remove or add quantity sent an e-mail as expected:

20-08-46sxg-ovkmb

The api_client I'm using has full access to the store, can you confirm if your apps have customer access?

As well, kindly provide the ids of the orders you edited in your tests and I'll use that to investigate further.

JB | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me 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

0 Likes
Greg_Kujawa
Shopify Partner
1016 83 219

@_JB actually I was doing this through the GraphQL app tool within the web admin. And looking at it, it has any/all permissions. 

0 Likes
_JB
Shopify Staff
Shopify Staff
760 89 169

@Greg_Kujawa,

Do you mind providing an order_id from your test?

JB | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me 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

0 Likes
Greg_Kujawa
Shopify Partner
1016 83 219

It worked when I just tried again. I originally hadn't defined the notify flag in the correct place. This fired off the e-mail notification as expected. All good!

 

mutation orderEditCommit($id: ID!) {
  orderEditCommit(id: $id, notifyCustomer: true) {
    order {
      id      
    }
    userErrors {
      field
      message
    }
  }
}

 

0 Likes