# Twinfield provisional and final

When to use provisional vs final posting.

This guide explains how to use **Twinfield provisional booking** in Cortena, run an **internal approval** step, and then **finalize** the same purchase transaction in Twinfield once your team approves.

**Who this is for:** Finance teams on Twinfield who want invoices to appear in the ledger early (provisional booking) while Cortena still controls an approval gate before the booking is posted as final.

## What you get end to end

1. **Bookkeeping prep** · extraction, matching, and any earlier review/approval steps.
2. **Provisional export** · Cortena sends the invoice to Twinfield as a **provisional** purchase transaction (INK).
3. **Internal approval** · the invoice waits in Cortena on an **Approval** (or **Review**) step. Twinfield already shows the provisional entry.
4. **Final export** · after approval, Cortena **updates the same Twinfield transaction** and posts it as **final**.
5. **Mark synced** · a **Set invoice status** step sets the list badge to **Synced**.

## Prerequisites

- Twinfield is connected and reference data is synced. See [Twinfield](https://help.cortena.ai/guides/integrations/twinfield).
- Purchase transaction type is selected and Document Imaging is configured.
- You can edit and publish the tenant **Invoice workflow**.

## 1. Build the workflow

Open **Settings → Workflows → Invoice workflow** and add two **Export to accounting** nodes plus an approval step between them.

| Order | Node (example) | Type | Configuration |
| --- | --- | --- | --- |
| 1 | **Provisional Export** | Export to accounting | Target: Twinfield · Booking stage: **Provisional** |
| 2 | **Enforce Approval of Booking** | Approval | Assign approvers · connect **Approved** to next export |
| 3 | **Mark Final in Accounting** | Export to accounting | Target: Twinfield · Booking stage: **Final** |
| 4 | **Mark synced** | Set invoice status | Display status: **Synced** |

Connect edges using the **Success** output on each export node. From **Approval**, use **Approved** to reach the final export node.

![Workflow: provisional export, approval, then final Twinfield export](https://help.cortena.ai/assets/img/help/twinfield-provisional/01-workflow-provisional-approval-final.png)

## 2. What happens in Twinfield

| Stage | Cortena action | Twinfield result |
| --- | --- | --- |
| Provisional export | Creates INK purchase transaction | Transaction appears with **provisional** destiny |
| Approval | Human step in Cortena only | No change in Twinfield |
| Final export | Updates the **same** transaction number | Booking is posted **final** |
| Mark synced | Sets Cortena list status | Invoice shows **Synced** in Cortena |

## 3. Run the flow on a real invoice

1. When the invoice reaches **Provisional Export**, use **Export to Twinfield** (or Auto).
2. Approvers complete the approval step. On **Approved**, the invoice moves to final export.
3. On **Mark Final in Accounting**, export again. Cortena finalizes the existing transaction. It does **not** create a duplicate INK entry when the provisional transaction number is known.
4. After final export succeeds, **Mark synced** sets the list badge.

## Tips

- Two export nodes are required. One provisional, one final.
- Manual export uses the **current workflow node** to decide provisional vs final.
- Keep the approval node between the two export steps.
- Invoices stay off **Synced** until **Set invoice status** runs, even after a successful final Twinfield export.
