All docs
Drawing Winners
Manual Draw (Live or Early)
Draw a competition manually from the admin — useful for live-streamed draws or when ticket sell-out triggers an early close.
Manual draws give you full control over when the winner is picked. From your raffle admin, the “Draw winner” button on a competition’s detail page picks a random paid ticket, records the winner, and (when notifications are enabled) emails + SMSes the customer. Today this is how every draw fires on the platform — see Auto Draw for the upcoming cron-based variant.
Where the button lives
Raffle admin → Competitions→ click any competition. The detail page header shows Draw winner once the competition is active or ended. Click once and the draw fires server-side. No undo — the random ticket is committed to the draw_results table the moment you click.
What the server actually does
- Loads all
ticketsrows for the competition (paid + free entries together — equal-chance pool). - Picks a random row via JavaScript’s
Math.random()(server-side — never the client). - Inserts a
draw_resultsrow withdraw_method = 'manual', the winning ticket number, and the total tickets in the draw. - Inserts a
winnersrow tied to the winning user, withwin_type = 'draw'. - Marks the competition
status = 'drawn'so the storefront stops accepting purchases and the public page renders the winner banner.
Live-draw workflow
A common pattern for Instagram or TikTok Live draws:
- Pre-stream: confirm the competition is still
activeand has reached its end date. - Open the admin in one browser tab; open the public competition page in a second tab — this is the one your camera shows.
- Build hype on stream. Click Draw winner in the admin tab. The page reloads showing the winner.
- Switch to the public tab and refresh — the winner’s display name + ticket number appear in the page’s drawn banner.
Notifying the winner
If you have Resend + Twilio configured under /admin/integrations, the winner gets an email + SMS within seconds. The templates use your brand name and your resend_from_emailaddress. If integrations aren’t configured, no notification fires — drop the customer an email manually from the winner detail page in the admin.
Re-drawing after a no-show
If the original winner doesn’t respond within your T&Cs grace period (typically 14 days), open the winner detail page, mark the payout status refused, then re-click Draw winner on the competition page — it picks a new random ticket excluding any already drawn.
Related: Managing Payouts.
