# Order-to-invoice process

> Set up the path from order to invoice with flows — which order follows which flow (rules), where and by whom despatch notes and invoices are issued, your own stages in between (awaiting payment, credit approval, acceptance inspection, customs exit), weekly batch invoicing, invoice as despatch note, scenario and exchange rate.

The steps after a quote is accepted — order, shipment, despatch note, invoice, collection — vary by sale even within one company: domestic goods, services, exports, public-sector sales and export-registered sales need different documents in a different order, and steps such as payment, credit approval or acceptance inspection hold the shipment or the invoice. Under **Settings → Order-to-invoice process** (admins) you set this up with **flows**.

With the module off, orders work as before; the e-Documents menu and the e-Invoice / e-Despatch buttons are hidden and your accounting connection is left untouched.

## Flows {#flows}

Each flow has **rules**, **steps**, **invoice settings** and **stages**. When an order is saved, flows are tried in list order; the first flow whose rules all match is written to the order, otherwise the **Default** flow is used. Change the order with the arrows in the list; a flow that is turned off gets no orders.

An order's flow can also be changed by hand from the stage button in the order list (e.g. an export-registered sale is chosen per order, not per customer). A flow without rules only gets orders this way.

In **Which flow will this order follow?** pick an order, or a company, product, amount and payment term, and click **Try**: you see the chosen flow and which rule of the other flows didn't match.

### Ready-made flows {#templates}

**Add a flow** starts from a ready-made flow; change its rules, steps and stages afterwards. Ready-made flows without rules can also be applied to the Default flow with **Apply to Default**.

| Ready-made flow | Rule | Steps | Document |
|---|---|---|---|
| **Domestic standard** | — | shipment → e-Despatch → invoice from the despatch | e-Invoice if the buyer is registered, otherwise e-Archive |
| **Invoice as despatch note** | — | shipment → invoice on delivery, travels with the goods | no separate despatch note; the invoice says *Replaces the despatch note* |
| **Services** | goods / service: service | invoice from the order, no shipment | withholding if needed |
| **Public sector** | company type: public body | shipment → **Acceptance inspection** → invoice | Public scenario (beta) |
| **Export** | company type: abroad | **Payment / proforma approval** → invoice on shipment → **Customs exit** | Export scenario (beta) |
| **Service export** | — | invoice from the order | VAT exemption 302 |
| **Export-registered** | — (chosen on the order) | standard | Export-registered invoice (beta) |
| **Prepaid** | payment term ≤ 0 days | **Awaiting payment** → shipment | — |
| **Credit approval** | amount ≥ limit | **Credit approval** (admin) → shipment | — |
| **Accounting runs it** | — | order to the ERP, despatch and invoice in the accounting software | — |
| **Sample / free of charge** | — | shipment → despatch note, no invoice | — |

### Rules {#rules}

**All** rules of a flow must match; several values in one rule mean **any of them**. Fields:

| Field | Read from |
|---|---|
| Company type (domestic company · individual · public body · abroad) | Company card → **Invoice details**; an 11-digit tax number counts as an individual |
| Country, city, industry, company tag / category, company | company card |
| Product group, goods / service | product; goods / service from [product tax details](#products) |
| Order type, currency | order |
| Amount (base currency) ≥ / ≤, payment term (days) ≥ / ≤ | order; a payment-term rule doesn't match an order without a term |
| Owner, department | the person who entered the order / the company owner |

## Steps {#steps}

**1 · Order:** *CRM only* · *Send to ERP manually* (button on the order) · *Send to ERP automatically* (on save). If any flow sends orders to the ERP, **Send sales orders** is turned on in the accounting connection; automatic sending only applies to that flow's orders ([Accounting & ERP](/guides/erp)).

**2 · Shipment and despatch note:** *e-Despatch in the CRM* · *Paper despatch note* (only if you are not registered for e-Despatch) · *Accounting / ERP issues it* · *Invoice replaces the despatch note* · *No shipment or despatch note* (services). With e-Despatch in the CRM choose **Open an e-Despatch draft when a shipment is entered** and a sending route for this flow.

**3 · Invoice:** *e-Invoice / e-Archive in the CRM* · *Accounting / ERP issues it* · *No invoice* (samples, free of charge). In the CRM:

- **Invoice basis:** *Despatch first, invoice from the despatch* · *Direct invoice* · *Both*.
- **Invoice draft:** *Manual* · *On every shipment* · *When the order is complete* · *Weekly batch* (after 07:00 on the chosen day, uninvoiced shipments go into one draft per company and currency) · *When the order is saved* (flows without shipments).
- **e-Invoice route:** per flow; empty means the default route in the e-Documents settings.

With **Invoice replaces the despatch note** the invoice is opened on every shipment, its time is the moment of delivery and it says *Replaces the despatch note*; no separate despatch note is issued. An invoice must be issued within 7 days of delivery (Tax Procedure Law 231/5): the document check warns on weekly batch invoices and late drafts.

**Who issues:** *The salesperson issues* or *Sales prepares, an authorised user issues* — authorised users are chosen under **Settings → e-Documents**. Automatically created documents are always **drafts**; sending to GİB always takes a person's approval.

:::note
Automatic drafts apply to shipments **after** a flow is saved; past shipments are not touched. Changing a flow doesn't move open orders to another flow. Shipments arriving through ERP sync, the API or MCP join their order's flow through the scheduler sweep.
:::

## Invoice settings {#documents}

New drafts open with the flow's values; each document can change them ([scenarios, currency and withholding](/guides/e-documents#scenarios)).

| Setting | Options |
|---|---|
| Scenario | Domestic sale · Public body · Export (with customs declaration) · Service export · Export-registered sale — if the company card marks a public body, a domestic sale becomes Public automatically |
| Invoice profile | By buyer · Commercial · Basic |
| VAT withholding | from the code list; a code set on the product takes precedence |
| Invoice currency | Order currency · TRY (foreign-currency orders converted to TRY) · a specific currency |
| Rate source | CBRT forex buying (default) · forex selling · banknote buying · banknote selling · Solk's rate |
| Rate day | Published in the Official Gazette on the invoice date (previous business day's 15:30 announcement, default) · the invoice day's 15:30 announcement |
| Export | delivery terms, transport mode, package type |
| 555 | Sale outside our activity code's VAT rate (beta) |

## Stages {#stages}

Your own steps in between — awaiting payment, credit approval, in production, quality check, acceptance inspection, customs exit. Each stage has a name, colour, **position**, whether it **holds**, **who advances it** and a **target time**.

| Position | If it holds |
|---|---|
| Before shipment | no shipment can be entered and no invoice opened |
| Before invoice | no invoice draft is opened (automatic or manual) |
| After invoice | never holds — for information (e.g. collection, customs exit) |

- A new order starts at the flow's first stage. **When a shipment is entered** it moves to the first before-invoice stage, **when the invoice is issued** to the first after-invoice stage; earlier stages that don't hold are skipped.
- **Who advances:** anyone who can edit the order · the owner · accounting (invoice issuers) · admins · chosen people. Admins can advance any stage and pick a stage by hand.
- When the **target time** passes, the people who can advance the stage get one notification.

In the **Orders** list the order's stage shows as a coloured chip; with several flows the flow name is written below. Clicking the chip opens a window with the stages, the reason for the hold, **Advance** (with an optional note), stage selection, flow change and the latest moves (who, when, automatic or not). On a held order the shipment and invoice buttons show a lock; clicking them opens the same window. Flows without shipments have no shipment button.

## Product tax details {#products}

**Settings → Order-to-invoice process → Product tax details**: each product's VAT rate (empty means the default in the e-Documents settings), **goods / service**, **withholding code** and **HS code (GTİP)** (written on the line of an export invoice, 12 digits). Withholding rates are changed on the same page; the codes are fixed.

## Readiness {#readiness}

The **Readiness** list at the bottom shows what's missing in every flow (seller details, integrator, authorised users) once, and flow-specific items under the flow's name: a flow without rules, IBAN for public bodies, HS codes for exports, an invoice issuer for an accounting stage, a sending route that is no longer connected.