> ## 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.

# Reward a challenge with a game play

> Connect a challenge to a game on the canvas, so each customer who completes the challenge gets a play, with a coupon to win.

This page shows you how to link a challenge and a game. Customers who complete the challenge get a play of the game, and the game can win them a coupon. You build it on the campaign's orchestration canvas.

## What you'll build

```mermaid theme={"system"}
flowchart TB
    A["Challenge<br/>Shop 3 times"] --> B["Activity event<br/>Completed"]
    B --> C["Game<br/>triggered"]
    C -.-> D["Coupon reward<br/>from a Game offer"]
```

The **Challenge** starts the flow, on its own dates. Each time a customer completes it, the **Activity event** passes that customer on to the **Game**. Because a block connects into it, the game is *triggered*. Only customers the flow passes on get a play. The dotted line is the game's prize, which you pick on the game itself.

## Settings

| Activity or block | What to set here |
| - | - |
| **Offer**, the prize | **Type** **Game**, published, with dates that cover the whole game. |
| **Challenge** | **Store visits** set to 3, **One-time**, so each customer completes it once, and **Custom reward**. |
| **Activity event** | **Completed**. The block sets it for you. |
| **Game** | Connected after the **Activity event** before you first save it. Dates that cover the challenge's dates. One attempt per play, and the prize under **Coupon reward**. |

All the dates have to fall inside the campaign's dates.

## Create the prize

The game's coupon comes from an offer of type **Game**. Create it first, because the game only lists published **Game** offers.

Open the campaign's **List** view and select **Add activity**. On the **Offer** tile, select **From scratch**. Set **Type** to **Game**, and give the offer dates that cover the whole game. Fill in the rest as described in [Create an offer](/business-documentation/activities/offers/create-an-offer), then select **Publish**.

Add it from the **List** view, not the canvas. An **Offer** block on the canvas doesn't offer the **Game** type.

## Add the challenge

Open the **Orchestration** view, in **Design** mode. From **Activity** in the **Block library**, drag a **Challenge** onto the canvas. Double-click it and select **From Scratch**.

Fill in the challenge as described in [Create a challenge](/business-documentation/activities/challenges/create-a-challenge). These settings matter here.

* On **Settings**, under **Accumulation**, pick **Store visits**. Then set **Store visits** under **Earn rules** to 3. That makes it the *Shop 3 times* challenge.
* On **Settings**, under **Specify if the challenge should be one-time or renewable**, pick **One-time**. Each completion gives a play, so a renewable challenge gives a play every time a customer completes it again.
* Under **Activity reward**, keep **Standard** and tick **Custom reward**. It needs nothing more. The game play is the reward, and the flow gives it out.
* On **Segmentation**, choose who can take part, such as **All customers**.

Select **Save**, not **Publish**. You connect it to the next block first.

## Find customers who complete the challenge

From **Trigger**, drag an **Activity event** onto the canvas, and connect the **Challenge** to it. It reads **Completed**, the one event a challenge has.

## Give them a game play

From **Activity**, drag a **Game** onto the canvas. Connect the **Activity event** to it before you open it. A game is only triggered if a block connects into it before its first save. A game you've already saved without the connection can't become triggered later, so start a new game from the canvas instead.

Double-click the **Game** and select **From Scratch**. Fill it in as described in [Create a game](/business-documentation/activities/games/create-a-game). These settings matter here.

* On **Activity details**, give the game a **Start date** on or before the challenge's, and an **End date** on or after the challenge's. Customers who complete the challenge while the game isn't running don't get a play. The **Game** block on the canvas shows a warning when the dates don't cover the challenge.
* On **Activity details**, the **Add triggered details** panel has **Validity period of game**. It's how many days a customer has to use the play. Leave it empty to give them until the game ends. If you set it, end the game at least that many days after the challenge ends, so the last customers to complete it get the full period.
* On **Reward settings**, select **Add reward**, tick **Coupon reward**, and tick the **Game** offer you created. Set its **Max. rewards**, how many of these coupons the game can give out in total, such as 200. It has to be at least 1.
* On **Activity behaviour**, paste the gameplay's **Live URL** into **Game URL**, as [Create a game](/business-documentation/activities/games/create-a-game#set-how-the-game-plays) describes. Set **Attempts per day** and **Total attempts** to 1. Higher numbers don't give a customer more plays. They only play when the flow gives them a play. Set **Allowed wins** to 1, and **Win rate** to how many plays there are for each win, on average, such as 5.
* On **Segmentation**, **Triggered** is selected and locked. The challenge decides who gets a play.

Select **Publish** on the game and confirm. If the game isn't published when a customer completes the challenge, they don't get a play.

![The Orchestration view of the campaign Autumn loyalty journeys, in Design mode, with the Block library and Use templates panels collapsed. Flow 3 runs left to right. First, a Challenge block named Shop 3 times, with the Start tab and a Publish button, status Draft, Start 2026/10/16 00:00, End 2026/11/30 00:00 and Rewards 1. It connects to an Activity event block that reads Challenge Completed. That connects to a Game block named Spin for a coffee, with no Start tab of its own, status Draft, Start 2026/10/16 00:00, End 2026/11/30 13:34 and Rewards 1.](https://mintcdn.com/lobyco-4c9fb3ad/WYxSmfbwe1zr5xYw/images/usecase-34-challenge-to-game-flow.png?fit=max\&auto=format\&n=WYxSmfbwe1zr5xYw\&q=85\&s=475bd68434a6e92171773d4e3d5abe5c)

*The challenge-to-game flow on the canvas*

## Save and publish the challenge

Select **Save** at the top right of the canvas. Then select **Publish** on the **Challenge**, the block with the **Start** tab, and confirm. That publishes the challenge itself. It runs on its own dates, and the flow runs each time a customer completes it.

## Check the result

Use a test customer who can take part.

1. Complete the challenge with the test customer. The game then shows in the app.
2. Open the game and select **Statistics**. Filter **Membership IDs** by the test customer. Their attempt shows, with the coupon in **Reward** if they won.
3. Switch the canvas to **Live stats** to see counts on each block as customers complete the challenge.

If other games are live at the same time, **Game priority** decides which one the app shows first. See [Run two games at once](/business-documentation/use-cases/run-two-games-at-the-same-time).

## Variation: a coupon for customers who lose

To give every customer who loses the game a small coupon, add a second **Activity event** after the **Game**.

```mermaid theme={"system"}
flowchart TB
    A[Challenge] --> B["Activity event<br/>Completed"] --> C[Game] --> D["Activity event<br/>Lost"] --> E["Offer<br/>Gift"]
```

1. Connect the **Game** to a new **Activity event**, and choose **Lost** on the block.
2. Connect it to an **Offer** before you open the offer. Set its **Type** to **Gift**. Because a block connects into the offer, the **Type** list only shows the types a flow can hand out.
3. Fill in the offer, and publish it from its form.

Choose **Won** instead to give winners something more. [Activity event](/business-documentation/campaigns/orchestration-canvas/block-reference#activity-event) describes the events each activity has.

## How the coupons combine

The challenge's reward, the game's prize and your other offers are all offers. When a customer has more than one in the same basket, the same stacking settings decide what applies. [Control how reward coupons stack](/business-documentation/use-cases/control-how-reward-coupons-stack-with-other-offers) works through an example.

## Related

* [Create a challenge](/business-documentation/activities/challenges/create-a-challenge) covers every field on the challenge form.
* [Create a game](/business-documentation/activities/games/create-a-game) covers the game form, including triggered games.
* [Offer types](/business-documentation/activities/offers/offer-types) explains the **Game**, **Challenge** and **Gift** types.
* [Block reference](/business-documentation/campaigns/orchestration-canvas/block-reference#activity-event) describes the **Activity event** block in full.


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