App Bridge - Order Completion

Solved
tomchan
Excursionist
12 0 4

Hi everyone, 

I am developing an app which will be placed in the order complete action menu when an order is completed.

Is there any methods/functions/actions which would allow me to retrieve data from the just-completed order and further process it with my app? 

Thanks!

 

 

0 Likes
Henry_Tao
Shopify Staff
Shopify Staff
79 25 11

Hi @tomchan 

 

Unfortunately, there is no way to access just-completed order from order complete action menu. 

 

Cheers,

Henry

 
0 Likes
Henry_Tao
Shopify Staff
Shopify Staff
79 25 11

Hi @tomchan 

 

An alternative way of using embedded app in order complete section is webhook. 

- First, embedded app obtains accessToken through auth flow to access Graphql / REST Admin API.
- Second, they create a Webhook for Order Creation. See https://help.shopify.com/en/api/graphql-admin-api/reference/mutation/webhooksubscriptioncreate or https://help.shopify.com/en/api/reference/events/webhook

 

Let me know if it helps. 

0 Likes
OT518553
Shopify Partner
5 0 2

hello, I am facing the same issue as well... however, I was checking one of your app

https://apps.shopify.com/order-printer

When I complete the order and click APPS -> Print with Order Printer, then the modal can show the exact order I want to print, may I know how to do that? I also tried to use this app to re-print some other orders, and the app can print it, so I am sure that's not using webhook to do that...To be able to get the order info is very useful for app development. Thanks. 

 

 

0 Likes
Henry_Tao
Shopify Staff
Shopify Staff
79 25 11

This is an accepted solution.

Hi @OT518553 and @tomchan 

 

I double check. When opening pos link in order complete section, there is an id in query param that you can use. That's the most recent order id. 

 

I hope it helps.

0 Likes
Hoken
New Member
4 0 0

Hi,
I'm new to shopify app developing and I'm having the same problem, I didn't totally understand your answer @Henry_Tao , I'm really sorry but Can I ask you to explain better where I found most recent order id?
Thanks again, have a nice Day.

0 Likes
Henry_Tao
Shopify Staff
Shopify Staff
79 25 11

Hi @Hoken 

 

What I mean is that when merchant opens your app in the order completed screen, you can access to order id in the request query params. For instance: `https://your-app.com/?id=xyz&shop=...&hmac=...&timestamp=...&locale=...`. The `id` in query params is the order id that you are looking for. 

 

Let me know if you see it. 

 

Thanks, 

Henry

0 Likes
Hoken
New Member
4 0 0

Hi,
Yes thanks, I've already resolved my problem. Thanks anyway, have a good day.

0 Likes