Raffle Ticket Generator Plugin Case Study
Raffle Ticket Generator
Many, many years ago a customer called us with a problem that many other web developers were unable to understand. They were a non profit charity that was doing a (large) charity raffle. Over the years, the majority of the raffles were always in person but more and more people no longer carry money, in the form of cash or check. So they wanted people to be able to purchase raffle tickets online. A previous web developer built them a simple eCommerce site that would put the amount of tickets into the database. From a web designer point of view that’s all that is needed. The number of entries along with the customer information and from there a winner can be selected by randomly selecting the row of the table/spreadsheet.
The problem was that customers expect a raffle ticket with a number. For those of us that are older, we are used to having that number. So what was happening was people were paying for their raffle ticket they would get an e-mail that said you have X number of entries but there was no ticket number. The customers would call and e-mail the charity wanting to know what their ticket number was. For us, this made total sense and we looked into providing a solution. When monitoring the website and the customer support emails, along with the purchase trends, we were able to provide the customer with a solution that would significantly increase ticket sales and raise more funds for their charity.
While the original site was simply a one off at the time, more and more organizations contacted us to see if we would build them a raffle ticket generator website with similar features and functionality. This leads us to a question we get asked about our client privacy and non disclosure practice. We always work with our customers so that we are not building competing solutions. In this case, our relationship with the client was that we would not build something similar for a few years. So we honored that, and a year or two later, we built a few more one off sites raffle sites for customers. A few years after that, we built the Raffle Ticket Generator plugin to make a solution available to other web developers. We realize every client is different and has different wishes and we are happy to work with the clients so that can feel comfortable working with us. We have many clients who have been our customers going back to the 1990s.
Since the number one eCommerce solution is Woo-commerce, we created the first Raffle Ticket Generator plugin for online charity raffles and based it on an add-on to WordPress and Woo-commerce.
The requirements various customers asked for:
Allow for Ticket Packages such as 1 for $10, 3 for $25 or 8 for $50.
Create multiple raffles at the same or different times
Have the raffle turn on and off at specified times
Have ability to identify easily which ticket number is for which raffle
Find an order easily with a raffle ticket number
Have ticket numbers assigned with no missing numbers if tickets are refunded, etc.
Perform a digital random drawing with the ability to have alternates chosen in case an entrant is ineligible per the rules
The Solution:
We utilized the popular WordPress eCommerce solution Woo-commerce features and created a plugin to be an add-on to Woo-commerce. Woo-commerce has many short-codes and options along with hooks for integrating into it.
We used the Category system in Woo-commerce to assign a “Raffle” to a category and then each ticket package is a Woo product within that category. All ticket numbers generated with a product sale are stored in the database with that category/raffle. The website admin can set the various features for each raffle category including the ticket number format. The starting number can be chosen and a Prefix and Designator can be added. For those customer that would call with “did I win” question and have no idea what raffle they entered the ticket number would have their ordered along with the prefix etc that can help identify the raffle category.
A few examples of ticket formats:
2874-JULY4-49213 (OrderID is 2874, the JULY4 raffle and ticket number of 49213)
2926-Suzuki-Power-1204 (OrderID is 2926, The Suzuki Power raffle and ticket 1204)
Ball-12206 (Ball Drop Raffle – ticket 12206)
There are a wide variety of ticket formats available depending on what the customer needs.
Tickets need to be generated for PAID orders. Woo-commerce has payment status hooks that have triggers. So when a product is ordered, and payment is made the payment status is indicated. Our plugin looks for that trigger, we see the order is paid so the ticket number is then written to the database as paid. If the order is cancelled or payment is declined, the ticket number is not marked as paid and entered into the drawing.
Which brings us to the next challenge – successive numbers. Woo-commerce will have orders that will not complete for whatever reason. It may be someone adds to cart but doesn’t check out, or the payment is declined. The process is that tickets are “generated” or “reserved when purchased but only saved to the table when paid. Or when an order is refunded, those tickets are deleted from the table. There are an unlimited types of raffles. Some use numbered items for picking the winner, such as the ball drop, where thousands of golf balls are numbered and then released from a crane or helicopter and the one closest to the pin or in the hole is the winner. There are duck races where numbered ducks are released into a river and the first duck across the finish line is the winner. In these situations, you cannot be missing any numbers because it would be possible for a ticket to not be assigned to the winning choice. We built an option to track the numbers as they are generated and any missing numbers become the next number assigned. If an order is refunded prior to the raffle ending, the next order will get the refunded numbers.
For the start and stop capabilities, we built a feature that uses the WordPress timezone to identify the timezone for the start and stop times. The customer enters the start time and stop time and tickets become available for purchase at the designated time. We included configurable countdown timers so that users can see that the raffle will start in xx minutes, or that it ends in yy days, etc.
Over the years we have added and improved on many features that the customers have asked for. Tens of Thousands of organizations use our Raffle Ticket Generator plugin to raise funds for their charities worldwide.