> 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/campaigns/reactor-tutorials/create-a-promo-code-reactor.md).

# Create a promo code reactor

## Introduction

Promo codes are a great way to offer additional bonuses to your users. We'll look at how you can set up a simple reactor which uses a promo code, as well as some of the more complex ways you can use them.

{% hint style="info" %}
This reactor requires the Codes module.
{% endhint %}

{% hint style="success" %}
Before following this tutorial make sure you have the `SUBMITTED_CODE` event configured in your event types. For more information about this event, see [Codes](/product/modules/codes.md).
{% endhint %}

***

## Configuration

### Static promo code

1. Navigate to Events > Reactors. Click 'Create' in the top right corner.
2. Give the reactor a name and choose `SUBMITTED_CODE` from the 'Event type' list.
3. Choose whether you want this reactor to occur an unlimited number of times or be limited to user or tenant activations. For static promo codes a subject activation limit is advised to stop misuse.
4. Move to the 'Payload Constraints' tab. In the 'Code' section click 'Constant'. Enter the code you'd like users to enter. This is case sensitive.
5. Move to the 'Reactions' tab. Configure the reaction as needed. See [Reactions](/product/loyalty-engine/campaigns/reactions.md) for more information.
6. *Optional:* Move to the 'Effectivity' tab. Set a start date and an end date for the reactor. If you'd like the reactor to run immediately and indefinitely skip this step.
7. Click 'Save'.

<figure><img src="https://1999217057-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEFmrMvu6tg0ZiSX9SGEq%2Fuploads%2FOdvt7MuKTFubNShYAqen%2FSCR-20240315-lkoe.jpeg?alt=media&amp;token=81d44fc2-2a2f-4878-9d3b-5d4428887607" alt=""><figcaption><p>A reactor being configured with the code 'LOVELOYALTY'.</p></figcaption></figure>

### Promo code pool

{% hint style="info" %}
For more information about setting up a code pool, see [Codes](/product/modules/codes.md).
{% endhint %}

1. Navigate to Events > Reactors. Click 'Create' in the top right corner.
2. Give the reactor a name and choose `SUBMITTED_CODE` from the 'Event type' list.
3. Choose whether you want this reactor to occur an unlimited number of times or be limited to user or tenant activations. For code pools the activation limit refers to how many times the code pools itself can be used by the subject/tenant, rather than the individual codes in the pool. Codes in a code pool can only be used once.
4. Move to the 'Payload Constraints' tab. In the 'Code Validity' section click 'Specific Pool'. Choose the code pool you'd like to react to from the list.
5. Move to the 'Reactions' tab. Configure the reaction as needed. See [Reactions](/product/loyalty-engine/campaigns/reactions.md) for more information.
6. Optional - Move to the 'Effectivity' tab. Set a start date and an end date for the reactor. If you'd like the reactor to run immediately and indefinitely skip this step.
7. Click 'Save'.

<figure><img src="https://1999217057-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEFmrMvu6tg0ZiSX9SGEq%2Fuploads%2FygaxUBbjP5XBkiYXfCsC%2FSCR-20240315-lksr.jpeg?alt=media&amp;token=8473d870-1cb0-4bf9-8936-373670681a0c" alt=""><figcaption><p>The code pool list that is shown after clicking 'Specific Pool'.</p></figcaption></figure>

### Multiple static codes

{% hint style="info" %}
This reactor creates a group of codes which systematically function as a single code. They will give the same reward and if an activation limit it set any of the codes will reduce the allowed activation count.
{% endhint %}

1. Navigate to Events > Reactors. Click 'Create' in the top right corner.
2. Give the reactor a name and choose `SUBMITTED_CODE` from the 'Event type' list.
3. Choose whether you want this reactor to occur an unlimited number of times or be limited to user or tenant activations. For static promo codes a subject activation limit is advised to stop misuse.
4. Move to the 'Payload Constraints' tab. Click 'Use Advanced Mode'.
5. Enter the following schema, replacing 'CODE1', 'CODE2' etc. with the codes you'd like to use.

   ```json
   {
     "type": "object",
     "$schema": "http://json-schema.org/draft-06/schema#",
     "properties": {
       "code": {
         "type": "string",
         "enum": [
           "CODE1",
           "CODE2",
           "CODE3"
         ]
       }
     },
     "required": []
   }
   ```
6. Move to the 'Reactions' tab. Configure the reaction as needed. See [Reactions](/product/loyalty-engine/campaigns/reactions.md) for more information.
7. Optional - Move to the 'Effectivity' tab. Set a start date and an end date for the reactor. If you'd like the reactor to run immediately and indefinitely skip this step.
8. Click 'Save'.

<figure><img src="https://1999217057-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEFmrMvu6tg0ZiSX9SGEq%2Fuploads%2F6TmXCYk4X2dkovU80zGc%2FSCR-20240315-lkzy.jpeg?alt=media&amp;token=35742f07-c24f-41e7-8fe7-cb259a218447" alt=""><figcaption><p>A reactor being configured with the code 'LOVELOYALTY', 'GIMMEPOINTS' and 'SPECIALOFFER' acting as a single code.</p></figcaption></figure>

***

## Tips

* Promo codes can be used within audience criteria so they can be used to unlock bonuses. See [Create advanced or multi-event reactors using Audiences](/product/loyalty-engine/campaigns/reactor-tutorials/create-advanced-or-multi-event-reactors-using-audiences.md) for an example of how to use audiences and reactors together.


---

# 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/campaigns/reactor-tutorials/create-a-promo-code-reactor.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.
