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.

Identify channel in Script Editor

Identify channel in Script Editor

timd
Shopify Partner
124 6 79

I have a plus client with a checkout script discount which was limited to the Online Store channel only (App Only Discount).

But I’ve had to add a 2nd discount to this script and run into an issue where the 2nd discount needs to be accessible on both the Online Store & Storefront API channels (Free Tote over $180).

So I need a way to identify within the Script Editor which channel the customer is from and enable/disable discounts based on their channel. It doesn’t appear from Shopify’s Scripts API documentation whether it possible to identify the channel, anyone have any ideas?

sales channels.jpg

Replies 2 (2)

saudslm
Shopify Partner
5 0 0

Hi @timd 

Were you able to figure this out? I'm stuck in a similar scenario where I need to identity the sales channel.
Any input from anybody would be highly appreciated.

timd
Shopify Partner
124 6 79

No luck unfortunately. After a bit of back and forward with Shopify's support trying to see if this was possible they said that theres no way. I requested for this to be added but its not likely : (