20% Discount with a $100 limit

9 0 1

Hi guys!


I'm having a hard time using the script editor to figure out how I can implement this:


I'll give an influencer a promo code, say, INFLUENCER20, where it'll give all who use it 20% discount on their total order—but only up to $100. If their carts, therefore, exceed $500, instead of getting 20% they max out their discounts to just $100.


Thanks for any insight!