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

# Game

> Games are short, rules-based interactions, such as a spin to reveal a discount or a scratch card. They hold attention and end in an outcome or a reward.

A game is a short, rules-based interaction that ends in an outcome or a reward. A spin to reveal a discount, a scratch card, a pick-one-of-three reveal. It earns a moment of attention and gives the shopper a reason to keep going.

## Anatomy

| Property | What it holds |
| - | - |
| Instructions and rules | What the shopper is told before they play, and the rules that decide the result. |
| Rounds or interactions | The steps of play. A single spin, or several rounds. |
| Progress or scoring | Where the shopper is in the game and how they are doing, where the game keeps score. |
| Outcome and reward | What the shopper gets at the end, such as a discount code, free shipping, or a product reveal, and how it is applied. |

The rules of play are a property of the game. They decide the outcome once the shopper is playing, not whether the game shows. A reward that applies a discount does so through a [Workflow](https://crossword.ai/docs/agents/workflows.md), and a reward that reveals a product shows it as a [product card](https://crossword.ai/docs/components/cards/product-card.md).

## Where it appears

A game never shows on its own. One of these components includes it.

* In the [welcome message](https://crossword.ai/docs/components/conversation/welcome-message.md), for example a spin-to-win offered to every shopper when the widget opens. To show a game only to first-time visitors, put it in a proactive message with a rule.
* In a [proactive message](https://crossword.ai/docs/components/conversation/proactive-message.md), for example to re-engage a shopper who has been idle on a page for a set time. The message's timing and frequency cap keep the game from showing on every visit.
* In the [assistant reply](https://crossword.ai/docs/components/conversation/assistant-reply.md), where the Agent chooses it. The Agent offers it as a next step, for example when a shopper asks whether there is a discount.
* On a page, inside a [content block](https://crossword.ai/docs/components/dynamic/overview.md), for example on a landing page where the reward is a discount, or on a collection page.

## Rules

A game carries no rule. It shows because the welcome message, or a proactive message or page section with a rule, included it, or because the Agent composed it into the assistant reply. The rule that decides whether and when the shopper sees it, and how often, lives on that component, not on the game. The welcome message is the exception: it carries no rule and is global, so every shopper sees what it embeds. Read [Rules](https://crossword.ai/docs/orchestration/rules.md).

## Example

A shopper lands on the home page and opens the widget. The welcome message, the same one every shopper sees, reads "Welcome. Spin for a first-order discount." Under it sits a spin-to-win wheel with six segments, labelled **5% off**, **10% off**, **Free shipping**, **15% off**, **Free socks**, and **Try again**, and a single **Spin** button. After one spin, the wheel stops on **10% off** and the outcome reads "You won 10% off your first order. Code SPIN10 is applied at checkout." with a **Start shopping** button beneath it.

## Related

> [card] [Proactive messages](https://crossword.ai/docs/components/conversation/proactive-message.md)

> [card] [Rules](https://crossword.ai/docs/orchestration/rules.md)

> [card] [Dynamic components](https://crossword.ai/docs/components/dynamic/overview.md)

> [card] [Form](https://crossword.ai/docs/components/interactive/form.md)


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