Solved

App Bridge - Order Completion

tomchan
Excursionist
13 0 5

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!

 

 

Accepted Solution (1)
Henry_Tao
Shopify Staff
91 28 15

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.

Henry | Social Care @ 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 the Shopify Help Center or the Shopify Blog

View solution in original post

Replies 7 (7)

Henry_Tao
Shopify Staff
91 28 15

Hi @tomchan 

 

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

 

Cheers,

Henry

 

Henry | Social Care @ 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 the Shopify Help Center or the Shopify Blog

Henry_Tao
Shopify Staff
91 28 15

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. 

Henry | Social Care @ 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 the Shopify Help Center or the Shopify Blog

OT518553
Shopify Partner
5 0 3

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. 

 

 

Henry_Tao
Shopify Staff
91 28 15

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.

Henry | Social Care @ 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 the Shopify Help Center or the Shopify Blog

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.

Henry_Tao
Shopify Staff
91 28 15

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

Henry | Social Care @ 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 the Shopify Help Center or the Shopify Blog

Hoken
New Member
4 0 0

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