> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voucherify.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create loyalty campaign

> Learn how to create a loyalty campaign in the Campaign builder

The loyalty campaign builder guides you through the following steps to launch your program.

Go to **Campaign hub** > **Campaigns** to **Create campaign** and select **Loyalty program**.

<Tip>
  <Badge color="green">Campaign draft</Badge>

  If you can't configure the whole campaign in one go, don't worry.

  You can **Save draft** of the campaign. Draft campaigns are inactive until their configuration is finished and saved.

  If you **Cancel** the campaign builder, you can return to the builder of that campaign by going to **Create campaign** > **Continue work**. However, if in the meantime you've started creating a new campaign, you won't be able to return to the previous one.

  That's why it's best to save campaigns as drafts if you need to stop your work on campaign configuration.
</Tip>

<Steps>
  <Step>
    ## Campaign details

    Start by defining the core identity of your campaign:

    1. Enter unique **Campaign name**.
    2. Optionally, select a **Category** to group this campaign.

    3) Optionally, provide a **Description** for internal reference.
    4) Optionally, set **New customers will auto-join campaign once any earning rule is fulfilled** for allowing customers to join the loyalty program when they meet the condition of an earning rule.

    <Info>
      The **Customers can join campaign only once** checkbox is ticked by default. Customers can have only one loyalty card in a given loyalty campaign.
    </Info>

    You can add the following optional time limitations:

    * **Starts on** and **Expires** dates
    * **Duration and interval time frame** (for example, every 2 days for 3 hours)
    * **Valid days of the week** (for example, only Wednesdays)
    * **Valid hours per day** (for example, happy hours between 16:00 and 22:00 every Friday and Saturday)

    - Set **Keep valid for a specific amount of time after publishing** to ensure that vouchers expire in a defined time after they were assigned to a customer.
    - Set **Loyalty card count** to generate a given number of loyalty cards when the campaign is created.

    Set **Code generation settings**:

    * Define the pattern, format, charset, and other details for your codes.
  </Step>

  <Step>
    ## Point expiration and earning rules

    Set expiration rules for points to determine if customers have a limited time to use their points. Also, set earning rules to define when and under what conditions customers get loyalty points.

    ### Point expiration rules

    Point expiration can be set globally at the campaign level – all points earned through earning rules will follow the same expiration rule.

    You can set the following point expiration rules:

    * **No expiration**: Points never expire. Customers have unlimited time to redeem points for rewards.
    * **Months after earning activity**: Points expire after a defined number of months. You can further round up the expiration to a selected period.
    * **Expiration day and month**: Points expire at a specific day of a selected month.

    ### Earning rules

    <Info>
      Read [Earning rules](/build/earning-rules) to learn how specific earning rules work.
    </Info>

    **Create earning rule** to define how customers receive loyalty points.

    <Steps>
      <Step title="Details">
        Start by defining overall earning rule settings:

        1. Select earning rule type:
           * **Order has been paid**
           * **Custom event**
           * **Entered segment**
           * **Tier events**
        2. **Name** your earning rule.
        3. Set up start and expiration date (when customers will be able to earn points and until what date) and other time limitations. These settings work the same as for campaign **Time frame**.
        4. Define settings specific for the earning rule type:
           * **Custom event**: Select or create **Custom event**.
           * **Entered segment**: Select or create **Customer segment**.
           * **Tier events**: Select loyalty tier event and define if these events should trigger for any tier or a specific tier. The loyalty tier can belong to another loyalty program.
      </Step>

      <Step title="Points">
        Define how many points are earned for a given earning rule type.

        <Tabs>
          <Tab title="Order has been paid">
            Set the following:

            1. Select:
               * **Fixed**: Defines a specific number of points customers will earn for a completed order.
               * **Proportional**: Defines the rules that will scale the number of earned points with a given condition.
            2. **Enable pending points**: Defines the number of days after the completed order when the customers will receive their points.
          </Tab>

          <Tab title="Custom event">
            Set the following:

            * **Fixed**: Defines a specific number of points customers will earn when the custom event occurs.
            * **Proportional**: Defines the rules that will scale the number of earned points with a given metadata condition.
          </Tab>

          <Tab title="Entered segment">
            Set the following:

            * **Fixed**: Defines a specific number of points customers will earn when the customer enters the segment.
            * **Proportional**: Defines the rules that will scale the number of earned points with a given metadata condition.
          </Tab>

          <Tab title="Tier events">
            Set the **Fixed** number of points customers will earn when the selected loyalty tier event occurs.
          </Tab>
        </Tabs>

        Additionally, you can set up:

        * **Dynamic formula** to assign a dynamic point value that's calculated with mathematical and logical operators.
        * **Expiration rules** for individual earning rules. These rule-level settings override the campaign-level expiration.
      </Step>

      <Step title="Validation rule (optional)">
        Optionally, select a validation rule to define additional limits for your customers that will be checked before triggering points.

        You can:

        * Select an existing rule.
        * Edit an existing rule.
        * Clone and edit an existing rule.
        * Create a new rule.

        <Note>
          Read [Create validation rules](/optimize/create-validation-rules) to learn how to set the rules.

          Read [Validation rules](/optimize/validation-rules-reference) for a detailed description of all validation rules and other settings.
        </Note>
      </Step>

      <Step title="Metadata">
        Optionally, add metadata to the earning rule.

        You can:

        * Add value to a key from an existing metadata schema.
        * **Add unknown property**: Add a custom attribute that's not defined in the metadata schema.
        * **Add to schema**: Define a new custom attribute and add it to the metadata schema. You can then add value to that metadata.

        For each metadata, you can set **Value type** as:

        * **Undefined**: No value is set and the metadata isn't added to the earning rule.
        * **Null**: The value is set to `null`, for example `"test_metadata": null`.
        * **Value**: Add value according to the metadata type (string, date, boolean, and so on).

        <Note>
          Read [Metadata](/prepare/metadata) to learn more about custom attributes.
        </Note>
      </Step>
    </Steps>

    You can set up many earning rules for one campaign.

    <Warning>
      A project can have up to 100 loyalty earning rules. This limit can be increased if you have a single-tenant setup. Contact your technical account manager or [Voucherify support](https://www.voucherify.io/contact-support).
    </Warning>
  </Step>

  <Step>
    ## Reward catalog

    Customers can spend their loyalty points to earn rewards. In this step, you can add to or create rewards in the **Reward catalog**.

    **Add reward** to the catalog and:

    <Steps>
      <Step title="Select or create reward">
        You can select an existing reward from the **Reward** list. Alternatively, you can **Create new** reward.
      </Step>

      <Step title="Create new reward">
        You can select from the following reward types:

        <Tabs>
          <Tab title="Discount coupon">
            <Badge color="blue">Digital reward</Badge>

            Customers can spend their points to receive a discount coupon.

            Create **Discount coupon** reward as follows:

            1. **Name reward**.
            2. Select **Campaign** which will be the source of coupons.
            3. Alternatively, **Create new** to select a specific discount type and open the [discount campaign builder](/create-discount-coupons). This builder has fewer steps than the builder in the campaign manager. If you want to configure more details, edit that campaign afterwards.
            4. Optionally, add **Metadata**.
          </Tab>

          <Tab title="Credits on gift card">
            <Badge color="blue">Digital reward</Badge>

            Customers can spend their points to receive credits on a gift card.

            Create **Credits on gift card** reward as follows:

            1. **Name reward**.
            2. Define **Gift amount** that will be added to the customer's gift card.
            3. Select **Campaign** which will be the source of gift cards.
            4. Alternatively, **Create new** to open the [gift card campaign builder](/create-gift-cards). This builder has fewer steps than the builder in the campaign manager. If you want to configure more details, edit that campaign afterwards.
            5. Optionally, add **Metadata**.
          </Tab>

          <Tab title="Points on loyalty card">
            <Badge color="blue">Digital reward</Badge>

            Customers can spend their points to receive points on a loyalty card in another loyalty campaign.

            Create **Points on loyalty card** reward as follows:

            1. **Name reward**.
            2. Define **Loyalty points** that will be added to the customer's loyalty card.
            3. Select **Campaign** which will be the source of loyalty cards.
            4. Optionally, add **Metadata**.
          </Tab>

          <Tab title="Material reward">
            <Badge color="blue">Material reward</Badge>

            Customers can spend their points to receive a product.

            Create **Material reward** as follows:

            1. **Name reward**.
            2. Select an existing product or SKU. Alternatively, **Create new** to add a new product.
            3. Optionally, define **Quantity/Stock** of available product units to be exchanged as rewards.
            4. Optionally, enter **Reward description**.
            5. Optionally, add **Metadata**.
          </Tab>

          <Tab title="Pay with points">
            <Badge color="blue">Pay with points reward</Badge>

            Customers can spend their points to pay for their orders.

            Create **Pay with points** reward as follows:

            1. **Name reward**.
            2. Define the exchange rate between **Loyalty points** and **Cash value**.
            3. Optionally, add **Metadata**.
          </Tab>
        </Tabs>
      </Step>

      <Step title="Auto-redeem">
        <Info>
          This step is available only for the **Digital** and **Material** rewards.
        </Info>

        With **Auto-redeem**, you can set one reward in the loyalty program to be automatically redeemed once customers reach or exceed the required points threshold.
      </Step>

      <Step title="Price in points">
        <Info>
          This step is available only for the **Digital** and **Material** rewards.
        </Info>

        Define cost of the reward in points.
      </Step>

      <Step title="Validation rule">
        <Info>
          This step is available only for the **Pay with points** reward.
        </Info>

        Optionally, select a validation rule to define additional limits for your customers that will be checked before paying with points.

        You can:

        * Select an existing rule.
        * Edit an existing rule.
        * Clone and edit an existing rule.
        * Create a new rule.
      </Step>

      <Step title="Add reward">
        Check the configuration of your reward.

        When everything is correct, **Add reward**.
      </Step>
    </Steps>

    You can add many rewards to **Reward catalog**.
  </Step>

  <Step>
    ## Tiers (optional)

    <Info>
      Read [Loyalty tiers](/build/loyalty-tiers) to learn more about how tiers work.
    </Info>

    Tiers are optional membership levels of your loyalty campaign. Define loyalty tiers as follows.

    <Steps>
      <Step title="Tier qualification">
        There are two ways for customers to qualify for a tier.

        <Tabs>
          <Tab title="Point balance">
            Customers qualify for the tier **immediately** if their point balance is in the point range of the tier. This means that they enter the tier if they reach the lower value or drop out of a higher tier and have a value lower than the upper limit. Customers drop out of a tier if their point balance is outside of the range, either if their point balance is lower or higher than the defined limits.

            Customers can drop out of a tier as follows:

            * **Immediately**: Set this to move customers to a lower tier when their point balance is below the lower limit.
            * **Custom**: Set **Value** in months to allow customers to have grace period when they're still in the higher tier. Additionally, you can round up the expiration date.
          </Tab>

          <Tab title="Points collected in a period">
            Customers qualify for the tier if they collect enough points in a given period.

            Define:

            1. **Tier qualification period**: Time when customers need to collect points (for example, calendar month).
            2. **Tier start date**:
               * **Immediately**: When the tier threshold is reached, the customer is immediately upgraded to the tier.
               * **Next qualification period**: When the tier threshold is reached, the customer is upgraded to the tier from the subsequent qualification period start date.
            3. **Tier expiration date**:
               * **End of the qualification period**: The tier will be valid till the end of the qualification period in which the tier was granted.
               * **End of the next qualification period**: The tier will be valid till the end of the next qualification period in which the tier was granted.
            4. Optionally, **Extend expiration date** by a set value of months or days.
          </Tab>
        </Tabs>
      </Step>

      <Step title="Add tiers">
        **Create tier** to define a loyalty tier:

        1. Enter **Tier name**.
        2. Set **Min. points** to define the lower threshold.
        3. Optionally, set **Max. points** to define the upper threshold for multi-tier loyalty programs.
        4. Optionally, add **Metadata**.
      </Step>

      <Step title="Map earning rules">
        Optionally, you can change the way points are assigned in a specific tier in relation to an earning rule. The point assignments defined with mapping will be made only for members in the particular tier.

        **Add mapping** and:

        1. Select **Tier**.
        2. Set **Multiply** and define the **Multiplier**.
        3. Alternatively, set **Custom** to replace the default point value set by the earning rule.
        4. **Save** to add mapping.

        You can map many tiers to an earning rule.
      </Step>

      <Step title="Map rewards">
        Optionally, you can change the price in points for a reward when customers belong to a specific tier.

        **Add mapping** and:

        1. Select **Tier**.
        2. Set **Multiply** and define the **Multiplier**.
        3. Alternatively, set **Custom** to replace the default point value set for the reward.
        4. Alternatively, set **Not available** to turn off a reward for a particular tier.
        5. **Save** to add mapping.

        You can map many tiers to a reward.
      </Step>
    </Steps>
  </Step>

  <Step>
    ## Distributions (optional)

    Set up automatic messages that are sent when certain loyalty events happen. These messages can go to customers or external systems using channels like text messages, emails, webhooks, or one of the built-in integrations.

    <Note>
      The distribution builder in this step is preconfigured for the selected event. The only step to configure is **Channels**.

      Read [Getting started with distributions](https://support.voucherify.io/article/19-how-does-the-distribution-manager-work) to learn more.
    </Note>

    <Steps>
      <Step>
        **Add distribution** and select the event that will send the messages:

        * **Reward redeemed**: The message is sent when a customer redeems a reward.
        * **Successfully published**: The message is sent when a voucher is successfully published (assigned) to a customer.
        * **Customer rewarded loyalty points**: The message is sent when a customer earns points in the loyalty program.
      </Step>

      <Step>
        In the distribution builder, **Name** the distribution.
      </Step>

      <Step>
        Go to **Channels** and **Add channel** that will distribute the messages.

        The available channels differ depending on the selected distribution event.

        You can set up many channels for one distribution.
      </Step>

      <Step>
        In **Summary**, check if the distribution configuration is correct.

        **Save** to add the distribution to the loyalty campaign.
      </Step>
    </Steps>

    You can add many distributions to a loyalty program.
  </Step>

  <Step>
    ## Metadata (optional)

    Add custom attributes for tracking, optimizing, or experimenting.

    You can either:

    * **Use an existing metadata schema**.
    * **Add unknown property**: metadata that isn't defined and won't be added to the schema.
    * **Add to schema**: define new metadata schema. Once saved, reload the schema to use the new metadata.

    <Note>
      Read [Metadata](/prepare/metadata) to learn more about custom attributes.
    </Note>

    By default, the campaign uses **Voucher metadata schema**. This will set metadata for the campaign and its vouchers. If you're editing the campaign, changes made to the metadata will apply only to the vouchers that haven't been redeemed yet and haven't been published to any customers.

    Uncheck **Use the voucher's metadata schema** to use campaign metadata schemas. The metadata will apply only to the campaign and not to its vouchers.
  </Step>

  <Step>
    ## Access settings

    Check areas, stores, and all stores to limit the access to the campaign by restricted users and API keys.

    <Note>
      <Badge color="blue">Enterprise feature</Badge>

      This step is available for Enterprise clients who have the Areas and stores feature enabled.

      Contact your technical account manager or [Voucherify support](https://www.voucherify.io/contact-support).

      Read [Areas and stores](/orchestrate/areas-and-stores) to learn more about access settings.
    </Note>
  </Step>

  <Step>
    ## Summary

    Review your configuration if everything's correct. If you see something that needs editing, go back to a given step.

    If the setup is correct, click **Save** to launch your campaign.
  </Step>
</Steps>

<Warning>
  Editing campaign settings (for example time frame or expiration settings) affects only vouchers that *have not been published or redeemed yet*.

  Vouchers that are already *published or redeemed keep their existing settings*.
  To change their settings, update the voucher directly.
</Warning>

<Tip>
  <Badge color="green">Campaign calendar</Badge>

  Once you save your campaign or save it as a draft, you can see when it will be active in **Campaign Calendar** in the **Marketer Hub** sidebar section. **Campaign Calendar** shows an overview of all campaigns and their time frames and additional information when you click on a given bar.
</Tip>

## Related features

Experiment with other features to improve your campaign results.

<AccordionGroup>
  <Accordion title="Campaign tracking">
    Once your campaign is live, you can track its progress in the dashboard. This way you can quickly react when it underperforms and tweak its settings or experiment with your setup.

    <Tip>
      <Badge color="green">Dev tools</Badge>

      Devs can use the following tools for campaign tracking:

      * [Voucherify Core MCP](/guides/voucherify-core-mcp)
      * [Campaign summary API](/api-reference/get-campaign-summary)
    </Tip>
  </Accordion>

  <Accordion title="Fraud prevention">
    Even best campaigns can be a target of fraud or exploited by customers who spot weak spots in the promotion setup.

    You can stop that from happing by using fraud prevention and tracking tools built in Voucherify.

    Learn more about stopping incentive fraud in:

    * [Interactive tour](https://www.voucherify.io/product-tours/stop-incentive-fraud).
    * [Fraud prevention and tracking](https://support.voucherify.io/article/516-fraud-prevention) article.
  </Accordion>
</AccordionGroup>
