> For the complete documentation index, see [llms.txt](https://studio-docs.sandbox.game/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://studio-docs.sandbox.game/monetization/connect-items-to-gameplay.md).

# Connect items to gameplay

The store records who owns an item. Your game decides what owning it or using it does. An item with no game logic behind it sells the player nothing.

If you described the effect when you created the item, your agent has already wired it. That pass is on [Create and manage items](https://studio-docs.sandbox.game/monetization/create-and-manage-items.md). This page is for an item that is in the store and still does nothing in play, and for what the game should do for each category. The categories themselves are on [What you can sell](https://studio-docs.sandbox.game/monetization/what-you-can-sell.md).

## Step 1: Tell your agent what the item does

Ask by the item's name. For the apple created earlier:

```
Wire up the Crisp Apple item: when the player uses it, restore 30 health.
```

Say when the effect happens, and what changes for the player. The agent connects that to the item's SKU.

## Step 2: Apply permanent items the player already owns

A permanent item has to be in effect on later visits, not only on the day it was bought.

When a play session starts, and again when the store closes, check the player's inventory. If they own the item, apply the effect. A player who bought the flaming sword yesterday should start today with it equipped.

Ask your agent to make that check for each permanent item.

## Step 3: Consume a temporary item when the player uses it

When the player uses a temporary item, tell the store to consume it, then apply the effect. Consuming removes one from their inventory.

Some items should be consumed as soon as they are bought. Use that for an instant effect, such as skipping a timer. Ask your agent to consume the item on purchase and apply the effect immediately.

Ownership belongs to the player's Sandbox account. A purchase is still there on the next session while they are signed in.

## What the game does for each category

| Category         | What your game does                                                                             |
| ---------------- | ----------------------------------------------------------------------------------------------- |
| Currency         | On use, add the amount to your game's own balance. Players spend that balance inside your game. |
| Consumable       | On use, apply the effect, such as healing, reviving, or adding ammo.                            |
| Permanent Unlock | If they own it, make the character, weapon, or ability available.                               |
| Upgrade          | If they own it, apply the improved stat or capacity.                                            |
| Cosmetic         | If they own it, offer the skin or effect in your customization UI.                              |
| Timed Boost      | On use, apply the modifier. End it when the time runs out.                                      |
| Access           | If they own it, or while it is active, open the area, mode, or feature.                         |
| Convenience      | On use, or if they own it, remove the wait or the extra step.                                   |

Your game tracks the clock for a Timed Boost and for Access that lasts a set time.

## What You've Done

The store records the purchase, and your game applies the effect. Buy each item in the editor, on [Test purchases without spending Silicon](https://studio-docs.sandbox.game/monetization/test-purchases.md), before you publish it.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://studio-docs.sandbox.game/monetization/connect-items-to-gameplay.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
