What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Re: Getting correct Sales Channel or Source name from Order

Getting correct Sales Channel or Source name from Order

RareArtifact
Excursionist
17 0 4

When I view an order in Shopify Admin that was created through the REST API, I can see the source/channel that created the order on the page.

 

RareArtifact_1-1674218513516.png

 

 

But in the JSON, all I see is the App's ID number.

 

RareArtifact_0-1674218473716.png

 

How can I get the correct name?

Replies 3 (3)

ShopifyDevSup
Shopify Staff
1453 238 525

Hi @RareArtifact!

There's no way to query for an app's name with the app Id because that information is owned by the Partner who develops the app. If they don't specify their own source name at checkout and order creation, the app Id is used instead and it's intentionally generic.

The reason the name appears in the Shopify Admin is because the Merchant and the Partner make an agreement, through app installation, and Shopify makes this information visible. The app name, or any other app or installation information, shouldn't be available to anyone but the merchant and the Partner.

 

Beyond the privacy concerns, apps are intended to extend the features of the Shopify Admin not replicate it. Parity between what can be fetched with our public APIs and what a Merchant already sees in the Admin shouldn't always be expected.

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

RareArtifact
Excursionist
17 0 4

Revisiting this issue as I don't think the answer pertaining to security or functionality necessarily applies here -- the order was created from a custom app within the storefront, not a partner app. We accept orders by phone and other feeder sites, and they're inserted into our storefront as prepaid orders. All of the order data is then synced with another system that analyzes order timestamps and locations to correlate them with TV ad spends. When an order comes in from web or Facebook or wherever, I can query the publications in graphQL and match them up. But when the order comes in from one of our custom apps, all we see in the API is an ID number under name.

Since this is all internal to our own shop, surely there must be a way to get the name we called our own app when we created it. In this screenshot, "Allegro" shows in the Admin interface. Is there nowhere in the API that we can query to retrieve that name? A list of custom apps in our storefront? Anything?

sdhoman
Shopify Partner
1 0 0

On the same topic, we sell some products on other merchant's stores through shopify collective but the order object (order create webhook) appears to have no information on where the order originated or does it? We need this info to properly assign commissions. Thank you.