Help

Re: Assigning unique coupon codes to records

4733 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Sophie_Mona_Pag
5 - Automation Enthusiast
5 - Automation Enthusiast

Dear community, someone asked a similar question but the topic has been archived with no replies.

My problem is that I have made a table with 10K records made of 4 letters coupons (promo codes) in the primary field. Another column is made of emails linked to another table with my users (Master table). I’d need for unused coupons/records to be picked and assigned to one user each time they join us with a certain status.

I am wondering if I would need an automation (from Zapier or Airtable) or a script to achieve this.

Thanks in advance!

3 Replies 3
Adrian_Head
6 - Interface Innovator
6 - Interface Innovator

Hi @Sophie_Mona_Pages ,

It’s a bit of a hack, but I have a similar kind of workflow and this is how I deal with it.

  1. Create a column in your coupon code base with a formula that just has the string “Coupon Code” inside it (yes include the quotes in the formula field). This should result in every cell in this column displaying the the text “Coupon Code”. Call this column “Zapier Search Column”

  2. Create a view in your coupon code table that is filtered so that the link column connected to your users table “does not exist” or “is empty” (i don’t remember the verbiage right now). Name this view “Available Coupon Codes”

  3. Create a zapier with the following steps:

    • Zap Step 1: Zapier looks for newly added user record (or new record in view)

    • Zap Step 2: Zapier searches “Available Coupon Code” View using the “Zapier Search Column” Column.

      • Your Search text should be “Coupon Code” (to match the formula you created in the airtable column).

      • NOTE: When you test this step you are only going to get a single result even though technically everything in the view matches your search – this is because zapier is not smart enough to return multiple results and basically displays the first match it finds. Because your entire view is filtered so that any of your used coupons will not show up, whatever coupon record the search does return won’t conflict with any previously assigned coupons.

    • Zap Step 3: Edit the record from the first step. Put the record ID found in the search step (for the coupon) as the input of the field which is linking your User Table to your Coupon Table.
      This basically create

      • This will assign the found coupon to your new user and simultaneously filter the used coupon code out of the “available” view taking it out of circulation when users are being added in the future.

Wrote this up super quickly so, let me know if you have any questions!

Thanks a lot Adrian! That’s super helpful :slightly_smiling_face:

Greg_Olts
4 - Data Explorer
4 - Data Explorer

It seems to me that, yes, you need a script, but I’m not sure. Did you know that often a promo code for a discount is issued with the condition of fulfilling any conditions? I rarely want to fulfill them, so I’m looking for more good and easy-to-use coupons. Most often, I find them here https://www.dontpayfull.com. Marketplaces, working online, try to reach the widest possible audience of buyers. Therefore, they develop special discount programs that allow customers to shop with significant savings. Such offers become especially relevant before important events.