# 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 the [Codes](/product/modules/codes.md) article.
{% 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 the[Activation limits](/product/loyalty-engine/reactors/activation-limits.md#reactions) section of the Reactor Configuration article 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="/files/5oOB7ANVi7UXh3cWY2BR" 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 the [Codes](/product/modules/codes.md) page.
{% 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 the[Activation limits](/product/loyalty-engine/reactors/activation-limits.md#reactions) section of the Reactor Configuration article 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="/files/BRbXOfNQytD2mHnU6T1W" 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.&#x20;

   ```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 the[Activation limits](/product/loyalty-engine/reactors/activation-limits.md#reactions) section of the Reactor Configuration article 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="/files/3LdEu07fQXzKTLbikA2W" 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 the [Create advanced or multi-event reactors using Audiences](/product/loyalty-engine/reactors/reactor-tutorials/create-advanced-or-multi-event-reactors-using-audiences.md) page for an example of how to use audiences and reactors together.


---

# 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://kbase.whitelabel-loyalty.com/product/loyalty-engine/reactors/reactor-tutorials/create-a-promo-code-reactor.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.
