> ## Documentation Index
> Fetch the complete documentation index at: https://help.lobyco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Draw lottery winners

> Draw, check and approve the winners of a lottery challenge once it has ended.

This page helps you draw the winners of a lottery challenge after it ends, check them and approve them. A lottery challenge doesn't reward customers as they complete it. Coupon and bonus rewards only reach the winners once you approve them.

> [!NOTE]
>
> The **Lottery** tab only shows on a challenge whose **Select reward types** is **Global Lottery** or **Local Lottery**. A tiered challenge can't be a lottery, so it never has this tab.

## Draw the winners

You can only draw winners once a published challenge's end date has passed and it shows as **Expired**. Until then, **Draw winners** is greyed out. There's no deadline for the draw itself, and you can draw after the challenge's campaign has ended. A coupon reward still expires on its **Redemption expire date**, so draw and approve before then. See [Approve the winners](#approve-the-winners).

1. Open the challenge from its campaign.
2. Select **Lottery**, beside **Details** at the top of the challenge.
3. Select **Draw winners**. The dialog opens on an **Overview** of the draw, with these figures:

| Field | What it tells you |
| - | - |
| **Stores selected** | How many stores recorded progress on the challenge, on a completed card or not. Lobyco updates it once a day, so on the day the challenge ends it can be a little behind. |
| **Custom rewards** | How many custom rewards there are to hand out. In a local lottery, the **Total rewards** you set on each reward counts per store, so this is the total across all stores. It only shows when the challenge has custom rewards. |
| **Total rewards** | How many prizes there are in the lottery, of every kind. In a local lottery, the **Total rewards** you set on each reward counts per store, so this is the total across all stores. For example, 10 rewards in 20 stores is 200 prizes. |
| **Number of participants** | How many customers activated the challenge, including those who never completed a card. Only completed cards are entries in the draw. |

4. If the challenge has custom rewards, which are prizes you deliver yourself outside the app, enter how many **Back-up winners** you want. In a local lottery, the field is called **Back-up winners per store**. You can enter zero.
5. Select **Draw winners** in the dialog.

The draw picks one winner for each prize, so the **Total rewards** you set on each reward add up to the number of winners. Who is in the draw:

* **Each completed card is one entry.** A customer who completed a [renewable challenge](/business-documentation/activities/challenges/accumulation-types#one-time-or-renewable) several times has more chances to win.
* **Only cards from this challenge count.** You can't draw from customers who completed a different challenge.
* **A customer wins once per lottery.** In a local lottery, they have an entry in every store where their card collected progress, but they can only win in one of them.
* **You can't choose which winner gets which prize.**
* **Prizes can go unawarded.** If fewer customers qualify than there are prizes, everyone who qualifies wins and the rest go unawarded.

Backup winners are there for a custom reward you can't deliver to a main winner. That's why the **Back-up winners** field only shows when the challenge has at least one custom reward. Coupon and bonus rewards go straight to a winner's account, so a backup winner has nothing to step in for. The **Custom rewards** figure in the dialog is how many of those prizes there are, so it's a good guide to how many backups to draw. Backup winners are drawn after the main winners, and they have no reward assigned. They're a reserve list. If you can't deliver a custom reward to a main winner, give it to a backup winner and contact them yourself. Use **Replace member** instead when a winner isn't allowed to win at all, because it draws a new winner into the same place and prize.

![The Draw winners dialog, open over the Lottery tab of an ended global lottery test challenge called Autumn prize draw, which says 0 users participated in the challenge above its own Draw winners button. The dialog has a close cross in its top-right corner. Under Overview, a grey panel lists Stores selected 0, Custom rewards 2, Total rewards 2 and Number of participants 0. Below it, Back-up winners explains that backup winners make sure custom rewards are handed out if any remain after the main winners are picked, over an empty field. Draw winners sits at the bottom right.](https://mintcdn.com/lobyco-4c9fb3ad/rG971_5ZfS49bcjM/images/challenges-04-draw-winners-dialog.png?fit=max\&auto=format\&n=rG971_5ZfS49bcjM\&q=85\&s=8cd49eb5b24b78e13cb5c557da12b893)

*The Draw winners dialog, before the draw*

## How a local lottery picks winners

A local lottery draws one store at a time. Each store gets the prizes you set per reward. Its winners come from customers whose completed card collected progress in that store.

* **The busiest store goes first.** Lobyco draws the stores in order of how many purchases counted on completed cards there.
* **A customer wins once.** Someone who wins in one store is left out of every store drawn after it. That's why the order matters to a customer who shopped in several stores.
* **A store can come up short.** A store with fewer qualifying customers than prizes gets fewer winners. A store where nobody completed a card gets none, even though **Stores selected** counts it. So **Total rewards** is the most the draw can give out.
* **Backups come last.** Once every store has its winners, Lobyco draws the backup winners store by store in the same way, counting only customers who haven't won yet.

For example, take a local lottery in three stores. Each store has two reward lines, 1 iPhone and 2 T-shirts, so 3 prizes per store. Every prize is a custom reward. You ask for 2 backup winners per store. Every store has at least five customers who haven't won elsewhere. The dialog shows **Stores selected** 3, and **Custom rewards** and **Total rewards** are both 9. The draw then gives 15 winners:

| Reward | In each store | In all three stores |
| - | - | - |
| iPhone | 1 | 3 |
| T-shirt | 2 | 6 |
| Backup winner, with no reward | 2 | 6 |

## Check the winners

The **Winners** tab lists everyone who was drawn.

| Column | What it shows |
| - | - |
| **Winner ID** | The order the winner was drawn in. |
| **Member id** | The customer who won. |
| **Win date** | When the customer completed the card that won. |
| **Draw date** | When the draw ran. |
| **Reward title** and **Reward id** | The prize this winner gets. |
| **Store** | In a local lottery, the store the customer won in. In a global lottery, one of the stores where the winning card collected progress. Which store it shows doesn't affect the prize. |

Backup winners have a **Backup** badge. To list only them, tick **Backup winners**. To find one customer, use **Search for member ID**.

![The Lottery tab of an ended global lottery test challenge called Global Lottery challenge 0310, shown beside its Details tab, after a draw that has been approved. The Winners (8) tab is selected, next to Removed winners (1). A Search for member ID field sits on the left, with a Backup winners(3) tick box under it. Export is active, while Re-draw all and Approve winners are greyed out because the draw is approved. The table has the columns Winner ID, Member id, Win date, Draw date, Reward title, Reward id and Store, and eight rows of test members. Two won a coupon reward whose title is blurred, one won the custom reward Car and two won the custom reward Microwave. The last three rows have no reward and carry a Backup badge. No row has a ⋯ menu, because the draw is approved. The paginator reads 1 — 8 of 8.](https://mintcdn.com/lobyco-4c9fb3ad/rG971_5ZfS49bcjM/images/challenges-05-winners-tab.png?fit=max\&auto=format\&n=rG971_5ZfS49bcjM\&q=85\&s=5696862effc353895641b1e34c873688)

*The Winners tab after an approved draw*

## Replace a winner who can't take part

Remove a winner who isn't allowed to win, such as an employee the lottery's rules exclude.

1. Open the **⋯** menu on the winner's row and select **Replace member**.
2. Enter the reason in **Specify reason**. It's required. Lobyco keeps it with the removed winner, so write something a colleague could understand later.
3. Select **Draw new winner**.

Lobyco Nexus draws a new winner at random. The new winner takes over the removed winner's place and prize. If there's no eligible customer to draw, Nexus removes the winner anyway and leaves the place empty. In a local lottery, the new winner has to come from the removed winner's store. In a global lottery, the new winner can come from any store. Customers who were already drawn or removed are never eligible.

The removed customer moves to the **Removed winners** tab, with your reason under **Comment**. They can't be drawn again in this lottery, not even with **Re-draw all**.

## Re-draw, if you need to

**Re-draw all** runs the whole draw again, in the same dialog. Use it to change the number of backup winners, for example. It replaces the current list of winners. Customers you removed stay out of the draw.

## Approve the winners

Select **Approve winners**, then select **Continue** to confirm.

> [!WARNING]
>
> Approving is final. You can't re-draw or replace anyone afterwards.

When you approve, coupon and bonus rewards go to the winners' accounts. **Re-draw all** and **Approve winners** are greyed out, and the **⋯** menu with **Replace member** disappears from the rows. That's how you know the draw is approved.

Approving issues each coupon at that moment. A coupon isn't issued if its **Redemption expire date** has already passed, or if its offer has already ended. The winner stays on the list but gets no coupon. If you set **Validity period of redemption** instead of a date, the coupon expires that many days after you approve, and it isn't issued if that falls after the offer's end. So approve before the earliest of those dates. With a validity period, approve at least that many days before the offer ends.

Nexus doesn't warn you when a coupon isn't issued. To check that a winner got theirs, search for them under **Member management → Members** and open their **Coupons** tab. Bonus rewards are always added, even after the **Redemption expire date**, but the bonus then carries an expiry date that has already passed. So approve before that date for bonus rewards too.

Nexus doesn't contact custom reward winners. That's up to you. [Export the winners](#export-the-winners) to get the list.

## Export the winners

Select **Export** to download the winners as a CSV file. You can do this before or after you approve. The file has a row for every winner on the **Winners** tab, backup winners included. Removed winners aren't in it.

Use it to hand out custom rewards, to contact winners, or to give winners points in another system. The file has no names or contact details. To contact a winner, search for their ID under **Member management → Members**.

The columns, in the order the file has them:

| Column | What it holds |
| - | - |
| **Id** | The winner's number, counting from 1. It's the same as **Winner ID** on the **Winners** tab. |
| **ActivityId** | The challenge's ID. It's the one shown at the top of **Activity details**. |
| **MemberId** | The customer who won. |
| **StoreId** | In a local lottery, the store the customer won in. In a global lottery, one of the stores where the winning card collected progress. It's the same as **Store** on the **Winners** tab. |
| **ReceiptId** | The ID of a purchase that counted towards the winning card. |
| **ChallengeCompletionDate** | When the customer completed the winning card. It's the same as **Win date**. |
| **LotteryDrawDate** | When the winner was drawn. It's the same as **Draw date**. For a winner who replaced someone, it's the day of the replacement. |
| **CardId** | The ID of the winning [card](/business-documentation/activities/challenges). It's the same **CardId** as in the [challenge report](/business-documentation/activities/challenges/challenge-report), so you can look up the card's purchases there. |
| **RewardId** | The reward's ID in Lobyco. It's the same as **Reward id**. It's empty for a backup winner. |
| **RewardTitle** | The reward's name. It's the same as **Reward title**. It's empty for a backup winner. |
| **IsBackup** | *True* for a backup winner and *False* for a main winner. |

Main winners come first in the file, then the backup winners.

## Troubleshooting

> **Why is Draw winners greyed out?**
>
> The challenge isn't **Expired**. You can only draw winners once a published challenge passes its end date and becomes **Expired**. A draft never becomes **Expired**. Disabling a challenge sends it back to draft, so a disabled lottery challenge that has ended can't be drawn until you publish it again.
>
> While its campaign is still running, you can get the draw back:
>
> 1. Open the challenge from its campaign.
> 2. Move **End date** to the nearest time you can, because customers keep adding entries until then. It has to stay inside the campaign's dates.
> 3. If the challenge has a **Redemption expire date** before the new end date, move that too.
> 4. Select **Publish**.
>
> Customers keep their completed cards, so every earlier entry still counts. The challenge is live again until the new end date. Once that date passes, the challenge shows as **Expired**, and you can draw the winners.
>
> This only works while the challenge's coupon offers are still running. Its **End date** and **Redemption expire date** can't go past the end of the earliest coupon offer it gives as a reward. If that offer has already ended, contact Lobyco support instead.

## Related

* [Create a challenge](/business-documentation/activities/challenges/create-a-challenge) — setting up a lottery and its rewards, on the **Settings** tab.
* [Challenges](/business-documentation/activities/challenges) — how cards turn into lottery entries.
* [Accumulation types](/business-documentation/activities/challenges/accumulation-types) — renewable challenges, and why they give customers more entries.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.