# Deals and their orders

> A deal and its order are one record. Where it is up to, its lines, delivery, invoices and tags, and how what a client has ends or is replaced.

A deal and its order are one record: the deal. It holds where the sale is up to, the lines it is made of with their prices and discounts, every version of its proposal, what has been delivered against it, and the invoices put against it. Nothing is typed twice and nothing has to be kept in step, because there is only the one record. An order is a deal that has been won.

## A deal's page

Each deal has a page of its own, which opens from its card on the **Pipeline**, its row on a client's page or a link to its old order. **Pipeline**, above its name, goes back to the Pipeline as you left it, with your search, filters and place on the board.

- **Its stages** across the top, as steps, the one it is at lit. Press another to move it there: this is where a deal changes stage, other than by dragging its card on the board. Under them is what being at that stage means for this deal, with the **Mark as lost** button at the end of the line until it is delivered, or, once it is lost, where it was lost from and **Reopen**. A won deal has **End it** there too, and one that has ended **Still running** (see [when it ends](#when-it-ends)). Beside its stage, under its name, is where it stands for its client, such as **Current** or **Ended**, with the day.
- **Value**, **Delivered** and **Invoiced** side by side: what it comes to (an estimate, **est.**, until its lines have a price), how many of its lines are delivered and when it is due, and what has been invoiced, with how much is paid and how much waits. Delivered and invoiced show once it is won, or once either has started.
- **Lines**: each with its quantity, price, discount, amount and, once delivery has started, how many are delivered, with what it is based on and its discount's name under it. A new line by hand is the table's last row: type what it is (and its product code, if it has one), how many, the price of one and any discount, each in its column, and press **Add** or Enter. What it comes to shows as you type. The line you added is marked **Just added**, with what it comes to said under the table, and the row empties for the next. **Add from the price list** is under the table (not while the price list is switched off under [Settings · Features](https://docs.sanda-os.com.au/crm/set-up#features)), **Record delivery** at its head, and the pencil changes or rejects a line.
- **Proposals**: every version sent, the latest first, and the final one kept when it was won, each with what it came to and **Open** to see it as a document. **Send a new version** keeps the lines as they are now as the next one.
- **Activity**: the last contact, call, what was agreed and the next step, then its timeline.
- At the side, its **Details** (its client, main person, owner, estimate, reference and days, the day it ended and why once it has, the deal it **Replaces** and the one it was **Replaced by**, and your own fields, with its **History**), its **Invoices** with **Make the invoice** and **Mark paid**, its **Files** and, on Premium, its **Knowledge**.

**As a document**, under its name, opens it as a quote to print or save as a PDF, set out in your CRM's [quote template](https://docs.sanda-os.com.au/crm/price-list#quote-templates). A deal can also start as a quote: **Create quote** on the [price list](https://docs.sanda-os.com.au/crm/price-list#create-a-quote) makes one with the products you tick.

## Where a deal is up to

Every deal is on your CRM's one [pipeline](https://docs.sanda-os.com.au/crm/set-up#pipelines-and-stages), at one of its stages. Every CRM starts with the same seven:

| Stage | What it means |
|---|---|
| **Lead** | Somebody is interested. A deal you add starts here |
| **Scoping** | Working out what they need. An order that comes in from a client waits here for your yes |
| **Proposal** | The proposal has gone |
| **Negotiating** | Agreeing the detail |
| **Approved** | Won: the order is confirmed |
| **Delivered** | Won, and the work has been delivered |
| **Lost** | It did not go ahead |

What a move does follows the kind of stage it moves to, never its name, so you can rename your stages and nothing else changes:

| Move | What it does |
|---|---|
| Into the stage that sends the proposal (**Proposal**) | Keeps a version of its lines as they stand, and logs on its timeline that the proposal went. It does this the first time; after that, send it again when it is revised |
| Into a won stage (**Approved**) | Confirms the order: keeps its lines as the final version, dates it the day it was won, and makes its company a [client](https://docs.sanda-os.com.au/crm/work#prospects-leads-and-clients) |
| Into the stage marked delivered (**Delivered**) | Still won. Moved there by hand, every line is marked delivered. A won deal moves there by itself once every line has been delivered |
| Into a lost stage (**Lost**) | Closes the deal, with why, and remembers the stage it was lost from |
| Reopening a lost deal | Puts it back at the stage it was lost from |

A lost deal keeps its lines, what was delivered and its invoices as they are until it is reopened.

### A deal from the past

A deal brought in after the fact, from a file or by a [connected assistant](https://docs.sanda-os.com.au/crm/assistants#dates-in-the-past), keeps its own days rather than the day it was typed in. It is opened on the day it says, and each move happens on its own day: the proposal goes that day, a win confirms the order and closes the deal that day, and a delivery is dated that day, and its timeline says so. That keeps the **Dashboard**'s win rate and time to win true, since both count from the days a deal opened and closed. A day alone is midday on it in your workspace's time zone. An assistant never dates a move after today; an order or a file that does, as an order from another system sometimes is, closes on its own day as it always has.

## Invoiced and Paid

**Invoiced** and **Paid** are tags on a deal, not stages, so a deal can be delivered and still waiting to be paid, or paid before it is delivered.

- **Invoiced** goes on when an invoice is added.
- **Paid** goes on once every invoice on the deal is marked paid. A new invoice that is not paid yet takes **Paid** off until it is.
- A deal shows its tags from **Approved** on, never while it is still being sold.

## Done with: older than 30 days

A deal that has been **Delivered**, or **Lost**, for more than 30 days folds under the **Older than 30 days** bar, so the pipeline shows the work still under way. The days are counted from the day it was delivered, paid or not, or the day it was lost. A folded deal stays in the list and in search, where **Any tag** still finds the ones invoiced and not paid.

## Where it stands for its client

A won deal also says where it stands in what its client has, beside its stage:

| Standing | What it means |
|---|---|
| **Being delivered** | Won, and not delivered yet |
| **Current** | Delivered, and charged by the month: what the client has, until it ends |
| **Delivered** | Delivered, and charged once: work done |
| **Replaced** | Another deal took its place, the day that one was delivered |
| **Ended** | It stopped, on a day, for a reason |

A deal still being sold is **Proposed**, and one that did not go ahead **Lost**. A client's page sets its deals out by where each stands: see [what a client has](https://docs.sanda-os.com.au/crm/work#what-a-client-has).

### When it ends

When something a client has stops, press **End it** under the stages on its deal's page, give the day it ended and why it ended (up to 300 characters), and press **End it**. A day still to come is notice given: the deal stays **Current** until then, with the day beside it. A deal never ends before it started. Once it has ended it moves under **What came before** on its client's page and no longer counts in [contracted revenue](https://docs.sanda-os.com.au/crm/work#your-home-page).

The day and why are under its **Details**, to put right. **Still running** takes the ending off. Only a won deal ends, so a delivered deal offers **End it** where it offered **Mark as lost**; one still being sold is marked lost instead.

When that was the last thing the client had, with nothing in play, **End it** asks whether they are a former client now. **Mark as a former client** changes their [status](https://docs.sanda-os.com.au/crm/work#prospects-leads-and-clients), and **Keep them a client** leaves it as it is. Nothing makes a former client by itself. A client still under a Current [agreement](https://docs.sanda-os.com.au/crm/agreements) is not asked: end the agreement first.

### A change to what they have

A change to something a client has, such as more seats, a new price or another plan, is a new deal for that client, not a change to the deal that is done. On the new deal's page, under **Details**, choose the deal it **Replaces** from the client's won deals. A [connected assistant](https://docs.sanda-os.com.au/crm/assistants) can name it when it makes the deal.

- From the day the new deal is won, it counts in contracted revenue and the old one does not, so a change is never counted twice. Until the new one is delivered, the old one is still what the client has.
- The day the new deal is delivered, the old one ends by itself, with **Replaced by** and the new deal's name as why, and its history says so, as whoever delivered the new one. Its page says **Replaced** and links to the new deal.
- If the new deal is moved back from **Delivered**, lost, archived or merged away, or its **Replaces** is taken off or changed, the old one runs again, unless somebody has changed its ending since. So a replaced deal has no **Still running** of its own: take **Replaces** off the deal that replaced it.

A deal only replaces one of the same client's, so a deal that replaces another, or that another replaces, moves to another client only once **Replaces** is taken off.

## Its lines

Each line is one product: the item, a product code if it has one, how many, the price of one, and any discount as a percentage. Its amount is the quantity times the price, less the discount, to the cent. A deal holds up to 500 lines. A price can be written the way it is on the order, such as `$12.50 each` or `$1,250 inc GST`, and a discount as `10` or `10%` (see [how a number is read](https://docs.sanda-os.com.au/crm/set-up#how-a-number-is-read)).

A line is charged once, or a month: a fee from your [price list](https://docs.sanda-os.com.au/crm/price-list) goes on as a line a month at the price for the client's size, with its set-up as a line of its own. A line the client turns down is rejected: it stays on the deal, struck through, and counts for nothing.

A line also keeps what it is based on, such as `Your own environment · up to 10 stores`, and the name of its discount, such as **Launch discount**. A line from the price list takes its basis from the product (see [a line's basis](https://docs.sanda-os.com.au/crm/price-list#a-lines-basis)), and a quote shows both: the basis beside the line, and its discounts added up by name under the table. The pencil changes either.

## What it comes to

Before a deal has lines with a price, it holds an estimate you type, shown as **est.** Once any line has a price, the deal is worth what its lines come to, and the estimate is put aside: what is paid once, and 12 months of what is paid a month, the rejected lines left out. Change a line to change it. A deal whose lines lose every price is worth its estimate again.

## Record a delivery

Recording deliveries is optional. Say how many of each line have been delivered so far, all told rather than this delivery alone, or that everything was, and the day it went. Once every line not rejected has been delivered in full, a won deal moves to **Delivered** by itself.

## Invoices

Add each invoice that goes out against a deal: its number if it has one, its date and its amount. A credit note is an invoice for less than nothing, such as `-20`. Mark an invoice paid, with the day it was paid, when the money arrives. A deal holds up to 100 invoices.

**Make the invoice** makes one from a deal for a month, or several:

- What the deal bills once and has not billed yet, such as a set-up. A line billed once is never on a later invoice.
- Each monthly fee, for the months the invoice is for.
- Where project management is switched on for your CRM, the client's chargeable time logged on its tickets and not billed yet, up to the end of those months, at an hourly rate: your price list's price per hour, unless you type another. The hours it bills are marked with the invoice, so they are never billed twice. Project management is switched off in every CRM for now, so an invoice bills no ticket time, and any time already logged waits, unbilled.

It shows what the invoice will hold before it is made, and leaves out a line still waiting for its price, such as a set-up that varies, and says so. The invoice is numbered **INV-1001** and on, and opens as a page to print or save as a PDF. Nothing is emailed from the CRM.

## An opportunity's order

What was an opportunity's order is the deal itself. Its lines are what you are proposing, each time it is sent its lines are kept as the next version, and when it is won the final version is kept and the order is confirmed. Every version, from the first proposal to the order, stays on the deal, and nothing is emailed from the CRM.

An upgrade or an add-on for a client you already have is a new deal, started at whichever stage it is at. One that changes something they already have names the deal it [replaces](#a-change-to-what-they-have).

## Its details and history

A deal has the order's own details beside its name, its client and its main person: its **Reference** (the client's purchase order number, which no two deals share), the day it was **Ordered on** (the day it was won), **Delivery due** and **Delivered on**, and where it came from (added here, or brought in by a file, a stream or the email inbox).

Its **History** is every change to it, who made it and when: each move of its stage, each line added, changed, rejected or taken off, what was delivered, each invoice and each tag, and the template and words its quote is set out in. A deal that took over an order from before shows that order's history too.

## The Orders list

**Orders** is the Pipeline's **List** now, and an old link to it opens there. It lists every deal, the ones folded under the board's **Older than 30 days** bar too, with the columns **Orders** had: its **Tags**, **Value**, **Set-up**, **A month**, **Reference**, **Ordered**, **Due**, **Invoiced** and **Owner**. **Columns** adds others, and **Any tag** narrows it to the deals invoiced, paid, invoiced and not paid, or with no tags. An archived deal leaves the list until it is restored.

## How orders come in

- **By email.** On Premium, Sam reads a purchase order sent to your CRM's [email inbox](https://docs.sanda-os.com.au/crm/inbox) line by line: each line's item, code, quantity, price and discount, with the order's number, day, customer and delivery day.
- **By a stream** from the database your ordering system writes to. See [streams in the CRM](https://docs.sanda-os.com.au/crm/streams).
- **From a file of deals**, each at the stage it has reached. See [past orders](https://docs.sanda-os.com.au/crm/set-up#past-orders).

Each order that comes in is a deal for its customer. A stream or an email can give each order one row, or each line of an order a row of its own, with the order's number on every one of them. It can give a status in its own words, such as **Confirmed** or **Fulfilled**, which puts the deal at the stage it means: confirmed is **Approved**, delivered or closed off is **Delivered**, invoiced or paid adds those tags, and turned down is **Lost**. An order that comes in with no status waits at **Scoping** for your yes. A company it names that is not in the CRM yet is made, as a lead for an order still waiting and a client for one confirmed.

A deal a stream or the inbox brought in follows its source, line by line, until somebody changes it in the CRM. From then on the CRM's copy is the one that is true: a stream finds the deal by its number, leaves it as it is, and says so beside the row.

### An order by email goes onto the client's deal

An order that arrives by email never makes a second deal beside the one you are already working. It goes onto the client's deal:

1. **The deal with its number**, when one has it.
2. **Otherwise the client's only open deal**, when it has no number of its own yet. The deal takes the order's number, so the order's other lines, and a later email about it, find it again.
3. **Otherwise a new deal** for the client, when it has no open deal, or more than one (which one is not the inbox's to guess).

On a deal you are working, the email only adds what the deal does not have yet: its contact and delivery day where they are blank, and each line it does not have, at the foot. Its name, its estimate, its stage and its lines stay as you set them. A line the email gives differently, such as another quantity, is left as it is on the deal and the row says why, so you see what the client asked and decide. Move the deal on yourself when the order confirms it. Nothing is added to a lost deal until it is reopened.

A file of orders, or a stream, finds a deal by its number only.

## Orders from before

Each deal and its order became one deal when your CRM was upgraded, on its first open after the change, with nothing lost. The deal took its order's lines, versions, invoices, files, dates and number, and where the order had gone further than the deal showed, the deal caught up:

| The order was | The deal is now at | Tags |
|---|---|---|
| **Draft** or **Sent** | Where the deal was | None |
| **Approved** | **Approved** | None |
| **Delivered** | **Delivered** | None |
| **Invoiced** | **Delivered** if every line was delivered, else **Approved** | Invoiced |
| **Paid** | **Delivered** if every line was delivered, else **Approved** | Invoiced, Paid |
| **Finalised** | **Delivered** | Invoiced if it had an invoice, and Paid |
| **Rejected** | **Lost** | None |

An order that had no deal (one added by hand, one that came in, or history imported) became a deal of its own, named from its summary or its number. A draft is at **Lead**, or **Scoping** once it has lines; one sent by you is at **Proposal**, and one that came in from the client at **Scoping**; one rejected is **Lost**, with the reason **Order rejected**; and history with no status is **Delivered** and **Paid**. A link to an old order opens the deal it became. The change is in each deal's **History**, made by **Sanda, upgrading the CRM**, which never starts a [workflow](https://docs.sanda-os.com.au/crm/workflows).

## Orders in reports

When the CRM is [on the semantic model](https://docs.sanda-os.com.au/crm/set-up#put-the-crm-on-the-semantic-model), the deals table has each deal's reference, days, estimate, what it comes to once and a month, its tags and the stage it was lost from. Each company's order figures say a status too: a client under a Current agreement that is not an NDA is **Active**, whatever its orders say, so a retainer or a subscription paid month by month under its agreement never reads as a customer still to win. The order tables a report was built on before stay, with the same columns, now read from the deals: every deal as an order with the status it would have had, every line with what it is based on and its discount's name, every invoice with the day it was paid, and every proposal sent. A report built on them keeps working.
