Draw raffle winners
draw_raffle_winnersUse this when the user wants to draw a raffle winner, pick random winners from ticket numbers or names, or use a raffle number generator with no repeats. Draws winners (and optional alternates) without replacement with a secure random number generator from a range such as 1-500, several sold ranges, or a list of names (a name listed twice has two entries); can exclude numbers and assign prizes in draw order. Returns the ordered winners and a draw log PDF and CSV with time, method, entry count and an entry-list fingerprint. Each call is a new draw, so do not call it again to change a result. Does not sell tickets or take payments, and is not legal advice: raffle rules vary by place.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prizes | No | Prizes in draw order; the first winner gets the first prize. Example: ["TV", "Gift card", "Mug"]. | |
| entries | No | What is in the drum: sold ticket numbers, ranges or names, as a list or pasted lines. Ranges like 1-250 or A-0001 to A-0100 are expanded. A name listed 3 times has 3 entries. Example: "1-250, 301-420" or ["Ava Patel", "Liam Chen", "Ava Patel"]. | |
| exclude | No | Numbers or names to leave out before the draw, e.g. void tickets or earlier winners: "17, 42". | |
| winners | No | How many winners to draw, 1 to 100. Default 1, or the number of prizes when prizes are given. | |
| alternates | No | Backup winners drawn after the winners, in order, for unclaimed prizes. Default 0. | |
| event_name | No | Event name for the draw log, e.g. Spring Gala Raffle. | |
| last_number | No | Instead of entries: the last ticket number of a range, e.g. 500. | |
| first_number | No | Instead of entries: the first ticket number of a range, e.g. 1. | |
| one_prize_per_person | No | With names: skip further entries of someone who already won. Default true. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| method | Yes | ||
| winners | Yes | ||
| warnings | Yes | ||
| downloads | Yes | ||
| alternates | Yes | ||
| entry_type | Yes | ||
| event_name | Yes | ||
| assumptions | Yes | ||
| entry_count | Yes | ||
| drawn_at_utc | Yes | ||
| eligible_count | Yes | ||
| excluded_count | Yes | ||
| drawn_at_new_york | Yes | ||
| entry_fingerprint_sha256 | Yes |