FROM CACHE - en_header

Return management just got easier! We’ve launched Customer Self-Serve Returns to all Shopify merchants. Click here to learn more about how to activate this in your store.

Get exported orders ids from Bulk action link in embedded app

Solved
toddvalentine
New Member
2 0 0

New to Shopify apps. Wondering how to collect the exported orders IDs from a bulk action link that is sent to my embedded app (created following Shopify's Node, React and GraphQL tutorial).  Thanks

Accepted Solution (1)

Accepted Solutions
SBD_
Shopify Staff
Shopify Staff
1098 146 227

This is an accepted solution.

They're appended as URL parameters, for example:

 

https://some-app.com?shop=...&ids[]=1234&ids[]=1235

To read these in your Koa app, look inside ctx.query:

 

router.post('/example', (ctx) => {
  console.log(ctx.query)
})

Scott | 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

View solution in original post

Replies 3 (3)
SBD_
Shopify Staff
Shopify Staff
1098 146 227

This is an accepted solution.

They're appended as URL parameters, for example:

 

https://some-app.com?shop=...&ids[]=1234&ids[]=1235

To read these in your Koa app, look inside ctx.query:

 

router.post('/example', (ctx) => {
  console.log(ctx.query)
})

Scott | 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

toddvalentine
New Member
2 0 0
adhamdwikat
Tourist
6 0 2

Iam new here 

where should we use this script (inside which file ), is there more detailed examples ?