Promotional Codes

Hi! I would like to have promotional codes in my bubble app! Is it possible?
For example:
If I type in “Popup Promotions” “ZTHT5yD” the user should have, for example, premium on my app.
Appreciate any help and stay safe!

Absolutely possible!

Just riffing here with a basic approach that I’d take:

Create a table/thing called Promo Code

A Promo Code could have some fields like:
-promo_code (the actual code)
-promo_title (what you’re calling this promo code, displayed to the user once they’ve entered the correct code; like “25% Memorial Day Sale”)
-promo_percentage (the percentage the code takes off from the total; like .15 for a 15% off promo)

So, a Promo Code could look like:
promo_title: “Memorial Day Sale”
promo_code: “memorialday2020”
promo_percentage: .15

For the user-facing side you’ll have a promo code input along with a submit button/icon (or whatever cool UI you have in mind)

When the user submits a code you can do something like this:

  1. If search Promo Codes with matching promo code count > 0: apply that promo code’s promo_percentage as a discount amount to the checkout total. Display a success alert to the user and apply the necessary discount.
  2. If count = 0; alert the user that no promo code exists matching this code

This is a very basic implementation and you could incorporate all kinds of cool add-on features to your promo code tool like:
minimum order amount
fixed number discounts (be careful here, have some safeguards to prevent negative totals for instance)
expiration dates or spans of dates that are eligible for the promo code
You could have the promo code work on specific line items or universally for the entire order, etc

Promo codes are super-cool to brainstorm and implement and they’re super-easy to build with bubble once you’ve mapped out your plan!


Thank you so much! But, how can I do that in the workflow? I’m really new at bubble.