Get order's sales channel name?

ClementG
Shopify Partner
659 0 133

How do I get the order's sales channel?

Is it related to the source_name field?

The documentation states the following about the source_name field:

Orders created through official Shopify channels have protected values that cannot be assigned by other API clients during order creation. These protected values are: "web", "pos", "iphone", and "android"

So a customer checkouts on an iphone but using the web browser, will it show 'iphone'? Or will it only say 'iphone' if you process an order with the iphone shopify app?

I would expect the sales channel to be things like 'web', 'amazon', 'facebook, etc... Is that not available?

Thanks

ClementG
Shopify Partner
659 0 133

Not possible? It seems like a pretty important piece of data...

0 Likes
ClementG
Shopify Partner
659 0 133

Hello?

Is it possible to add the sales channel name?

It seems that the source_name is sometimes populated with a number. I'm guessing this is the app or sales channel id? But how can we get the name?

The data must be somewhere since using Shopify reports we can segment by sales channel name.

 

0 Likes
ClementG
Shopify Partner
659 0 133

Anyone?

0 Likes
Jamie_D_
Shopify Staff (Retired)
Shopify Staff (Retired)
531 1 101

Hey Clement,

In some cases, the source_name will be set to a reserved value such as web or pos to denote that the order originated from Shopify Online Store or Shopify POS.

For any third-party sales channels, the value is set to the app id of the sales channel. If you know the app id of the Amazon channel (by inspecting a known order), for example, you could build a mapping service on your end.

Hope this helps.

0 Likes
ClementG
Shopify Partner
659 0 133

Thanks Jamie. That's an interesting idea. And these ids will be constant across shops?

However, thinking about the last case I was looking at, it was an order processed with the buy button, but the source_name was web. If I understand correctly, the buy button is a sales channel in it own right so it should have been an id instead, right? Or maybe sales channels built by Shopify behave differently?

I will definitely look into the mapping solution a bit more. Is there a way for you to dig the mapping list from the Shopify systems and publish it here? I think it could be very useful and it would be much easier :)

0 Likes
ClementG
Shopify Partner
659 0 133

I hit a wall here.

I can see the app ids populated in the source_name field, but I have no idea about how to find out what sales channel it maps to...

0 Likes
Lull
Excursionist
29 1 3

I would like some information on this topic as well, especially as Shopify promotes the GraphQL API over the REST API, and the GraphQL API does not have the source_name field. The alternative in GraphQL seems to be the publication, but I just found out that the publication is null for a given order, maybe due to a bug, or maybe it is null because it originates from a draft order, but I am not yet sure of this.

 

Thanks,

-Louise

0 Likes
hardwoodmarble
Excursionist
15 0 12

@LullI think Publication is what Shopify calls "availability" in the admin interface. I don't think it relates to orders at all, but to Products and Channels. Channels are like, Online, Draft Order, POS, Facebook, Amazon, etc. Published would be if it's possible to see/sell that product in that Channel. So a store owner could have a product in your system but not have it available for purchase in any channel.

From what I understand, what a Sale should have is an OriginLocation. An OriginLocation is specifically where a sale was made. Most channels only have a single OriginLocation, whereas a channel like POS would have multiple since a store could have multiple POSs. Like, maybe the Shopify Store has multiple physical stores. All sales from a physical store would be from the POS channel but different OriginLocations.

 

OriginLocations also usually have an associated Location, but there is no association in the API. :( So, like, you know, the online channel fulfills from a Location and each POS also fulfill from a Location. But the API doesn't make that connection readable.

0 Likes
Matt_Att
Shopify Partner
1 0 0

So just to confirm after reading this thread, there is no current way to distinctly get what "Sale Channel" created the order using the GraphQL Admin Api?

0 Likes