Looking for a solution - generating 'raffle ticket' numbers

Hey all! I’m creating a simple raffle ticket app in Paperform.

I’m looking for a solution to generate the raffle ticket numbers. I’ve made a calculation in the Paperform to return the total number of tickets purchased, and now I would like to take that number and generate a unique 5 digit number for each ticket.

I’m going to be setting up custom emails to send to each purchaser to deliver the unique ticket numbers, so I wanted to ask if any of you have ideas as to how to do this/what is the best way to do this?



I’m not sure whether it’s possible to do what you want in Paperform but I’m curious how you made it calculate the total number of tickets sold.

Would you mind sharing the calculation? :slightly_smiling_face:

Hey Laszlo!

No problem, I can share the calculation.

There is a function in Paperform for when you are using a Product question - it allows you to return the quantity of a specific SKU ordered. In my case, I have the product question set up with 3 individual SKU’s so that I can give volume discounts on raffle tickets sold ($1 per ticket, but 6 tickets for $5 and 15 tickets for $10), so the three ‘products’ are 1 Ticket, 6 Tickets, and 15 Tickets.

The generic formula for this product function is:

{{ uniqueidcode.quantities.SKU }}
(where uniqueidcode is the 5 digit alphanumeric code that Paperform uses to identify a specific question and SKU is the specific SKU of the product in question)

So this will return the number of units of an individual SKU sold after a form is submitted and a payment is made.

In my case, since I have 3 individual SKU’s, and each SKU represents a different number of tickets (SKU1 = 1, SKU2 = 6, SKU3 = 15), in order to return the total number of tickets sold, it just takes a simple multiplication equation that takes into account how many tickets are represented by each SKU:

( {{ uniqueidcode.quantities.SKU1 }} * 1) + ( {{ uniqueidcode.quantities.SKU2 }} * 6) + ( {{ uniqueidcode.quantities.SKU3 }} * 15)

Hope that makes sense!


Thanks, Dr_Hill, it absolutely makes sense.

Log the submission into Google Sheets using Zapier and have one of the actions in Zapier be to generate a random 5-digit number and enter into spreadsheet column:

You can then continue to use Zapier actions to do a Google Sheet lookup for that random number and Gmail send email with that row data.


Hey Cary!

Thanks for the response. I’m realizing that this is going to have to be the way to accomplish the task. I wanted to try and keep it ‘in house’ on the Paperform platform because it technically has all of the functionality to make it work (payment processing, conditional logic, calculation, email notification), but it doesn’t look like the calculation functionality is robust enough to do what you outlined Google Sheets/Zapier can do.

Looks like I’m going to be taking this route! Thanks again.