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

# Loyalty program

> Run spend-based rewards that apply themselves at the till, and set the four alerts that reach a customer between visits.

export const StillStuck = ({topic}) => <div className="ck-callout ck-callout--note" role="note">
    <p className="ck-callout__body">
      <strong>Still stuck{topic ? ` with ${topic}` : ''}?</strong>{' '}
      Check <a href="/platform/help/troubleshooting">Troubleshooting</a> first —
      it covers the failures we see most often. If that does not resolve it,{' '}
      <a href="/platform/help/contact-support">contact support</a> and include
      your workspace name and the time the problem happened, so we can find the
      matching entry in your audit log.
    </p>
  </div>;

export const TaskHeader = ({before, time, after}) => <div className="ck-task">
    {before ? <div className="ck-task__cell">
        <div className="ck-task__title">Before you start</div>
        <p className="ck-task__body">{before}</p>
      </div> : null}

    {time ? <div className="ck-task__cell">
        <div className="ck-task__title">Takes about</div>
        <p className="ck-task__body">{time}</p>
      </div> : null}

    {after ? <div className="ck-task__cell">
        <div className="ck-task__title">When you're done</div>
        <p className="ck-task__body">{after}</p>
      </div> : null}
  </div>;

export const Path = ({steps = []}) => <span className="ck-path">
    {steps.map((s, i) => <span key={i} className="ck-path__step">
        {i > 0 ? <span className="ck-path__sep" aria-hidden="true">
            ›
          </span> : null}
        {s}
      </span>)}
  </span>;

export const Availability = ({editions = ['all'], plans, roles, note}) => {
  const list = editions.includes('all') ? ['clinic', 'pharmacy', 'lims'] : editions;
  return <div className="ck-avail" role="note" aria-label="Feature availability">
      <span className="ck-avail__label">Available in</span>

      {list.map(e => <span key={e} className={`ck-pill ck-pill--${e}`}>
          {EDITION_LABELS[e] || e}
        </span>)}

      {plans ? <span className="ck-avail__label">Plan</span> : null}
      {plans ? <span className="ck-pill ck-pill--plan">{plans}</span> : null}

      {roles ? <span className="ck-avail__label">Who</span> : null}
      {roles ? <span className="ck-pill ck-pill--role">{roles}</span> : null}

      {note ? <span className="ck-avail__note">{note}</span> : null}
    </div>;
};

<Availability editions={['pharmacy']} plans="Professional and above" roles="Owner, manager or accountant" />

A customer who spends a set amount within a set window earns a discount, and the till offers it on their next sale without anyone having to remember. Beneath it on the same tab are the four alerts that reach a customer — or you — between visits.

<Path steps={['Sidebar', 'Settings', 'Billing', 'Loyalty Program']} />

<TaskHeader before="A decision on the spend that earns a reward, and what the reward is worth" time="5 minutes" after="Rewards accruing automatically and offering themselves at the till" />

## What this tab controls

Two cards. The first is **Customer loyalty** — "Customers who spend the threshold within the window earn a reward, applied automatically as a discount on their next sale."

| Control                                 | What it does                                                                            | Default                 |
| --------------------------------------- | --------------------------------------------------------------------------------------- | ----------------------- |
| **Program active**                      | "Turn the loyalty program on or off."                                                   | On                      |
| **Program name**                        | What the programme is called internally.                                                | Loyalty rewards         |
| **Spend threshold**                     | The amount a customer must spend to earn one reward. Shown in your own currency symbol. | Empty — you must set it |
| **Reward type**                         | **Percent off** or **Fixed amount off**.                                                | Percent off             |
| **Reward value**                        | The percentage, or the amount.                                                          | Empty — you must set it |
| **Accrual window**                      | How far back spending is counted.                                                       | A rolling 90 days       |
| **Max rewards per customer** (optional) | A cap. Leave empty for **Unlimited**.                                                   | Unlimited               |

The second card is **Customer alerts & reminders** — "A daily sweep. Everything here is off until you turn it on, and customers can opt out of their own reminders from their profile."

| Control                                         | What it does                                                                                                       | Default |
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ | ------- |
| **Remind customers after (days)**               | Emails a customer once their oldest unpaid balance is older than this. 1–365, or empty for none.                   | **Off** |
| **Alert me above (\{symbol})**                  | Emails **you**, not the customer, when one person owes more than this.                                             | **Off** |
| **Tell customers when a reward is ready**       | The loyalty email itself. "Sent at most once a month per customer, and only while a loyalty programme is running." | **Off** |
| **Remind me about overdue prospect follow-ups** | Emails you a list of potential customers whose follow-up date has passed.                                          | **Off** |

The two live together because they are the same job — reaching a customer who is not standing in front of you — and one of the switches is the loyalty programme's own email. A programme with the email switched off still works; the customer just finds out at the till instead of in their inbox.

## Set it up

<Steps>
  <Step title="Name the programme">
    **Program name** is what you will recognise it by. Leave **Program active** on.
  </Step>

  <Step title="Set the threshold">
    **Spend threshold** is the total spend that earns one reward. Pick a number a regular customer reaches in a month or two, not one nobody reaches.
  </Step>

  <Step title="Choose the reward">
    **Percent off** or **Fixed amount off**, then a **Reward value**. Both must be greater than zero — the errors read "Enter a spend threshold greater than zero." and "Enter a reward value greater than zero."
  </Step>

  <Step title="Choose the accrual window">
    This decides how far back spending counts. A shorter window rewards frequency; a longer one rewards total loyalty.
  </Step>

  <Step title="Cap it, if you want to">
    **Max rewards per customer** stops one person earning indefinitely. Leave it empty for unlimited.
  </Step>

  <Step title="Save the programme">
    Select **Save program**. You get "Loyalty program saved".
  </Step>

  <Step title="Turn on the alerts you want">
    On the card below, switch on anything you want sent and select **Save alert settings**. Everything there starts off, on purpose — nothing reaches a customer until you decide it should.
  </Step>
</Steps>

## What changes once you save

**At the till**, a customer whose record shows enough spend gets a banner reading "\{n}% loyalty reward available" with an **Apply** button. Applying it changes the banner to "Loyalty reward applied to this sale" and the discount comes off the total. A customer who is part way there sees "\{amount} more to the next reward" instead — worth reading aloud, since it is the whole point of the programme.

**Rewards accrue against a customer record.** A walk-in rung up with no customer attached earns nothing and can be offered nothing, because there is nothing to attach the spend to. If a programme looks like it is not working, this is almost always why — see [Customers](/pharmacy/customers/index).

**On a customer's profile**, their progress appears. With no programme running, that panel instead reads "No loyalty programme running — Set one up in Settings → Loyalty to reward repeat customers."

**Switching Program active off** stops new accrual and stops the till offering rewards. It does not erase what customers have already earned.

**Changing the threshold or the window re-scores everyone** against the new rule from that moment. Raising the threshold can take an available reward away from someone who had one; lower it and several customers may qualify at once.

**The four alerts run as a daily sweep**, not instantly, and a customer can opt out of their own reminders from their profile regardless of what you set here.

## Check it worked

Open a customer who has spent past the threshold within the window and start a sale for them: the reward banner should appear with **Apply**. Then open a customer who has not, and confirm they see "\{amount} more to the next reward". Finally, check their profile shows the programme rather than the "No loyalty programme running" line.

## Common issues

<AccordionGroup>
  <Accordion title="The tab shows an upgrade prompt instead of the settings">
    "Available on Professional and above" — the programme needs a Professional plan or higher. See [Change your plan](/platform/plans/change-plan).
  </Accordion>

  <Accordion title="No reward appears at the till for a regular customer">
    Check three things: the sale has a customer attached; their spend inside the **Accrual window** actually reaches the **Spend threshold**; and they have not hit **Max rewards per customer**.
  </Accordion>

  <Accordion title="Save is refused">
    Both **Spend threshold** and **Reward value** must be greater than zero. The toast names which one.
  </Accordion>

  <Accordion title="Customers are not being emailed about their rewards">
    **Tell customers when a reward is ready** is off — everything on the alerts card starts off. It also sends at most once a month per customer, and only while a programme is running.
  </Accordion>

  <Accordion title="A customer says the discount vanished">
    You changed the threshold or the window, and they no longer qualify under the new rule. Rewards are re-scored against the current settings, not the ones in force when they shopped.
  </Accordion>

  <Accordion title="Walk-ins never earn anything">
    Correct — accrual needs a customer record. Register them at the till first; it takes a moment. See [Customers](/pharmacy/customers/index).
  </Accordion>
</AccordionGroup>

<StillStuck />
