When we pull in orders to our app from Shopify, we need to do some further segmentation by the order source, i.e. if the order came from the Shopify website vs other marketplace connectors. In the Order object, I see the Source Identifier field and the Channel Information object.
The API documentation doesn’t really state in theory how these are different, they both say the identify the “source” of the order. We need to develop code, so trying to determine which is best suited.
Complicating this decision is in looking at the two via graph queries of the orders from these different sources, these fields/objects aren’t consistent in how they are populated. The one field that seems consistent is the sourceName is always populated in the examples we are looking at. But the sourceIdentifier is not, which is a bit troublesome as we’d rather code a unique source by an Id vs a Name that can be changed. Additionally, in some cases the Channel Information is null and in others populated.
If you were going to spend development $ to have a reliable way to segment orders by source, which would you use? In the product roadmap, is Source going to be deprecated and rolled into Channel?
1 Like
Hi @Chadillac,
There’s a couple different ways to see where an order is coming from via the GraphQL Admin API.
The easiest way currently is with the sourceName field as you’ve noticed it is populated for all sources, what it returns however depends on the source or app:
web for orders placed from the Online Store storefront
pos for Shopify POS
shopify_draft_order for Draft Orders
- for orders coming from a sales channel app it will either return the App ID, or a custom name if the app has registered for one (described in the REST Order documentation)
The sourceIdentifer field is not actually an id of the channel that placed the order, but is a unique id for the order itself provided by the channel if available. (also described in the REST Order documentation)

There are a couple different ways you can get info on where the order came from as well with the following:
order.channelInformation.displayName - returns null for draft orders though
order.publication.catalog.title - returns the name of the publication catalog that the product is published to, returns null if the sales channel doesn’t have a specific catalog connected to it.
With all of this in mind, I would recommend using the sourceName field specifically as it does provide the most reliable information here, and if needed you can query app names with the app id provided with the appInstallations query, though you will need the read_apps scope enabled to do this, which you can reach out to Shopify Support via our Shopify Help Center and request access to this scope.
Alternatively you can use the order.channelInformation.displayName field as a backup for returning the app names if you don’t want to make a second api call with the appInstallations query.