# Implementation Checklist

## Overview

Use this checklist to prepare your Fortune Wheel for launch.

It covers three areas:

* Configuration in the Admin Panel
* Backend integration flow
* Frontend handling and final validation

Use it together with [Creating Fortune Wheels](/main-features/fortune-wheels/creating-fortune-wheels.md), [Managing Fortune Wheels](/main-features/fortune-wheels/managing-fortune-wheels.md), and [How Probability Works](/main-features/fortune-wheels/how-probability-works.md).

{% hint style="warning" %}
Open Loyalty returns wheel data and draw results. Your application is responsible for the wheel UI, animation, and post-spin experience.
{% endhint %}

***

## Recommended implementation flow

{% stepper %}
{% step %}

### Configure the wheel

Create the Fortune Wheel in the Admin Panel.

Make sure you:

* Add all winning and non-winning fields
* Assign correct probability values
* Define visibility, availability, and targeting
* Set redemption and budget limits

If you need help with setup, follow [Creating Fortune Wheels](/main-features/fortune-wheels/creating-fortune-wheels.md).
{% endstep %}

{% step %}

### Render the result in your app

Use `GET /api/{storeCode}/reward/{id}` to load the wheel definition.

Map the returned labels and rules to your visual slices.
{% endstep %}

{% step %}

### Create the spin entry

Call `POST /api/{storeCode}/reward/{reward}/buy`.

This creates a unique redemption entry for a single spin.

Store the returned `issuedRewardId`. You need it for the draw request and result lookup.
{% endstep %}

{% step %}

### Trigger the draw

Call `POST /api/{storeCode}/redemption/{issuedRewardId}/draw`.

This endpoint performs the random draw based on the configured wheel rules.

Each `issuedRewardId` can be drawn only once.
{% endstep %}

{% step %}

### Confirm the prize outcome

Use `GET /redemption/{issuedRewardId}` to load the final redemption details.

After the draw:

* Stop the animation on the returned result
* Show a winning state when effects are present
* Show a "Better luck next time" state when no effect is returned

If the reward grants units, you can also refresh the member wallet view to show the updated balance.
{% endstep %}
{% endstepper %}

***

## Sequence Diagram

**Configuration Phase:**

<figure><img src="/files/PbU85vMZvW8uRrjTVw1p" alt=""><figcaption></figcaption></figure>

**Spin Phase:**

<figure><img src="/files/k3U5GB5MQzE6Jxj5ktzY" alt=""><figcaption></figcaption></figure>

***

## Go-live checklist

### 1. Admin Panel setup

* [ ] The Fortune Wheel is created and saved.
* [ ] Each prize field has a clear label.
* [ ] Winning fields are linked to the correct reward or units effect.
* [ ] Non-winning fields are configured for "no win" outcomes.
* [ ] Total probability across all fields equals `100%`.
* [ ] Visibility and availability are set correctly.
* [ ] Targeting matches the intended audience.
* [ ] Member usage limits are configured.
* [ ] Global limits or budget limits are configured if needed.
* [ ] The wheel is active and ready for use.

### 2. Backend integration

* [ ] Your app calls `POST /api/{storeCode}/reward/{reward}/buy` before each spin.
* [ ] The returned `issuedRewardId` is stored securely.
* [ ] Your app calls `POST /api/{storeCode}/redemption/{issuedRewardId}/draw` only once per issued reward.
* [ ] The backend does not expose a way to repeat the same draw.
* [ ] Error handling is implemented for expired, invalid, or already-used entries.
* [ ] Authentication and permissions are configured for all used endpoints.

### 3. Frontend experience

* [ ] Your app loads wheel labels and structure from `GET /api/{storeCode}/reward/{id}`.
* [ ] Your app loads spin results from `GET /api/{storeCode}/redemption/{issuedRewardId}`.
* [ ] The number of visual slices matches the configured wheel rules.
* [ ] The animation starts only after a valid spin entry exists.
* [ ] The animation stops on the correct result returned by the draw endpoint.
* [ ] A dedicated state exists for "no win" results.
* [ ] A dedicated state exists for winning results.
* [ ] Prize details are shown after the draw.
* [ ] Updated points or coupon data are refreshed after redemption.

### 4. Final validation

* [ ] Test at least one winning scenario.
* [ ] Test at least one "no win" scenario.
* [ ] Test member limits such as daily or total spin limits.
* [ ] Test visibility and targeting rules.
* [ ] Test what happens when the budget or availability limit is reached.
* [ ] Confirm the post-spin state matches the returned API data.

***

## Key endpoints

* [`GET /reward?type[eq]=fortune_wheel`](https://apidocs.openloyalty.io/#tag/Reward/operation/rewardGetList) — list available Fortune Wheels
* [`GET /reward/{id}`](https://apidocs.openloyalty.io/#tag/Reward/operation/rewardGet) — get wheel rules and labels for rendering
* [`POST /reward/{reward}/buy`](https://apidocs.openloyalty.io/#tag/Reward/operation/rewardPostBuy) — create a single spin entry
* [`POST /redemption/{issuedRewardId}/draw`](https://apidocs.openloyalty.io/#tag/Reward/operation/_redemptionPostDraw) — perform the draw
* [`GET /redemption/{issuedRewardId}`](https://apidocs.openloyalty.io/#tag/Reward/operation/redemptionGet) — fetch the final redemption result

{% hint style="info" %}
The safest flow is always: **buy → draw → fetch result**.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.openloyalty.io/main-features/fortune-wheels/implementation-checklist.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
