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

# Gashapon Minigame

> Learn how to configure the Gashapon capsule toy minigame in ChatbotX: customize the twist knob, set drop probabilities, reward viral referrals, and automate flows.

**Gashapon** is an interactive, mobile-optimized capsule toy vending minigame delivered via Webview. Contacts turn the start knob on their screens to shake colorful toy capsules inside the glass chamber, releasing a surprise prize egg onto the exit tray.

Inspired by Japanese blind-box vending machines, Gashapon triggers genuine curiosity and excitement, helping you capture qualified leads, boost chat conversions, and incentivize organic viral referrals.

<CardGroup cols={2}>
  <Card title="Authentic Capsule Physics" icon="gift">
    Realistic capsule swirling animations and satisfying prize-reveal effects that keep participants engaged.
  </Card>

  <Card title="Organic Viral Sharing" icon="share-nodes">
    Automatically award extra spins when contacts invite friends and trigger custom welcome steps for referred users.
  </Card>

  <Card title="Automated Tagging & Attributes" icon="bolt">
    Automatically tag openers, active players, and referred friends, while storing winning prize names into Custom Fields.
  </Card>

  <Card title="Probability & Budget Control" icon="sliders">
    Maintain a balanced 100% total probability, limit prize inventory, and schedule daily spin resets.
  </Card>
</CardGroup>

## Accessing Gamification

To get started, navigate to **Tools** from the left sidebar of ChatbotX and click the **Gamification** card:

<Frame>
  <img src="https://mintcdn.com/chatbotx/HE2gRYNerwCg9mjS/images/gamification_tools_entry.png?fit=max&auto=format&n=HE2gRYNerwCg9mjS&q=85&s=cbf4f8fa9c9778bf6b7202236f1e1ea5" alt="Gamification Tools Entry" width="3020" height="1810" data-path="images/gamification_tools_entry.png" />
</Frame>

## Minigame Dashboard (Game List)

The Gamification overview dashboard displays all created minigames alongside real-time campaign performance metrics:

<Frame>
  <img src="https://mintcdn.com/chatbotx/HE2gRYNerwCg9mjS/images/gamification_dashboard_list.png?fit=max&auto=format&n=HE2gRYNerwCg9mjS&q=85&s=b6f81de8808f31d7f72f14e2ce6ce01f" alt="Gamification Dashboard List" width="2421" height="989" data-path="images/gamification_dashboard_list.png" />
</Frame>

### Understanding Dashboard Metrics

| Metric           | Description                                                                                |
| ---------------- | ------------------------------------------------------------------------------------------ |
| **Name**         | The title of the minigame displayed internally and at the top of the mobile Webview.       |
| **Games played** | Total number of spins completed. For example, if 1 contact plays 3 times, it counts as 3.  |
| **Participants** | Total unique contacts who joined. For example, if 1 contact plays 3 times, it counts as 1. |
| **Winners**      | Total number of winning draw outcomes recorded across the campaign.                        |
| **Referrals**    | Total number of new friends who joined through player referral links.                      |
| **Status**       | A toggle switch to quickly enable or disable the minigame URL.                             |
| **Created At**   | Date and time the minigame was created.                                                    |

### Actions Menu

Click the three dots (`⋮`) in the Actions column of any minigame to:

* **Edit:** Open the configuration editor.
* **History:** View the participant log and gameplay history.
* **Delete:** Remove the minigame from the system.

## Creating a Gashapon Minigame

On the Gamification page, click **+ Create Minigame** in the top-right corner to open the minigame type selection modal:

<Frame>
  <img src="https://mintcdn.com/chatbotx/HE2gRYNerwCg9mjS/images/gamification_choose_minigame_type_modal.png?fit=max&auto=format&n=HE2gRYNerwCg9mjS&q=85&s=da301dd33c4efe94f087507d198df11a" alt="Choose a Minigame Type Modal" width="3178" height="1663" data-path="images/gamification_choose_minigame_type_modal.png" />
</Frame>

Click **Gashapon** to initialize a new game. The configuration interface opens with two primary tabs in the top navigation bar: **Edit** (Minigame settings and design) and **History** (Participant tracking and draw logs):

<Frame>
  <img src="https://mintcdn.com/chatbotx/3_TjM-jZILMaI-5e/images/gashapon_edit_minigame_overview.png?fit=max&auto=format&n=3_TjM-jZILMaI-5e&q=85&s=01db3fb50a81a27e3f979b5fe96ae1b1" alt="Gashapon Edit Minigame Overview" width="1737" height="1821" data-path="images/gashapon_edit_minigame_overview.png" />
</Frame>

## General Setting

Located in the left column, **General Setting** manages basic display options and automated tagging:

* **Name:** Internal and customer-facing title of the game. The adjacent **Visible** toggle enables or hides the title banner at the top of the mobile Webview.
* **Played At:** Active campaign period (start and end date/time). Outside this window, contacts opening the link cannot play.
* **Rules Description (optional):** Gameplay instructions (e.g., *Turn the knob to release a lucky capsule. Free daily turn for every player!*). This text appears in the footer area of the mobile Webview.
* **Tag contacts who open the game link (optional):** Assign tags to contacts who open the game link, even if they leave without playing. Useful for follow-up reminders.
* **Tag players (optional):** Assign tags to contacts who click the start knob and turn for a capsule.
* **Tag new friends (optional):** Assign tags to newly referred contacts who joined through a friend's share link.

## Appearance

The **Appearance** section allows you to customize the color scheme and upload branded machine graphics:

### Color Palette

* **Background Color:** The background color surrounding the mobile Webview (Hex code).
* **Machine Color:** Primary body color of the Gashapon vending machine.
* **Rule Text Color:** Text color of the rules description displayed at the bottom.

### Recommended Asset Dimensions

* **Background Image:** Main backdrop graphic. Recommended width is **1024px**. Height scales automatically.
* **Prize Description Image (Optional):** Header promotional banner. Recommended width is **750px**. You can **Upload File** or **Insert Link**.
* **Start Button Image:** Rotating turn knob graphic (replaces the default knob). Recommended dimensions are **253 x 300px**.

<Note>
  As you adjust colors or upload graphics, the **Live Mobile Preview** on the right updates in real time. A 60px bottom margin is automatically reserved under the rules text to ensure optimal display on mobile screens with navigation bars.
</Note>

## Player Settings

Located in the middle column, **Player Settings** defines spin allowances, referral rewards, and reset schedules:

### Initial Draws

* **Number of lucky draw chances per person:** Base number of turns granted to each contact (default is 1).

### Referral & Viral Sharing

* **Max bonus draws from referrals (optional):** Maximum extra turns a player can earn by sharing with friends.
  * Each friend who clicks the invite link and messages your bot grants the original player 1 bonus draw, up to this limit.
  * Set to **0** to disable referral bonus turns.
* **Sharing node (optional):** Select the specific Flow step (**Node**) that executes when a referred friend opens the link. If left empty, the **Share button** is hidden from the game screen.

When a player runs out of default spins, the Webview automatically displays the notice *You are out of draws for this minigame* along with a **Share with friends** button:

<Frame>
  <img src="https://mintcdn.com/chatbotx/3_TjM-jZILMaI-5e/images/gashapon_share_with_friends_button.png?fit=max&auto=format&n=3_TjM-jZILMaI-5e&q=85&s=f30b0307c80f7000fe440d4f1253900b" alt="Gashapon Share With Friends Button" width="1005" height="1352" data-path="images/gashapon_share_with_friends_button.png" />
</Frame>

Clicking **Share with friends** opens the native mobile share sheet with a personalized invite link. When a friend taps the link and messages the bot, the designated **Sharing node** runs, and the inviter receives an extra turn.

### Reset Draws

* **Do not reset the number of draws:** Contacts can only play their initial allowance plus any earned referral bonuses.
* **Reset the number of draws every:** Restores the default turn count periodically (e.g., reset every 1 day at 00:00).

<Note>
  **Important reset policy:** When a scheduled reset occurs (e.g., daily at 00:00), **all unused bonus draws earned from referrals are also reset**. Clarify this policy in your rules description to encourage same-day participation.
</Note>

## Prize Settings

The **Prize Settings** section controls rewards, odds calculations, and winner tracking:

### Probability Indicators

The system calculates total odds at the top of the section:

* **Sum of all probabilities:** Total combined probability across all items (must equal exactly **100%**).
* **Win probability:** Aggregate probability of all winning prizes.
* **Lose probability:** Probability of hitting the **Non-winning** outcome.

### Storing Winning Results

* **Save prize name to Custom Field (optional):** Select a text Custom Field (e.g., *Prize Name*). When a contact wins a capsule prize, its name is automatically saved to their profile for downstream messaging or segmentation.

### Adding and Editing Prizes (Edit Prize)

Adjust probability percentages directly in the list, click the trash icon to delete, or click the pencil icon to open the **Edit Prize** modal:

<Frame>
  <img src="https://mintcdn.com/chatbotx/3_TjM-jZILMaI-5e/images/gashapon_edit_prize_modal.png?fit=max&auto=format&n=3_TjM-jZILMaI-5e&q=85&s=bea42d417b67a56d4ad69782bcb61bf0" alt="Gashapon Edit Prize Modal" width="2398" height="1812" data-path="images/gashapon_edit_prize_modal.png" />
</Frame>

Inside **Edit Prize**, configure:

* **Prize Name:** Title of the prize revealed inside the capsule (e.g., *Collectible Figurine*, *\$5 Discount Code*, *Canvas Tote Bag*).
* **Image:** Upload or paste an image URL representing the prize.
* **Prize Quantity (optional):** Inventory limit. Each win decreases this counter by 1. When it reaches 0, the prize can no longer be won. Leave empty for unlimited winners.

Click **+ New Prize** to add more rewards, or edit the **Non-winning** row to adjust loss messaging and odds (empty capsule).

<Warning>
  **Out-of-Stock Fallback Rule:** When a limited-quantity prize runs out (quantity reaches 0), any subsequent spins that land on this prize are **automatically converted into Non-winning outcomes**. This safeguards your prize budget while preserving a valid 100% probability structure.
</Warning>

## Winning & Non-winning Message Settings

After the capsule drops, the Webview displays a result screen. Click the pencil icon next to **Winning Message Settings** or **Non-winning Message Settings** to configure these states:

### Winning Message Settings

<Frame>
  <img src="https://mintcdn.com/chatbotx/3_TjM-jZILMaI-5e/images/gashapon_winning_message_settings_modal.png?fit=max&auto=format&n=3_TjM-jZILMaI-5e&q=85&s=5f05c99b0ae4a228f739981e3cbb6401" alt="Gashapon Winning Message Settings Modal" width="2398" height="1815" data-path="images/gashapon_winning_message_settings_modal.png" />
</Frame>

* **Title (optional):** Congratulations headline (e.g., *Congratulations*).
* **Description (optional):** Detailed winning text. Insert the `{{prize_name}}` variable to dynamically display the prize won.
* **Accept Button Text (optional):** CTA button text shown on the Webview (e.g., *Redeem Now*).
* **Send message to winner who received the prize (optional):** Enable to trigger an automated bot message immediately upon winning.
  * **Message type:** Select from 3 delivery methods:
    * **Text:** Sends a plain text confirmation.
    * **Flow:** Triggers a complete automated sequence (select via **Flow ID**) to issue coupon codes or collect delivery addresses.
    * **Node:** Navigates directly to a specific block within an existing flow.

### Non-winning Message Settings

<Frame>
  <img src="https://mintcdn.com/chatbotx/3_TjM-jZILMaI-5e/images/gashapon_non_winning_message_settings_modal.png?fit=max&auto=format&n=3_TjM-jZILMaI-5e&q=85&s=d13e858f3bdb4821bf5442f10f6eeda4" alt="Gashapon Non Winning Message Settings Modal" width="2397" height="1813" data-path="images/gashapon_non_winning_message_settings_modal.png" />
</Frame>

* **Title (optional):** Headline for non-winning spins (e.g., *Oops, this capsule was empty!*).
* **Description (optional):** Encouragement message prompting the user to share the game with friends for another chance.
* **Send a message when the player doesn't win (optional):** Enable to deliver a consolation message or a participation discount code via the bot.

## Tracking Gameplay History (History)

Switch to the **History** tab in the top navigation bar to inspect detailed engagement logs:

<Frame>
  <img src="https://mintcdn.com/chatbotx/pGLxM_CEVOtWs-rs/images/gamification_history_tracking_table.png?fit=max&auto=format&n=pGLxM_CEVOtWs-rs&q=85&s=4e44bfb718baf778a0e84e0e465fab99" alt="Gamification History Tracking Table" width="2420" height="1061" data-path="images/gamification_history_tracking_table.png" />
</Frame>

The table displays key tracking columns:

* **Name:** Contact avatar and profile name.
* **Plays:** Total capsule turns executed by this contact.
* **Remaining draws:** Remaining unused turn balance.
* **Referrals:** Count of new friends who joined via this contact's share link.
* **First opened:** Date and time the contact first loaded the minigame.
* **Last played:** Date and time of their most recent turn.
* **Actions (⋮):** Quick management actions for individual players.

Use the **Search name...** field to find specific participants or adjust **Rows per page** pagination.

## Integrating Gashapon into Chatbot Flows

At the bottom of the editor, copy your unique **Public URL**:

```text theme={null}
https://app.chatconnectx.com/minigames?minigameId=XXXXXX
```

Paste this URL into **Open Website** buttons across Flows, Broadcasts, or Sequences. Here are 3 common implementation strategies:

### Strategy 1: Click-to-Message Ad Acquisition

Build a Flow triggered when contacts message your Facebook or Instagram ad. Attach an **Open Website** button linking to the Gashapon minigame to offer an instant welcome turn, doubling initial conversation engagement rates.

### Strategy 2: Automated Coupon Delivery

Under **Winning Message Settings**, select **Flow** as the message type. Connect a flow containing the **Set up Coupon** action from [Coupons](/docs/tools/coupons). When a contact wins, the bot automatically sends a unique coupon code with an expiration date directly into the chat.

### Strategy 3: Daily Re-engagement Campaigns

Set **Reset draws** to recurring daily resets (**Reset every 1 day**). Use [Omnichannel Broadcasts](/docs/remarketing/omnichannel-broadcasts) to notify past contacts of fresh daily turns, driving steady repeat traffic back to your channels.
