# Quotations and invoices with AI

On a draft quotation or invoice you can describe the phases and positions you need, the way you'd tell a colleague,
or add an hours list:

> Three phases: concept, design, development. Two workshop days of UX, then 12 days of design.

> Bill the hours list, one position per person, only billable hours.

The AI proposes positions with their services and quantities, and you see what would be added and
what it comes to before anything changes.

## An admin turns it on first

It's off in every workspace until an Admin ticks **Write quotations and invoices with AI** under
**Administration → Integrations → AI**. The text you write, the services' names and, with a file, its
columns and first rows then go to the AI set there (see [External costs](https://docket.rocks/en/docs/external-costs) for
which AI that is). **Rules for the AI** there go with every request, for how your agency writes its
documents (*"hours lists always one position per person and service"*).

## How it works

1. Open a draft quotation or invoice and click **AI** at the top, or **Open the assistant** on an empty
   document.
2. Write what to add and press Enter. With the paperclip you add an hours list (Excel or CSV).
3. If something isn't clear, the AI asks, with answers to click. Otherwise it shows what would be
   added: positions, their services and quantities, each line's amount and the total.
4. **Apply** adds it to the document; **Discard** doesn't.

A comment by docket, marked **AI**, then lists what was added (each position with its hours or
days and service) and which file it came from. The file stays with the comment; colleagues can open it there. A file that was never used
is deleted.

## What the AI does and doesn't

- **Prices:** none. Every line is a service with hours or days, priced from the project's rates as
  in the editor. The AI never sees a rate.
- **A file:** the AI sees its columns and first rows and says how to read it: which column holds the
  hours, what makes a position, which service a row is, which rows count. docket reads every row
  and adds them up itself, so the sums are the file's.
- **The document's structure:** a document in phases gets positions in phases (into an existing
  phase by its title); one with agency services gets them there.
- **Which documents:** drafts only, for Project Managers and Admins. An invoice to an order
  confirmation takes its positions from it, as with [templates](https://docket.rocks/en/docs/quotation-invoice-editor).

## Limits

On docket's AI access, docket gives every workspace €5 in tokens a month, shared with reading
external costs and booking time; how much is used this month shows under Administration →
Integrations → AI. A long hours list uses more than a short request. If it isn't enough, let us know
at info@docket.rocks or connect your own model. With your own API key there's no limit in docket.

## With an AI app

A [connected AI app](https://docket.rocks/en/docs/ai-connections) can do the same from Claude or ChatGPT: start a draft and
add positions to it, priced by docket the same way.