Dynamic Discount based on Channel

Hi there,

after hours of searching and trying, I need your help as I’m not sure how to solve it.

I need a way to apply a dynamic discount during checkout based on the channel the user came to our site.

Some background: Let’s say you came via an affiliate link, then we don’t actually need to pay google (ads) for your visit. If you then chose a payment method, which is not that expensive as other ones. Then we want to give our customers the money instead of the other platforms.

So somehow I want to apply / generate a discount code during checkout, which is automatically added till a max. of e.g. 25% of the compare at price.

Is there anything which goes into that direction? Any tips / ideas would be greatly appreciated!

best

I can help you implement it with a little JS. This is the approach -

  1. Identify the channel and save it in local storage
  2. Based on source when the person clicks proceed to checkout then call the backend API to dynamically create and apply the coupon code

Second step is the trickiest and will involve understanding of web scraping, some backend programming language and JS