I am developing an app, and it need to extract all online orders for a customer. As there's no field such as "channel" in order API. I looked through the doc and found that "app_id", "source_name" seems to be a possible way to distinguish online & pos orders.
And the API can only filter by attribution_app_id. (user source_name=web but do not work) now. As I know, app_id is used to identify different apps, such as POS app, other app installed.
And here is my question, is "attribution_app_id" fixed for online store? I am considering to use attribution_app_id=xxxx to get all online orders but I dont know if it will be changed.
If that's fixed, I think it will solve my problem as well as many developer. As I can see from some outdated post, they also asking for a way to extract online store only. Thanks in advance.
attribution_app_id and app_id are static identifiers, they are unique from API client to API client and do not change over time (including if an app is uninstalled/reinstalled).
Searching by attribution_app_id will filter the returned orders in the way you need it to (orders created only by an app in particular) reliably. The app ID of online store, for example, will always be 580111.
The only way this ID can change is if the developer of an app were to delete the app and create a new one with the same name for whatever reason, in which case a new API client is then created.
I tried pulling orders from two diferrent stores who have my sales channel app installed. I am confident that both the stores have received orders through my app. But, I don't see the app_id paramater to be identical for both the response.
I can provide you specific details if you need.
Sales channel name is 'Mobile App Creator - Mobile Apps Builder - Plobal Apps Mobile Application'
and Order Ids are what I am trying to pull.
here are the two store on which i am trying with
you can check the revenue section of these stores to confirm that they have generated some revenue form this sales channel.
Every order on baby-online-nz.myshopify.com attributed to "Mobile App" (at least in the past 30 days) was attributed to a private app of the same name. The app_id of this private app matches that which shows on the order.
Each private app on each shop will always have a unique ID, as each private app is its own instance of an API client, so across shops the ID will be different in this case. If the orders were in fact processed by the sales channel, then the ID would be the same across shops since any one channel can be installed across many shops.