> ## Documentation Index
> Fetch the complete documentation index at: https://developers.pleo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Posting Behaviour

This page describes how integrations must apply **draft** or **finalised** posting when creating accounting entries in the target Accounting System.

Posting status must be applied **after**:

* Export Items are mapped
* attachments are handled
* accounting periods are assigned

And **before** entries are created in the Accounting System.

## Implementation

See the corresponding how-to article for API usage and step-by-step instructions:

* [How to Apply Posting Behaviour](/docs/current/how-tos/accounting-integrations/how-to-apply-posting-behaviour-for-as-erp-processing)

## Implementation rules

### 1. Read posting configuration (integration configuration)

For custom integrations using Export API v3, the Export API does **not** provide a “posting as draft vs finalised” configuration value.

If your integration needs to support configurable posting status, you must implement this as an **integration configuration** (i.e., a setting in your integration that the user controls).

The configuration determines whether entries are created as:

* **draft**, or
* **finalised** (posted)

### 2. Apply posting status when creating entries

When creating accounting entries, the integration must apply the configured posting behaviour and map it to the closest equivalent state supported by the Accounting System.

| Integration configuration       | Required behaviour          |
| ------------------------------- | --------------------------- |
| Export in draft status enabled  | Create entries as draft     |
| Export in draft status disabled | Create entries as finalised |

### 3. Accounting System differences

Accounting Systems may represent posting status differently. Common variants include:

* draft vs posted
* approved vs unapproved
* saved vs committed

The integration must translate the integration’s posting configuration into the closest equivalent posting state supported by the Accounting System.

### 4. Default behaviour

If posting configuration cannot be determined:

* integrations must default to **draft posting**

<callout icon="💡" color="gray_bg">
  Defaulting to draft posting allows users to review exported entries before financial impact occurs.
</callout>

***

## Processing Order

Posting behaviour occurs late in the export workflow:

```mermaid theme={null}

%%{init: {"themeVariables": {"fontSize": "12px"}}}%%
flowchart TD
    A[Fetch Export Items] --> B[Validate data]
    B --> C[Resolve bookkeeping.method]
    C --> D[Map data]
    D --> E[Handle attachments]
    E --> F[Assign accounting period]
    F --> G[Apply posting behaviour #larr; #40;this step#41;]
    G --> H[Create accounting entries]

    %% Styling for readability
    style A white-space:normal
    style B white-space:normal
    style C white-space:normal
    style D white-space:normal
    style E white-space:normal
    style F white-space:normal
    style G white-space:normal
    style H white-space:normal
```

***

## Upstream Dependencies

* Export Job has been started (status = in\_progress)
* Fetch Export Item Data (data layer)
* Bookkeeping method resolved
* **Accounts Mapping** – determines which GL accounts are debited and credited
* **Data Mapping** – ensures amounts, dates, dimensions, identifiers, and VAT/tax information are recorded correctly
* **Attachment Handling** – links receipts and supporting documentation
* **Accounting Periods** – assigns entries to the correct accounting period

## Downstream Dependencies

* **Export Item status update** – updates outcome of Export Item (`successful` or `failed`)
* **Export Job status update** – updates outcome of Export Job (`completed`, `completed_with_errors` or `failed`)

***

## What Comes Next?

* [Update Export Items](/docs/current/integration-design/exports/integration-design-exports-update-export-items)

***

## Related Reading

* [How to Apply Posting Behaviour](/docs/current/how-tos/accounting-integrations/how-to-apply-posting-behaviour-for-as-erp-processing)
* [Export Integration Workflow Guide](/docs/current/guides/export-integration-workflow-guide)
* [AS/ERP Processing Workflow Guide](/docs/current/guides/accounting-system-processing-workflow-guide)

***
