over 4 years ago Syntax Podcast
Building a Coupon Engine
- 00:21 Talking about building coupon systems for ecommerce
- 01:38 Using Prismic as a headless CMS to build content with Slice components
- 02:38 Using LogRocket to debug errors and monitor user experiences in web apps
- 04:11 Both built custom coupon engines, challenges and strategies
- 05:15 Layering custom coupon logic on top of payment provider functionality
- 05:49 Supporting multiple payment methods requires custom coupon logic
- 07:29 Coupon constraints like dollar or percentage discounts
- 08:09 Constraints around allowing coupons on products or subscriptions
- 09:27 Restricting coupons to specific products with unique codes
- 09:59 Limiting number of coupon redemptions
- 10:18 Incrementing coupon usage count in database
- 12:06 Applying discounts to cart total vs individual items
- 12:24 Setting coupon expiration dates
- 12:54 Deactivating coupons to stop abuse
- 13:11 Creating single-use coupons
- 13:18 Allowing only one coupon per order
- 13:39 Stacking student discounts with coupons
- 14:02 Restricting coupons to certain countries
- 14:23 Restricting country-specific coupons to those countries
- 14:54 New vs existing customer coupons
- 15:14 Connecting affiliate coupons
- 16:25 Using referral URLs to apply automatic coupons
- 16:48 Chaining conditional coupon rules
- 17:37 Complex conditional logic is difficult to manage
- 18:28 Can't prevent coupons from being shared
- 19:24 Focus time on business not anti-piracy
- 20:04 Unique coupon codes to track attribution
- 20:39 Inferring metadata from coupon code format
- 21:08 Applying coupons automatically via URL
- 21:40 Trim whitespace and normalize capitalization
- 22:15 Simplify coupon format for usability
- 22:59 Helpful error messages for invalid coupons
- 23:17 Make coupon input easy and clean
- 23:48 Don't frustrate users during purchase
- 24:03 Summary of coupon engine tips
- 24:48 Example of coupon logic exploit
Using Prismic as a headless CMS to build content with Slice components
Wes Bos
You can create slices. So maybe you could create a
Wes Bos
and sort of it's just a page builder at that point.
Wes Bos
just like pages, in most cases, it's here's the coupon for the country. It can only be used in this country, And it's just 1 to 1, 1 to 1, 1 to 1. But a lot of there's a couple of countries where people have to use a VPN this one
Scott Tolinski
Cool. This episode is also sponsored by LogRocket,
Wes Bos
a person slice, and a person might have a name Is it good for a new customer or an existing customer? That's not this is not something I've integrated into mine because I don't necessarily care, but sometimes there's, Otherwise, people will goof it up. And even then, I get people, I0forward/syntax.
Wes Bos
What I really like is that a slice on Prismic
Using LogRocket to debug errors and monitor user experiences in web apps
Scott Tolinski
it. Is the perfect place to see all of your errors and exceptions happen in your site with a scrubbable video replay, but not only that, understand user behavior and it. Figure out what exactly the good experiences
Scott Tolinski
Stop guessing about your digital experience,
Scott Tolinski
a scrubbable video replay, one of the coolest services that we've talked about here on syntax. And you can go ahead and get 14 days for free if you sign up at logrocket.comforward/ Thirty. Don't do syntax hyphen 30. That ain't gonna work out either. So,
Scott Tolinski
It. It's really, really super neat. It's the modern front end
Scott Tolinski
which is really I mean, that that really labels it. We we send off these these it by default is a $10 off coupon. But then if you it. Check the is percentage discount. It'll be 10% off. So, yeah, those are our constraints. We also have constraints on whether or not this can be used on a product We yeah. We have we have those constraints, Is that you create a referral code, and then that referral code is essentially a coupon code for whoever buys it to get a discount. So In that regard, the coupon is acting double duty as it's probably attaching the referral So,
Scott Tolinski
and what the bad experiences are on your site and how you can go ahead and and fix those with us. Like I said, like, actual visibility.
Scott Tolinski
you know, Spaghetti framework and, Check it out. Works with all the tools you know and love, so you don't have to worry about does this play nicely with,
Scott Tolinski
Spaghetti framework and meatballs dot CSS. That'd be great. Okay. Cool. So thanks so much for LogRocket for sponsoring. Alright. Wes, coupon engines. Let's get in to coupon engines.
Chaining conditional coupon rules
Wes Bos
new
Wes Bos
And, I am
Wes Bos
or, like, if the customer's email address ends in dotharvard.edu
Wes Bos
Is, master package, which is all the videos, and then there is a team licenses, which which goes up from there. So I'm able to restrict it. And the way I do it is I do like, Every single course I have has a code, r f b, req for beginners.
Wes Bos
you just get it. You have to keep it all in your head in terms of how it's all working and whatnot.
Summary of coupon engine tips
Wes Bos
a flat dollar amount. That's something you could do as well. There's just it's endless,
Wes Bos
a couple of months ago, there was an Abercrombie coupon
Wes Bos
to talk to somebody one day who has Where you can chain ifs and ors together or ifs, ands, and ors. So you can say if the customer
Wes Bos
car or something like that. You know? Or, like, a coupon that is is good for 10% off up to a maximum it's good. Right? But if you can say,
Both built custom coupon engines, challenges and strategies
Scott Tolinski
So ours is kind of like a layer on top of Braintree's.
Wes Bos
Either a service or the one that's built into whatever.
Scott Tolinski
has essentially an add ons and a discounts feature baked in,
Wes Bos
solution, you probably wanna use Hey.
Scott Tolinski
And it is fairly limited.
Scott Tolinski
I'll kick it off by asking you. You you were talking about Stripe. Right? You use Stripe for your payment processing? Yeah. But I don't use Stripe for any of my coupon stuff. Do you? So we use Braintree, and Braintree What, And furthermore, if it's used on a subscription, can it be used on But it's a great way to keep track of and give out.
Scott Tolinski
Yeah. I'm I'm super into that.
Scott Tolinski
And I I do actually I'll
Restricting coupons to specific products with unique codes
Wes Bos
And you need to be able to limit the number of redeemed. So it's pretty simple.
Wes Bos
Every single time someone redeems a coupon, it just increments the number of redeems where somebody on TikTok figured out that you can get 90% off
Wes Bos
What else do I have on there? Number of redeems. So Sometimes I will email out and I'll say, okay, the next 100 people can get And, you're lucky with Braintree where it does pay PayPal and
Wes Bos
Or a specific product.
Don't frustrate users during purchase
Wes Bos
Other than that, then you don't the person doesn't have to go and find it or copy and paste it.
Wes Bos
I think I've that's all the tips I have. You have anything else to add? No. I think we nailed it. Coupons.
Scott Tolinski
Matt. Definitely.
Connecting affiliate coupons
Wes Bos
Use the link doesn't necessarily always work, but telling them to use the coupon code But, like, for my course platform, They got a whole bunch of starters. You can check it out with any of the, but you I could also make another one called Syntax 50, and it's a Syntax is a percentage based coupon where it's good for 50% off. Do you do both of those types as well? I know it's a bit different with you because you have
Wes Bos
syntax.
Scott Tolinski
Yeah. Sometimes the coupons Connected directly to an affiliate code. And I I think about that because we don't do that that way, but there's you know, that that tonal exercise thing I have. The way that their referral system works coupon that we have for our our subscriptions
Scott Tolinski
coupons to give their audience, but maybe tool for dealing with errors, exceptions, performance.
Wes Bos
to In terms of, like, what they're good for. So, obviously, the big one is how much is the coupon good for, I've never done that That's very funny. Oh, no. Oh, man. I do it all the time. It never works. But that's funny. That's very funny.
Wes Bos
someone has a podcast and you want them to be an affiliate.
Scott Tolinski
to that user account at the same time it's giving a discount.
Scott Tolinski
just having them click use this link, and you'll get it for x, y, and z price is maybe a it. Pretty sweet system. Actually, I think we could, like, really easily integrate that. So maybe that's something to look into. I think I should be doing that as well, especially because if you are giving it to somebody like, let's Say,
Make coupon input easy and clean
Wes Bos
Like like, you put in a thing and it's just this invalid coupon. Mhmm. And you're just like, what the hell? Built an entire coupon for, like, But there's just little things like that. And It's actually really funny. I should have run some stats Nice. Can they be stacked? Can you apply multiple coupons? I do nothing in that regard. One coupon per order.
Wes Bos
What I found helpful there
Wes Bos
after these dates, For mine, I thankfully don't have to do this. I don't either. Yeah. But for a lot of times
Wes Bos
that coupon is no longer valid or it's been deactivated but still go through. So, like, I've run stats just like the coupon logic. And every now and then you hear about, like,
Wes Bos
This this email says I often get people wanting to use the Iranian discount, but not use it within, Another thing is, So, like, people, 15 minutes after getting the email, it's already Use that if you get mad at that, you know, you know, as frustrating. So I'll increment it and say, oh, sorry about that. You, they're buying the course React for Beginners
Talking about building coupon systems for ecommerce
Wes Bos
A headless CMS But for myself, in in sales, you know, like, oh, that that kills me as there's so many edge cases and It's a it's a whole thing. Yeah. It it is a whole thing. That's a that's a good way. And I would love to but you cannot ruin your day they've they pushed they shipped the orders,
Scott Tolinski
CSD. Welcome to Syntax.
Scott Tolinski
it. Are a whole thing. Now we're gonna be talking about some strategies for building a coupon engine, some ideas behind it, some do's and don'ts, it. And just some general thoughts. My name is Scott Talinski. I'm a developer from Denver, Colorado. And with me, as always, is I I take it you have built a coupon engine as I've also built a coupon engine. So I'm sure between the 2 of us, we have a lot of, do's and don'ts here. Yeah. Coupons are a funny thing, and I I'll I'll start off by saying is if you are building a full blown ecommerce
Wes Bos
focus their
Wes Bos
what you do is you sign up For Prismic, you log in. You can start creating your your data types.
Scott Tolinski
Boss, and Scott And don't forget to subscribe in your podcast player or drop a review if you like this show.
Scott Tolinski
coupons, building a coupon engine. It's something that if you work in ecommerce or something in general, if you're working on the web now, coupons
Wes Bos
CMS around this thing called Slices, which I think is really cool. So, Iran. Mhmm.
Scott Tolinski
On this Monday, hasty treat. We're We're gonna be talking about coupon,
Incrementing coupon usage count in database
Scott Tolinski
Yeah. That's actually tricky because what we don't do is we don't do a percentage off the the whole So
Wes Bos
if you wanna buy multiples of my product, you just have to check out Multiple times, on their websites, yale.edu like, a online I've looked at that many times over, but the the kicker for me is that I need PayPal.
Scott Tolinski
we would do a percentage off
Scott Tolinski
Dollar amounts Wes Bos.
Wes Bos
Or or if you need to increment it. One time, I didn't do enough coupons.
Scott Tolinski
cart. I would guess for individual course purchases, we're only doing
Scott Tolinski
off of subscriptions, but I'm not positive about that. That's really like you said, there's so many permeations of all of this stuff, And it's not necessarily
Scott Tolinski
a whole shopping cart experience. So it. It's not the discount for us, I don't think, unless it's like a product sale, is ever being applied individually to one thing, but only being applied to the total cart. And, therefore, I'm pretty sure we're only doing percentage So that's a a constraint that we have there. But giving us that full control over, you can use this only on this specific skew, only on this specific subscription or products in general or subscriptions in general.
Wes Bos
If you needed it so you could query all coupons. But then I find it much easier just to Other than that, we'll catch you on Wednesday. Peace. Peace.
Wes Bos
a big deal Right.
Setting coupon expiration dates
Wes Bos
So if something should be valid until, because the biggest pain in the butt with that was I had to restart my valid dates.
Wes Bos
Boolean on there as well, so you can you can just turn coupons off. That's a big one for me because what happens is you give someone a coupon,
Wes Bos
And before you know it, that thing has made its way onto all the coupon websites or it's rippled through a Discord room or whatever.
Example of coupon logic exploit
Wes Bos
People will try to exploit that and figure out the the sneaks that sneaks around it. Yeah. That was a whole plot of, a movie, not digital coupons.
Scott Tolinski
Head on over to syntax.fm that, you know, there's there's just like something in there, like, piracy of our courses. You know, people email me all the time. I found your courses on this users mad when they're trying to buy your product, right? The last thing you want to do is make your users
Wes Bos
$400,000 a job title and a photo, like, let's say you wanted to and a product is Rec for Beginners starter package, Rec for Beginners app for a coupon to Oh, yeah. Right? You change it Oh, man. To kick in. So it's it's much nicer to have them actually in the in the database yourself. But once You have a and
Scott Tolinski
you know, serious film that he did. But that was, like, the whole thing was that there was, like, some, Essentially, like a flaw in their coupon logic. And it wasn't a computer based thing, but it was just like a actual coupons. And then he used enough of them to be able to, like, Take a flight in a vacation somewhere for free, essentially, on this company, and it was like, he they they didn't wanna honor it. But this is like, I mean, that's on the you you have the rules right here. I'm following the rules.
Wes Bos
Yeah. Oh, that's great. Coupons. Alright. Tweet us your thoughts on coupon engines. We'd love to hear it at syntaxfm.
Scott Tolinski
for a full archive of all of our shows,
Can't prevent coupons from being shared
Scott Tolinski
This, this website, actually, I got a really funny DM the other day. Somebody's like, hey. I, Exactly.
Scott Tolinski
just so you know, you're exposing this paid font in a Repo, and I didn't realize I was exposing a paid font in a repo.
Scott Tolinski
some it. Something like hackers for like, I really wanna get this font. Where can I get it? Oh, check out Scott Kalinski's repo. And I pulled it down, obviously, like, immediately, and I had no idea. But it was like, I don't know. You just how much that stuff you can stop. If if it if it's out there, people are gonna people are gonna post it. You can have
Scott Tolinski
Like, I'm not, like, trying to be, like, oh, blah. But I don't I guess I don't care if they get posted to that stuff because I don't know how much you can stop because it does take it just straight out of the cart for us because we do have a cart, l o g r o c k e t. Love spelling things on syntax here. LogRocket,
Coupon constraints like dollar or percentage discounts
Scott Tolinski
And ours is just a checkbox. Like, the checkboxes is percent discount. So if you type in 10, and then create the same coupon in our database
Wes Bos
$10 off, And there is just, like, all kinds of people on TikTok buying 1,000 of dollars worth of code Oh, that's funny. Of of clothes. And then, like, Abercrombie, when I had rolled out parity purchasing power, that was not something that Stripe offered at all. So it was just like, okay. You gotta you gotta build this thing yourself. So, and maybe some other information that is associated with that slice. And then once you've got these different types of slices, you can bring I'm in,
Scott Tolinski
recurring Yeah. Payments.
Scott Tolinski
or a subscription.
Allowing only one coupon per order
Wes Bos
It is a little bit annoying sometimes when somebody and, like, something else. You know, like, you could do you could chain them together, and that gets a really, really I I deal with this in my email software a lot 2 when I'm making complex rules, Like,
Wes Bos
wants to use a coupon, but they are also a student, You wanted to give a $10 off coupon It's good for Yeah. Yeah. So that's good. Let's talk about chaining the rules together.
Wes Bos
and they want to Stack those together. I currently don't have an option for that because the student discount is very generous. So in most cases, I say just use whichever one is better. For us, a student discount is actually like a different space than a coupon.
Supporting multiple payment methods requires custom coupon logic
Wes Bos
Or is it a flat dollar amount? So you have a coupon, do spelling mistakes.
Wes Bos
then limiting myself dash
Wes Bos
the key. And then in the object, it had all the information that we're gonna be talking about. Since it's been moved to a database, 20% off of a $40,000
Wes Bos
An object, but it would be nice to people could buy 3 products at once, 3 courses at once. Right? So you when you're building Coupon IG, you need to know, like, does this Is this coupon restricted to a specific product, or can it be used on the entire cart? Is it 20% off a product or 20% everything that you put inside of the cart oh yeah yeah those are all tricky things because we we would just do
Wes Bos
And at the time, But instead of creating in your application that whatever it is that you're using to to consume the API and build it out, it Works really good. I used it myself on a website about 6 months ago, And that way, you can still give the person who referred coupon.
Wes Bos
When you create a coupon,
Wes Bos
Stripe if I if I move any logic into Stripe, Another thing I do is trying to chase around and and enforce that because at the end of the day, your your time is better spent making content In in furthering your business rather than trying to
Wes Bos
from other things like PayPal or crypto or any other payment methods that I wanna use.
Wes Bos
and is that a percentage, Valid or deactivated
Layering custom coupon logic on top of payment provider functionality
Scott Tolinski
we have to create a coupon in Braintree's dashboard
Scott Tolinski
we we are ours is kind of it's like a layer in front of Braintree.
Scott Tolinski
so that our site can, you know, control it just a little bit more than what Braintree's offering
Scott Tolinski
in terms of just like a straight up discount percentage or discount
Wes Bos
Oh, yeah. Yeah. I so And you could just make multiple coupons, but if you need to make 100 of them, I built my own coupon engine, and there's a lot that surprisingly goes into it. And I thought we would just kinda go through set it. And and that way, you can also just blow the coupon out of the water and and start back at 0 if you wanna 30 people. Conference attendants.
Complex conditional logic is difficult to manage
Wes Bos
before somebody buys something, the the first thing they do is they just Google West Boss coupon code. Yep. Yep. And then They'll go to the website and, like, it's it's kind of like a ingenuous
Wes Bos
like, if I have somebody on the website ready to buy, but, like, you know, somewhere there's a freaking poor developer
Wes Bos
Oh, another thing with the affiliate is, So yeah. Yeah.
Wes Bos
because what I find is that Everything at Abercrombie.
Wes Bos
the fact that it was an affiliate. So I tell my affiliate, you can't just, like, Like, you can you can give it in your email or whatever, but don't put them on, like like, retail me not or something like that or, like, your own personal blog because then
Scott Tolinski
You're getting affiliates for, like, nothing really. Yeah. I I I don't say this to be cool, but I don't really care.
Stacking student discounts with coupons
Scott Tolinski
able to be applied to that. But, yeah, likewise, we only have 1 coupon per order, but, I guess that that sales and discounts is a little different for us. Yeah, totally.
Scott Tolinski
is its own subscription key. So the the student subscription is its own key in its own thing,
Scott Tolinski
that exists, and we just don't have our coupons Coupon engines. Complicated. Lots of if statements. Lots of ifs. If coupon equals this coupon. Give discount.
Scott Tolinski
So, like, the student discount for us
Unique coupon codes to track attribution
Wes Bos
if you need to be able to track, like, okay, and $10 off with this code, products within there. So I built mine where you can restrict it to either an entire course Easter is over or until the New Year, right, you can you can disable those. I have a
Wes Bos
let's call it Reactathon. You could say, like, Reactathon 10
Wes Bos
And then you can use the additional stuff after the dash as a unique identifier this is one thing I don't have to necessarily do because I don't have a concept of a cart just yet. I will be rewriting my checkout, but,
Wes Bos
This 1 talk brought in 6 sales, whereas the other talk brought in none.
Wes Bos
a, b, c 123. Mhmm. And that that dash, you can you can infer the details of the coupon from the first bit of that coupon, For that. But if you have a, That coupon will have a bunch of metadata and what I'm gonna call constraints Mhmm.
Wes Bos
you can just make, like, and I really, really like that approach. So check it out it for yourself. Prismic.
Constraints around allowing coupons on products or subscriptions
Scott Tolinski
can only be used on the annual subscription.
Scott Tolinski
an annual subscription. Can it only be used on an annual subscription? So, like, for for instance, the syntax, These services, these apps, we just push them out to the public. People use them and they try them. And maybe 90% of the time, you'll never Understand if a user hit a problem or why they hit a problem or where they hit slowness. But now you can understand all of that and more with LogRocket's
Wes Bos
they can be You can chain them together. People have built entire UIs, Then and then they just go and look for a coupon code, and it makes you click the link, and then it and then it tags that sale as their affiliate. It's not really their affiliate. All they did was just, like, SEO game, The ideas behind building a coupon engine and the ones that we've built ourselves.
Scott Tolinski
Can be used on an individual or a yearly
Wes Bos
Yeah. It's it. This is where it starts to get a little ego a little bit bug eye because you're like, Oh, man. That's logicky. Yeah. There's a lot into it. So my constraints that I have on mine are, It's just a component I tell my affiliates not to put the coupons
Wes Bos
And then every single product has r f b 1, r f b 2, r f b 3, etcetera, etcetera. And there's all kinds of different, is good error messages if something is expired.
Wes Bos
Constrained to a specific
Wes Bos
course or product. So the way that I do courses and products in mine is a course is React for beginners, in JavaScript where the the coupon itself was was the
Simplify coupon format for usability
Scott Tolinski
underscores.
Scott Tolinski
No. Thank you. If it's syntax 30, do just syntax And they're like, your your your repo has been, like, posted on You know, what we do is we just end up having referral accounts, and then we give it. Our affiliates
Scott Tolinski
users will type so do it 2 ways. Normalize the input. Ain't nobody wanna have to worry about if the first letter is capitalized by their phone's keyboard on the coupon thing. Right? So in the UI, have that be normalized to all caps or all lowercase, whatever. So they can't even type in something that's not. But, also, before you check to see if the coupon exists server side, it. Just run that thing to all lowercase or all uppercase. Make sure your ones in the database are the same. Make sure they're all the same. People will goof that up left and right. And, likewise, don't try to get fancy with 2 word stuff, hyphens, syntax.
Scott Tolinski
because even, like, sub type of subscriptions? Punch Drunk Glove with Adam Sandler is like an,
Applying coupons automatically via URL
Scott Tolinski
query parameter being passed into the URL, you Drop it in as a cookie, and maybe that cookie could be used to apply some sort of automatic discount.
Wes Bos
We don't do it, but seems cool. It's something I probably will do as part of my checkout because just make it as easy as possible for the user. Yeah. I've I've run into that many times. Just make it as nice and clean as you possibly can.
Wes Bos
And then it wouldn't get applied. And it's like it's a simple just trim it.
Wes Bos
Or like the thing a problem I had many years ago is people would copy paste it, but they have a space in the front of it, I don't know. Half off, but only new customers. You know, a lot of times to do it in that regard where it just starts with the coupon and then the rest of it is metadata. Yeah. Very clever. It. Very special match, actually. Yeah. Automatically apply coupons. This is, like, I don't do. I'm curious if you do it. So if you wanted to sorry. I was just thinking about, like, the affiliate link stuff that we are talking about. This would be a good use case for that if they had an affiliate link and they used a Safeguards in place, in your your coupon engine, you you make something. And for the longest time, my coupons were simply just a coupon code syntax.
Scott Tolinski
a
Focus time on business not anti-piracy
Scott Tolinski
you're not gonna win that game ever. Yeah. You're going to end up like Metallica. Totally.
Wes Bos
to So, We are sponsored by 3 awesome companies or 2 awesome companies today, Prismic and LogRocket. Let me tell you about Prismic. Prismic is of $30. You know, that that's that's both. Right? It's percentage based, but it's also, Being like like you just lost the company because What else do we have? Affiliates?
Wes Bos
you can do, Any of the starters that you wanna use, whether using React or Vue or Svelte or whatever. Thank you, Prismic, for sponsoring.
Wes Bos
it. Like tracking coupons, which is kinda interesting where,
Wes Bos
just protect it. You know? It's it's it's
Restricting country-specific coupons to those countries
Wes Bos
or they have to have a friend buy it Who's who's in the UK, but they wanna they're back in the they have to use their friend's credit card. You know? Like, there's some, like, messiness around that. So I have a little bit of logic around being able making sure that that works and is not kind of annoying.
Inferring metadata from coupon code format
Wes Bos
It's kind of nice to be able to,
Transcript
Announcer
Open wide dev fans, get ready to stuff your face with JavaScript, CSS, node modules, barbecue tips, get workflows, breakdancing, soft skill, web development, the hastiest,
Announcer
Monday. Monday. Monday.
Announcer
the craziest,
Announcer
the tastiest web development treats coming again hot. Here is Wes, Barracuda,
Restricting coupons to certain countries
Wes Bos
I also do countries valid So I can I don't do that? Offer up a coupon and restrict it to certain countries. And that was important, that's really helpful because the last thing you want to do is make your
Wes Bos
specifically because in Iran, Telling them
Applying discounts to cart total vs individual items
Scott Tolinski
car. Yeah. You don't wanna be able to get someone use a coupon code military or something like that. I had a I had a coupon, though. Don't I get, like, you know, 5 grand off or whatever? Yeah. Yeah.
Deactivating coupons to stop abuse
Wes Bos
And and sometimes that's fine. Sometimes it's like, no. That coupon was just meant for you. I made that up I made that up real quick just for you.
Wes Bos
So in that case, I used to not have the concept of redeems as well. So in in this case, I can do, like, a single use coupon, which is really nice.
Using referral URLs to apply automatic coupons
Wes Bos
credit, and then it's it's also done via word-of-mouth. You know who does that? Is Like, a 1000 podcast sponsors.
Wes Bos
You need to like we talked about the restrictions.
Limiting number of coupon redemptions
Scott Tolinski
on that coupon by 1, you include that data on the coupon itself in the in the database table? Yeah. Yeah. It's right on. You could also
Wes Bos
Just call that info up from the database. Mhmm.
Trim whitespace and normalize capitalization
Scott Tolinski
Okay. Let's talk about some other little tips here. I have some Some quick tips, especially if you're building this thing yourself. Normalize to upper or lowercase, that'd be a good name for a framework, actually.
Wes Bos
free ship is the big one or, like,
Wes Bos
as I can see what coupons people try unsuccessfully, Yeah. Conference attendants. And every single person gets their own unique 1, where you just sign up and start creating your content types. It's awesome. So they I don't do any of the coupon stuff instead of Stripe. I do it all in my own course platform. Nice. So let's talk about coupons first.
Wes Bos
West Boss or love you or something like that. Like, what people type into the you know, I do it all the time. I whenever I'm checking out, I'm like, alright. Let's try a free ship or let's try, or the customer's email address ends in
New vs existing customer coupons
Wes Bos
people wanna do that inside of their products. So that's something to think about as well. Yeah. We don't do any of that either.