**Deals** in your admin sidebar, under Challenges and offers, put challenges on
sale for a while. A trader needs no code: the shop and the checkout show the
list price struck through, the deal price beside it and a badge such as -18%.

You need the `view_coupons` permission to open the screen and `manage_coupons`
to create, change, switch, end or delete a deal, because a deal is a discount
like a coupon. Somebody with only the first sees everything, with the fields
switched off and a line saying why. The Sales tab also needs `view_payments`,
and the Activity tab `view_activity_logs`.

## The list

The screen opens on the list alone, across its whole width, and shows no deal
in full until you pick one.

Each row is a deal with its label, its window in your firm's time zone and how
long it has left, how many challenges it covers, the deepest discount in it,
what it sold and the revenue per currency, how it treats coupons, when it was
added and where it stands. As the list gets narrower the less important columns
leave first.

A deal stands in one of four places:

- **Live**: inside its window and switched on, so traders pay the deal price.
- **Paused**: inside its window but switched off, so traders see the list price.
- **Scheduled**: its window has not started. One that is switched off says
  **Off**, because it will not start until somebody switches it on.
- **Ended**: its window is over.

The line under the name counts every deal, and the live, paused and scheduled
ones when there are any. Each of those counts is also a filter: click it to see
only those.

Search finds a deal by its label, its note, its ID or the name of a challenge in
it. The filter menu sorts the list (running first, newest, latest start, label,
most sales or deepest discount) and narrows it by status, by program and by how
it treats coupons. Running first is the default: live and paused deals with the
one ending soonest on top, then the scheduled ones with the next to start on
top, then the ended ones. Search, filters, sort and page live in the address,
so a link shows the same list.

`J` and `K` move through the list and Enter opens the lit deal. Right click a
row for everything you can do without opening it: end it now, switch it on or
off, duplicate it or run it again, copy its label, ID or link, and delete it.

## A deal

A deal opens beside the list, which folds into a column, and has its own
address, so a link from a challenge opens on it. The cross or Escape folds the
list back to the same filters and page.

The head shows the label (click it to copy), where the deal stands, its window
with how long is left or since when it ended, and whether a coupon stacks on
it. It says when a challenge in it is switched off, because nobody can buy that
one at the deal price. Under it are the start, the end, the deepest discount,
the paid sales with refunds and open payments counted beside them, and the
revenue with what the deal gave off the list price.

The button in the head is what you most likely want next: **End now** while it
sells, **Switch on** while it is paused, **Switch on** or **Switch off** while it
waits, **Run again** once it has ended. The more menu holds the rest.

### Setup

The first tab is the deal itself, saved with the save dock at the bottom.

- **Deal**: the label, shown next to the price, and an optional note shown on
  the checkout.
- **When**: the start and the end in your firm's time zone, with **Now** for the
  start and one click for a length of 1, 3, 7 or 14 days. **Switched on** pauses
  the deal without deleting it.
- **Coupons**: **Lowest price wins** gives a trader with a coupon whichever is
  lower, the deal price or the list price with their coupon. **Coupon on top**
  takes the coupon off the deal price.
- **Prices**: every challenge you sell, grouped by program, with a find field
  and a switch to show only the ones in the deal. Typing a price puts a
  challenge in the deal, and **Whole program** ticks a program at once. To take
  a selection down by a percentage, type it, pick exact amounts, whole amounts
  or .99, and apply. Every rounding goes down, so the badge never shows less
  than the percentage you typed.

The column beside the form shows the deal as a trader sees it, with its
deepest discount, and the terms in short. It lists the other deals that run at
the same time and how many challenges each shares with this one, and warns
before you save about a missing label or price, a deal price that is not below
the list price, a discount over 50%, a window that ends before it starts or is
already over, a deal longer than 60 days, a challenge that is switched off,
another deal on the same challenge at the same time, and a list price that
changed in the 30 days before the start. That last one matters in the EU, where
the struck price has to be the lowest of those 30 days.

Two deals can never share a challenge at the same time. A save that would do so
is refused and names the challenge and the other deal, also when only the
window moved.

Only what you changed is sent. If somebody ended the deal from the list while
you had it open, fixing a typo in the note does not put its old end back.

### Sales

What the deal sold, per currency: the revenue, the number sold, what the deal
gave off the list price, and what coupons gave on top of that. Refunded
purchases, payments still open and abandoned checkouts are counted in the line
above. Under it, each challenge in the deal with its list price, its deal price
and what it sold, and the latest fifty purchases with the trader, the account
it became and every amount the payment recorded. A change to the deal later
changes none of this, because a payment keeps the prices it was made at.

### Activity

When the deal was made and every change your team saved to it, with each
change of its prices shown per challenge as the old and the new price. The
Activity log has the same lines with every filter.

## A new deal

**New deal** opens an empty deal in the inspector, starting on the next full
hour and running for a week, and the save dock creates it. **Duplicate** or
**Run again** opens a new deal filled from another one: its label marked as a
copy, its note, how it treats coupons and every price, running as long as the
original. A copy of a deal that has not ended starts the minute the original
ends, because two deals on the same challenges may not overlap. A copy of one
that has ended starts on the next full hour.

## Switching, ending and deleting

**Switch off** and **Switch on** act at once. Off inside the window pauses the
deal, off before its start keeps it from starting. Its window stays as it is,
so it still counts against other deals on its challenges.

**End now** asks first. The deal stops at that moment and its challenges go
back to their list price. A deal that has not started cannot be ended: switch it
off instead.

**Delete** asks first and only works on a deal nothing was bought at. A deal
with purchases stays as the record of what they paid, and the menu says why
and what to do instead.

## In the older designs

Propper - OG and Tactical keep their earlier overview, with live, scheduled
and ended deals in three panels, and a separate page to create or edit a deal.
The list with its search, filters and sorting, the Sales and Activity tabs,
switching a deal from the list, duplicating a deal and the list of other deals
at the same time are only in the standard design.