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

# Perks

> Automatic store-wide discounts unlocked by package purchases, active subscriptions or manual admin grants.

## **Introduction**

**Perks** are persistent discounts that follow a customer after they purchase a specific package, hold an active subscription, or are granted one manually from the admin panel. Unlike a coupon, the perk is **tied to the user** — it applies automatically on every future checkout while it is still active, with no code to type in.

<Check>
  Perks make it easy to offer **member benefits**, **subscriber-only discounts** or **VIP rewards** without managing coupon codes.
</Check>

## **Enabling Perks**

Perks are managed from the **Perks** tab in the admin sidebar. No master toggle is required — each perk individually carries an **Enable** switch.

<Steps>
  <Step title={'Go to the Admin Panel'}>
    Click on the **Admin Panel**.
  </Step>

  <Step title={'Navigate to Perks'}>
    Click on the **Perks** tab to access the perk management area.
  </Step>

  <Step title={'Create a Perk'}>
    Click on the **Create Perk** button to open the perk wizard.
  </Step>
</Steps>

## **Configuring a Perk**

A perk is configured through a **five-step wizard**.

### Step 1 — Basics

Set the perk's identity and the discount it grants.

| **Field**       | **Meaning**                                                                                 |
| --------------- | ------------------------------------------------------------------------------------------- |
| **Name**        | Display name shown in the admin and to the customer.                                        |
| **Description** | Optional internal note.                                                                     |
| **Discount**    | Percentage discount, `0–100`. `0%` is allowed (use it for tracking without lowering price). |
| **Enable**      | Master switch for this perk. Disabled perks are ignored at checkout.                        |

### Step 2 — When Can Be Active

Restrict when the perk applies. All schedule fields are **optional** — a perk with no schedule is always active.

| **Field**               | **Meaning**                                                                |
| ----------------------- | -------------------------------------------------------------------------- |
| **Active From → Until** | Date range during which the perk is honoured.                              |
| **Days of week**        | Limit to specific weekdays (e.g. weekends only).                           |
| **From / Until (time)** | Time-of-day window. Supports **overnight windows** (e.g. `22:00 → 02:00`). |

<Info>
  A grant survives outside the schedule window — only the **application** of the discount at checkout is gated. When the window opens again, the same grant becomes effective.
</Info>

### Step 3 — Where Applies (Scope)

Define which items the discount affects. A perk needs **at least one scope** or it stays dormant. You can add multiple scopes.

| **Scope Type**  | **Effect**                                                      |
| --------------- | --------------------------------------------------------------- |
| **Whole Store** | Applies to every item in the cart, including items added later. |
| **Category**    | Applies to all packages inside the selected category.           |
| **Package**     | Applies to a single package only.                               |

### Step 4 — Triggers

Define how users **earn** the perk. A perk needs at least one trigger. Multiple triggers are allowed (e.g. earn the perk by buying *any* of several packages).

| **Trigger Type** | **How the perk is granted**                                                                     |
| ---------------- | ----------------------------------------------------------------------------------------------- |
| **Purchase**     | Granted right after the user buys the selected trigger package.                                 |
| **Subscription** | Granted while the user holds an active subscription to the selected package; revoked on cancel. |
| **Admin Only**   | Granted manually from the admin panel — no package needed.                                      |

For Purchase and Subscription triggers, also configure **Duration**:

| **Duration**     | **Meaning**                                                                           |
| ---------------- | ------------------------------------------------------------------------------------- |
| **Permanent**    | The perk stays forever (unless manually revoked).                                     |
| **Days**         | The perk expires `N` days after the trigger fired.                                    |
| **While Active** | Only meaningful for **subscription** triggers — the perk stays while the sub is paid. |

### Step 5 — Stacking

Control how this perk combines with other discounts on the same checkout.

| **Field**            | **Meaning**                                                                                                                                                                     |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Stack with types** | Discount types this perk is allowed to combine with: **Coupon**, **Sale**, **Giftcard**, **Cumulative**, **Perk**.                                                              |
| **Stack with perks** | Allow this perk to combine with other perks on the same checkout.                                                                                                               |
| **Stack priority**   | Order in which perks are applied when multiple stack together (higher first).                                                                                                   |
| **Exclusive group**  | Tag that prevents duplicate-flavoured perks from stacking. Two perks in the same group will resolve to **only the highest-discount one** at checkout (e.g. subscription tiers). |

<Info>
  **Example of Exclusive Group:** you have a "−10% for Diamond subscribers" and "−15% for Emerald subscribers" perk. A user holding both subs would otherwise get −25%. Put both perks in an exclusive group called `subscription_tier` and only the −15% one will apply.
</Info>

## **Manual Grant and Revoke**

Admins can manually grant or revoke perks from a customer's profile.

<Steps>
  <Step title={'Open the Customer Profile'}>
    Go to **Customers** in the sidebar and open the relevant user.
  </Step>

  <Step title={'Open the Perks Section'}>
    Scroll to the **Perks** section on the customer detail page.
  </Step>

  <Step title={'Grant or Revoke'}>
    Click **Grant Perk** to add a new perk to the user, optionally with an expiry date and a note. Use **Revoke** next to an active perk to remove it immediately.
  </Step>
</Steps>

## **Lifecycle**

Perks react automatically to common payment events:

| **Event**                     | **What happens to the perk**                                                                                                            |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| **Purchase succeeded**        | Perk is granted to the buyer for every matching trigger in the cart.                                                                    |
| **Refund / chargeback**       | All grants tied to the refunded payment are immediately revoked.                                                                        |
| **Subscription cancelled**    | A **scheduled revoke** is set at the subscription's renewal date — the user keeps the perk for the period they paid for (grace period). |
| **Resubscribed during grace** | The scheduled revoke is cleared — the perk continues uninterrupted.                                                                     |

## **Statistics**

Each perk has its own **Statistics** page (button on the perk row) showing how many active grants currently exist, how many users have used it, and a chart of usage over the perk's active window.

## **Limitations**

<Warning>
  A perk with **no scope** or **no trigger** is dormant — it will never apply to a checkout. The wizard will warn you when this is the case.
</Warning>

<Warning>
  `0%` perks **do not lower the price**, but they still appear in the discount stacking chain. Use them carefully if other perks depend on the stacking order.
</Warning>
