# Create a point-based loyalty campaign

> After you create a profile-based loyalty program, you can define rules to determine how your customers earn points and how they can spend them.

> For the complete documentation index, see [llms.txt](https://docs.talon.one/llms.txt).

Let's [set up a reward campaign](/docs/product/campaigns/create-and-manage-campaigns.md#create-a-campaign-from-scratch).
The objective is to give points to customers based on how much they spend on one order and
allow them to use those points as currency on future orders. If they spend $1000 or more,
we give them one loyalty point for every 10 dollars they spend. For example, if the session
total value is $5000, the customer receives 500 points after the session is closed.

:::tip
You can get information about the loyalty point balances of a customer in the
[**Loyalty Points**](/docs/product/applications/display-customer-profiles.md#loyalty-points)
tab of their customer profile in the Campaign Manager, or programmatically using the
[Get customer's loyalty balances](/integration-api#tag/Loyalty/operation/getLoyaltyBalances) endpoint.
:::

In a [standard campaign](/docs/product/campaigns/overview#standard-campaigns) with
the [loyalty feature](/docs/product/campaigns/settings/manage-campaign-features.md) enabled,
let's create:

1. A [promotion rule](/docs/product/rules/overview.md#promotion-rules) to award loyalty points to customers who spend $1000
   or more on one order.
1. A promotion rule for customers to pay for new orders with their loyalty points when their point
   balance is equal to or greater than the session total.
1. A promotion rule for customers to spend their loyalty points on new orders when their point balance
   is less than the session total.

## Award points to customers who spend $1000 or more

Let's [create a rule](/docs/product/rules/create-and-manage-rules.md#create-a-promotion-rule)
for customers to receive points corresponding to 10% of the total value of their session if
they spend $1000 or more.

Let's name the rule `Reward 10% loyalty points`. It has two conditions and one effect.

### Rule 1: Conditions

- **Check attribute value**:

  - Attribute is **Cart items total (current session)**.
  - **Is greater than or equal to** `1000`.

- **Check for event types and custom event values**:

  - **Event type** is `Customer session closing`.

### Rule 1: Effect

**Add loyalty points**:

- We select the loyalty program we have created. Let's imagine that it is called `Special reward`.
- **Recipient** is `Current customer`.
- **Reason** is `10% of current total`.
- **Amount of points** is `[Session.Total]*10%`.

## Pay for an entire order with loyalty points

Let's build a second rule for customers to spend their loyalty points on new orders,
using them directly as currency, when their loyalty point balance is equal to or greater
than the total value of the session

Let's name the rule `Paying with loyalty points`. It has one condition and one effect.

### Rule 2: Condition

**Check attribute value**: **Current balance (`Special reward`) is greater than or
equal to** `Session total (current session)`.

### Rule 2: Effect

**Discount session total**: **Name** is `Pay with points` and **Discount value** is `[Session.Total]`.

## Pay for part of an order with loyalty points

Let's build a third rule for our customers to use their loyalty points on new orders when
their loyalty point balance is less than the total value of the session.

Let's name it `Spend loyalty points`. It has one condition and one effect.

### Rule 3: Condition

**Check attribute value**: **Current balance (`Special reward`) is less than**
`Session total (current session)`.

### Rule 3: Effect

**Discount session total**: **Name** is `Discount for points` and **Discount value** is
`Current balance (Special reward)`.

## Related pages

- [Reward advocates with loyalty points](/docs/product/tutorials/loyalty/loyalty-points-for-referral.md)
- [Create templates](/docs/product/campaigns/templates/create-templates.md)
