Get order's sales channel name?

Highlighted
Shopify Partner
660 0 119

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

1 Like
Highlighted
Shopify Partner
660 0 119

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

0 Likes
Highlighted
Shopify Partner
660 0 119

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
Highlighted
Shopify Partner
660 0 119

Anyone?

0 Likes
Highlighted
Shopify Staff (Retired)
Shopify Staff (Retired)
531 0 97

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
Highlighted
Shopify Partner
660 0 119

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
Highlighted
Shopify Partner
660 0 119

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
Highlighted
New Member
1 0 1

Hey ClementG, It's already an old topic so I doubt it will be useful to you, but I was also recently interested in finding the answer to the same question.

So in case anybody else will need it, here are a couple of findings I came across about the source_name of some app_ids:

580111 Online Store

294517 ReCharge Recurring Billing & Subscriptions

1354745 Draft Orders

 

Would be great if I would be able to get the whole list.

1 Like
Highlighted
Excursionist
24 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
Highlighted
Tourist
8 0 3

@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