> For the complete documentation index, see [llms.txt](https://kbase.whitelabel-loyalty.com/product/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kbase.whitelabel-loyalty.com/product/loyalty-engine/audiences/audience-tutorials/create-audiences-based-on-user-activity/create-an-audience-of-users-who-have-purchased-a-particular-reward.md).

# Create an audience of users who have purchased a particular reward

## Introduction

Tracking users who have purchased a particular reward can be useful for a number of reasons. The audience can be used for simple reporting about the number of users who have engaged with an individual reward. Additionally it can be used alongside reward availability criteria to ensure that users can only purchase the reward a limited number of times.

***

## Configuration

1. Navigate to Users > Audiences and then click 'Create' in the top right corner.
2. Give the audience a name and description. Turn on AUDIENCE\_JOINED and AUDIENCE\_LEFT events if needed. Set the refresh rate to 'Reactive'.
3. Move to the criteria tab. The criteria should be;
   * Event type is `PURCHASED_REWARD`
   * Profile matches JSON schema

     ```json
     {
       "$schema": "http://json-schema.org/draft-06/schema#",
       "type": "object",
       "required": [
         "rewardId"
       ],
       "properties": {
         "rewardId": {
           "enum": [
             "enter reward ID here"
           ]
         }
       }
     }
     ```
   * Event occurrence count is greater than 0
4. Click save.

***

## Tips

* You can enter multiple `rewardId` in the schema to track purchases of more than one reward in a single audience. This can then be used to create a 'Choose Reward A or B' type campaign.
* Increase the event occurrence number in the audience criteria if you'd like the reward to be purchasable more than once.
* Adding date criteria to the audience would mean that a reward is only purchasable x number of times *within a certain time period*. For example, adding the criteria "Reported at is later than 1 week ago' would mean that a user would leave the audience a week after purchasing the reward, and therefore be able to purchase the reward again. Change the refresh rate to 'Daily Reactive' if you want to configure this setup.


---

# 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://kbase.whitelabel-loyalty.com/product/loyalty-engine/audiences/audience-tutorials/create-audiences-based-on-user-activity/create-an-audience-of-users-who-have-purchased-a-particular-reward.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.
