Skip to main content
Posting behaviour determines whether accounting entries are created as draft or finalised in the Accounting System.

Prerequisites

Before you begin:

Steps

1. Read Posting Configuration

The Export API does not provide posting behaviour. If posting behaviour is required, it must be defined as an integration configuration.
postingMode = config.postingMode   // "draft" or "finalised"

2. Apply Posting Behaviour

When creating accounting entries, apply the configured posting mode:
if postingMode == "draft":
    createDraftEntry(exportItem)
else:
    createFinalisedEntry(exportItem)

3. Map to Accounting System Status

Accounting Systems may represent posting status differently. Common equivalents:
  • draft vs posted
  • approved vs unapproved
  • saved vs committed
The integration must translate the configured posting mode into the closest equivalent supported by the Accounting System.
asStatus = mapPostingModeToAS(postingMode)

4. Apply Default Behaviour

If posting configuration is missing or cannot be determined:
postingMode = "draft"

5. Create Entry and Capture Result

Once posting behaviour has been applied, the integration must create the accounting entry in the Accounting System.
result = accountingSystem.createEntry(mappedEntry, postingStatus)
The integration must capture the result of this operation:
  • success (entry created)
  • failure (entry rejected)
If the operation fails:
  • capture the error message from the Accounting System

Result

After completing this step:
  • Posting behaviour has been applied (draft or finalised)
  • The accounting entry has been created in the Accounting System
  • The success or failure status of the operation has been captured
  • Any error messages are available for downstream handling

What Comes Next?

At this point, AS/ERP processing is complete for the current Export Item. Repeat the AS/ERP processing steps for all remaining Export Items and capture the success or failure result for each item immediately. This reduces the risk of data inconsistency in scenarios such as connection loss or partial failures. Reporting Export Item statuses back to Pleo (next step) must be performed in batches of up to 100 items per API request.
this how-to is part of: