> For the complete documentation index, see [llms.txt](https://help.openloyalty.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.openloyalty.io/campaigns/campaigns/campaigns-and-referral-campaigns/creating-campaigns.md).

# Creating Campaigns

Learn more about campaign types and how to create one.

Craft your campaign by following these core steps—triggers are handled separately, so this covers the universal setup.

## 🛠️ Step-by-Step Setup

Follow these steps to set up a new leaderboard in your Open Loyalty environment:

{% stepper %}
{% step %}

### Navigate to Campaigns

* From the left-hand menu, go to **Campaigns** or **Referral Campaigns**
* Click **Add campaign** (or use the ▼ to **Import** existing configuration)
  {% endstep %}

{% step %}

### Choose Your Trigger

Now you need to select the campaign trigger. There are three options available:

* [**Purchase Transaction**](/campaigns/campaigns/campaigns-and-referral-campaigns/creating-campaigns/trigger-types/purchase-transaction.md)\
  Purchase transaction matched with a member
* [**Return Transaction**](/campaigns/campaigns/campaigns-and-referral-campaigns/creating-campaigns/trigger-types/return-transaction.md)\
  Return transaction matched with a member
* [**Internal Event**](/campaigns/campaigns/campaigns-and-referral-campaigns/creating-campaigns/trigger-types/internal-event.md)\
  Event that happens in Open Loyalty e.g., tier updated, member registered/activated, etc.
* [**Custom Event**](/campaigns/campaigns/campaigns-and-referral-campaigns/creating-campaigns/trigger-types/custom-event.md)\
  Events sourced from an external system or application
* [**Achievement**](/campaigns/campaigns/campaigns-and-referral-campaigns/creating-campaigns/trigger-types/achievement.md)\
  Achievement completed by the member
* [**Redemption Code**](/campaigns/campaigns/campaigns-and-referral-campaigns/creating-campaigns/trigger-types/redemption-code-campaign.md)\
  Events based on redeeming generated redemption codes

<figure><img src="https://2658975168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNVX03KZzmrGwJihLiEx%2Fuploads%2Fgit-blob-c47c16797a8d4e7f2bc59e67ab8ddbe57da26a8b%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
For more information on each of the trigger, please refer to this section of the User Guide: [Trigger Types](/campaigns/campaigns/campaigns-and-referral-campaigns/creating-campaigns/trigger-types.md)
{% endhint %}
{% endstep %}

{% step %}

### Campaign Info - Basic Settings

Fill in these core details:

* **Name & Description** – Choose a distinctive name and optionally add the description.\
  If you added another language in the settings, you will be able to add translations.
* **Display Order** (optional) – Type campaign number on the list (if you use it for ordering)

<figure><img src="https://2658975168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNVX03KZzmrGwJihLiEx%2Fuploads%2Fgit-blob-184a9359adbee6cb5707e45bbe2681a8f1b48b4a%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

* **Start & End Dates** – Start date is required; the end date is optional but must be after the start date.

<figure><img src="https://2658975168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNVX03KZzmrGwJihLiEx%2Fuploads%2Fgit-blob-4e5de2ed0735b821f5ca0db724efadc4f1a1bed5%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

* **Visibility** – Choose who sees the campaign: Everyone, specific Segments/Tiers, or Hidden.

{% hint style="warning" %}
**Campaign visibility** only determines to whom the challenge is presented. If you want to target given audience, the condition must be specified in the rules.

* **Visibility** - displaying the campaign, e.g. for a given segment or tier
* **Conditions** - being able to earn points, e.g. for a given segment or tier

Therefore, the precise targeting of the campaigns depends on the conditions specified in the rules section.
{% endhint %}

<figure><img src="https://2658975168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNVX03KZzmrGwJihLiEx%2Fuploads%2Fgit-blob-b8d17531cc5b1c46817c26b1ec38773bbea01856%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

* (Optionally) Define **custom attributes** (key:value pairs) to tag or filter the automation campaign in APIs and UI

{% hint style="info" %}
For more information on how to use campaign custom attributes, please refer to this section of the article: [Custom Attributes in Campaigns](/campaigns/campaigns/custom-attributes-in-campaigns.md)
{% endhint %}

<figure><img src="https://2658975168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNVX03KZzmrGwJihLiEx%2Fuploads%2Fgit-blob-fec614fa9ac84d85016be0f5e456d92567a7a852%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

* **Campaign Status** – The campaign will start only if it is active.

<figure><img src="https://2658975168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNVX03KZzmrGwJihLiEx%2Fuploads%2Fgit-blob-996e0c8cfce80c348d7cdc47ce512db3a5d53bad%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Transaction Item Filters *(for Purchase or Return Triggers)*

Transaction filters are powerful tools that allow you to refine the products in customers' transactions. By applying specific criteria, such as size, quantity, price, and other relevant factors, you can effectively narrow down the selection to meet your needs.

{% hint style="info" %}
For more information on how to create and use a transaction item filter, please refer to this section of the User Guide: [Transaction Item Filters](/campaigns/campaigns/campaigns-and-referral-campaigns/creating-campaigns/transaction-item-filters.md)
{% endhint %}
{% endstep %}

{% step %}

### Add Rules: Conditions & Effects

* Click **Add rule**. Each rule has **Targets** (which items in the transaction it is about), **Conditions** and **Effects**. Move rules up or down with the **↑** and **↓** buttons in the rule header — with **Priority wins** rule resolution, the order decides which rule rewards a product. See [Rule Limits and Rule Resolution](/campaigns/campaigns/campaigns-and-referral-campaigns/rule-limits-and-rule-resolution.md).<br>

  <figure><img src="https://2658975168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNVX03KZzmrGwJihLiEx%2Fuploads%2Fgit-blob-3709e892fa547fb3a8df075629e355526f822afd%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
You can set a maximum of 6 rules in one campaign.
{% endhint %}

* **Conditions**: e.g., membership tier, purchase history, custom attributes

{% hint style="danger" %}
You can set a maximum of 30 conditions in one campaign.
{% endhint %}

* **Effects** - you can choose one of the following options:
  * **Deduct Units**\
    Select formulas to add, divide, multiply, and subtract your values and deduct units based on the calculation
  * **Add Units**\
    Select formulas to add, divide, multiply, and subtract your values and add units based on the calculation
  * **Give Reward**\
    Select the Reward that the Member who fulfils the conditions will receive
  * **Set Member Custom Attribute**\
    Set a custom attribute that the Member who fulfils the conditions will get
  * **Remove Member Custom Attribute**\
    Set a custom attribute that will be removed when the Member fulfils conditions
  * **Grant Badge**\
    Award the [Badge](/gamification/badges.md) of your choice to the Member who fulfils the conditions
  * **Assign a Tier**\
    Manually move the Member who fulfils the conditions to a selected Tier.\
    The member can still advance further based on standard tier criteria after being manually assigned — once they qualify for a higher tier on their own, the manual assignment no longer applies.<br>

    <div data-gb-custom-block data-tag="hint" data-style="info" class="hint hint-info"><p>This effect is only available for campaigns triggered by <strong>Purchase Transaction</strong> or <strong>Custom Event</strong>.</p></div>
* Use multiple rules to cover diverse scenarios

{% hint style="warning" %}
**Keep in mind:** within a single rule, **all** its conditions must be met for the reward to trigger.

But if you define **two or more separate rules**, satisfying **all conditions within one rule** will activate its own effect—since each rule operates independently.
{% endhint %}

<figure><img src="https://2658975168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNVX03KZzmrGwJihLiEx%2Fuploads%2Fgit-blob-487fb12c41e656eae8a411506d1b0e145caff7fe%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
For more information on how to use autocomplete options for the effects, please refer to this section of the User Guide: [Effects Autocomplete](/campaigns/campaigns/effects-autocomplete.md)
{% endhint %}
{% endstep %}

{% step %}

### Set Limits & Budget

Control how often a member can receive the campaign's reward:

**Campaign Limit**

* **Per‑member limit**: per hour/day/week/month/year or total
* **Global budget**: total units issued, and per‑member units cap
* **Per-rule limits** (Purchase transaction campaigns): cap the reward for the products one rule covers — see [Rule Limits and Rule Resolution](/campaigns/campaigns/campaigns-and-referral-campaigns/rule-limits-and-rule-resolution.md)

<figure><img src="https://2658975168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNVX03KZzmrGwJihLiEx%2Fuploads%2Fgit-blob-afdb339d921d0fb3cfedb80f08956bc225e8ff20%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
For more information on how to set up limitations, please refer to this section of the User Guide: [Campaign Limitation](/campaigns/campaigns/campaign-limitation.md)
{% endhint %}
{% endstep %}

{% step %}

### Summary

* Review the campaign configuration and amend if needed.
* Click on **Add Campaign**

<figure><img src="https://2658975168-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FcNVX03KZzmrGwJihLiEx%2Fuploads%2Fgit-blob-9efceb738941e58313b8fdca63a311edddb5bf76%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

***

## ✅ Best Practices

* **Use clear naming & tags** for easy tracking via admin or API.
* **Localise content** if running multi-language campaigns.
* **Set smart limits** before launch to control issuance.
* **Test rules early**, using test accounts or sandbox environments.
* **Monitor post-launch**, adjusting rules, budgets, or targeting as needed.
* **Scale gradually** - fine-tune limits and budgets as you assess performance.

***


---

# 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://help.openloyalty.io/campaigns/campaigns/campaigns-and-referral-campaigns/creating-campaigns.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.
