# Drive Black Friday sales with a limited-time spend challenge

> Black Friday weekend is a prime opportunity for retail businesses to launch high-intensity, limited-time campaigns. Using a one-time fixed-schedule achievement is an excellent strategy to drive these time-sensitive promotions.

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

In this tutorial, let's create a Black Friday challenge using achievements to
maximize total customer spend:
- **Goal**: Encourage customers to spend $400 or more in total purchase value
  during the Black Friday weekend.
- **Duration**: The promotion runs for a limited time period:
  - **Start**: November 28, 2025, 00:00:00
  - **End**: December 1, 2025, 23:59:59
- **Reward**: Customers who complete this challenge receive a coupon for a $50
  discount on a future purchase, which they can redeem over the following three
  months.

## Set up the achievement and rules

<StepsContainer>

### Prepare your environment

Create a
[standard campaign](/docs/product/campaigns/overview#standard-campaigns)
named `Black Friday Challenge` with the **Achievements** and **Coupons**
features enabled.

To set up the Black Friday challenge, we first create an achievement, then
[define two rules](/docs/product/rules/create-and-manage-rules#create-a-rule) in
this campaign.

### Create the achievement

Create a
[one-time fixed-schedule achievement](/docs/product/achievements/create-achievements.md)
named `400 Purchase Value`:

- Set the **Target** to `400`. This value represents the total
  [session](/docs/dev/concepts/entities/customer-sessions.md#customer-session-states)
  value of the customer's purchases during the promotion time period.
- Select the **End progress on achieving target** option.
- Set the **Achievement start** to `2025-11-28 00:00:00`.
- Set the **Achievement end** to `2025-12-01 23:59:59`.

For every purchase the customer makes over the weekend, the total session value
gets added as progress to the achievement. The customer's progress must reach
400 to complete the achievement. Let's set up a rule to track customer progress.

### Create a rule to update customer progress

Let's create a rule that increases the customer's progress in an achievement by
the total purchase value. We can name the rule
`Increase customer progress based on purchase value`.

For example, if the customer completes a session with a total purchase value of
$75, this rule updates the customer's progress in the achievement by 75.

This rule checks two conditions:
- The achievement is not completed yet.
- The Rule Engine has triggered a `Customer Session Closing` event, confirming
  that the customer completed a purchase order and the
  [session](/docs/dev/concepts/entities/customer-sessions.md#customer-session-states)
  is in `closed` state.

If both conditions are true, the Rule Engine updates the customer progress in
the achievement by the total session value of the purchase.

#### Rule 1: Conditions

When **all** of these are true:

- **Check customer progress in an achievement**:
  - Achievement `400 Purchase Value` `is not` `Completed`

- **Check for event types and custom event values**:
  - **Event type**: `Customer session Closing`

#### Rule 1: Effects

- **Update customer progress**:
  - **Achievement name**: `400 Purchase Value`
  - **Update progress by**: <Attribute name="Session Total (Current Session)"
    type="builtin"/>

### Create a rule to award coupon

Let's create a second rule that checks if the achievement is complete. This rule
checks if the achievement has been completed and immediately awards the customer
a [coupon](/docs/product/campaigns/coupons/coupon-page-overview.md) with a $50
discount limit and sets the coupon's validity to three months after the start
date. We can name the rule
`Reward Black Friday coupon for achievement completion`.

:::tip
You can also
[customize the coupon code](/docs/product/campaigns/coupons/create-coupons.md)
by setting a Black Friday-related prefix. For example, a generated code would be
`BLK-FRD-025-88MH9KP`.
:::

#### Rule 2: Conditions

- **Has completed an achievement**:
  - **Achievement name**: `400 Purchase Value`

#### Rule 2: Effects

- **Create coupon code**:
  - **Campaign**: `In the current campaign`
  - **Recipient**: `Current Customer`
  - **Redemption limit**: `1`
  - **Discount limit**: `50`

  - **Set start and end time**:
    - **Start date**:
      1. Click <Catalog className="icon"/> to **Select a date variable**.
      1. In **Attribute Selector**, select the <Attribute name="Current time"
         type="builtin"/> attribute.
    - **Expiration date**: `3` `month(s) after the session`

  - **Code pattern**:
    - **Use custom code pattern**:
      - **Code length**: `7`
      - **Character set**: `Numbers and letters`
      - **Prefix**: `BLK-FRD-025-`

</StepsContainer>

## Related pages

- [Achievements](/docs/product/achievements/overview.md)
- [Create achievements](/docs/product/achievements/create-achievements.md)
