What You’ll Have Built
After implementing this workflow:- Each Export Item correctly routed to a journal entry or accounts payable workflow based on its bookkeeping method.
- GL accounts resolved and balanced for every accounting entry.
- Expense data accurately mapped into the Accounting System’s required fields, including amounts, dates, tax codes, and dimensions.
- Receipts and supporting documents attached to their corresponding accounting entries.
- Entries assigned to the correct accounting periods, with closed period scenarios handled.
- Entries created with the correct posting status (draft or finalised) per integration configuration.
- Predictable, auditable accounting outcomes for every Export Item in the batch.
Who This Guide Is For
This guide is intended for:- Integration developers implementing exports
- Solution architects designing accounting integrations
- Technical partners building Accounting System connectors
Before You Start
You should be familiar with:- The Export Integration Workflow Guide, which covers how Export Jobs are detected and Export Items are fetched from Pleo.
- This guide begins where that guide’s Step 4 (Fetch Export Item Data) ends. Export Items must already be fetched and validated before this workflow starts.
AS/ERP Processing Workflow Overview
Once Export Items have been fetched from Pleo, the integration processes each Export Item into an accounting entry inside the Accounting System. The six steps in this guide cover everything from determining how the expense should be recorded, through accounts and data mapping, attachment handling, and period assignment, to creating the entry with the correct posting status. Each step is applied per Export Item. A failure at any step for a given Export Item is recorded as a failed Export Item and does not block other Export Items from being processed. Once all Export Items are processed, the integration returns to the Export Integration Workflow to report outcomes back to Pleo and complete the Export Job.Steps
1. Determine Bookkeeping Method
Purpose
Before any accounting entry can be created, the integration must determine how each expense should be recorded. Pleo provides the bookkeeping method for each Export Item via thebookkeeping.method field. The integration reads this value and routes processing accordingly: journal produces a standard journal entry, accounts_payable produces a vendor-based invoice and payment, and none is treated as journal. Pleo sets none for non-payable balance adjustments such as wallet loads, wallet unloads, and balance amendments.
Input
Thebookkeeping.method field from the Export Item, with one of four values: journal, accounts_payable, none (non-payable balance adjustments such as wallet loads and balance amendments, always treated as journal entry), or null (legacy support).
Workflow Process
Output
- Bookkeeping method resolved for this Export Item: journal entry or accounts payable
- Integration routed to the appropriate recording workflow for the Export Item
Why It Matters
The bookkeeping method determines the entire structure of the accounting entry. Journal entries and accounts payable records have different debit/credit structures, different fields, and different downstream behaviour in the Accounting System. Resolving the method first ensures every subsequent mapping and posting step operates on the correct structure for the Export Item.Integration Design
If you’re an integration developer or architect, read the Bookkeeping Method Resolution integration design doc, as well as Journal Entry Handling and Accounts Payable Handling, before implementing this step. They cover the resolution logic for each possible value ofbookkeeping.method, including how none is handled, and the specific entry structures required for journal entries and accounts payable.
Step-by-Step Instructions
When you’re ready to start implementing, follow the step-by-step instructions in the accompanying How-to article.2. Apply Accounts Mapping
Purpose
With the bookkeeping method known, the integration resolves which GL accounts to use for the debit and credit sides of the entry. This includes the expense account (determined by the expense category), the contra account (wallet, bank, or clearing), and for accounts payable entries, the vendor account. The integration relies on its own mapping configuration and the Accounting System to validate that all resolved accounts exist and are active.Input
- The expense category from the Export Item, used to determine the expense GL account
- Wallet, contra, and out-of-pocket account configuration from the integration
- Vendor configuration from the integration and the Accounting System (for accounts payable entries)
- The bookkeeping method resolved in Step 1
Workflow Process
Output
- All debit and credit GL accounts resolved for this entry
- Accounts validated as existing and active in the Accounting System
- The integration knows exactly which accounts to debit and credit to produce a balanced accounting record
Why It Matters
Incorrect accounts mapping produces entries that post to the wrong GL accounts, distorting financial statements, balance sheets, and reconciliations. Getting mapping right is fundamental to the accuracy of the Accounting System and directly affects whether period-end reporting is reliable.Integration Design
If you’re an integration developer or architect, read the Accounts Mapping integration design doc before implementing this step. It covers the mapping rules for each account type, how the bookkeeping method affects which accounts are required, expense type rules, and how to handle missing or invalid accounts.Step-by-Step Instructions
When you’re ready to start implementing, follow the step-by-step instructions in the accompanying How-to article.3. Apply Data Mapping
Purpose
With accounts resolved, the integration maps the financial data from the Export Item into the fields required by the Accounting System. This covers mandatory fields that every entry must include (amounts, dates, currency, and unique identifiers), invoice-specific fields for accounts payable entries (vendor references and payment terms), optional fields where available (dimensions, tags, and notes), and VAT handling rules where the Accounting System requires tax information.Input
- The full Export Item payload from Step 4 of the Export workflow, containing all financial data provided by Pleo
- Integration configuration for dimensions, tax codes, and optional field mappings
Workflow Process
Output
- A complete, accounting-ready payload with all required fields mapped to the Accounting System’s expected structure
- VAT and tax information applied where required
- The entry is ready to be assigned a period and posted
Why It Matters
Accurate data mapping ensures every accounting entry contains the correct amounts, references, tax treatment, and dimensions. Incomplete or incorrect mapping leads to reporting errors, failed reconciliations, and compliance issues that are difficult and costly to correct after posting.Integration Design
If you’re an integration developer or architect, read the Data Mapping integration design doc before implementing this step. It covers mandatory, invoice-specific, and optional field mappings, VAT handling rules, and how to handle missing or unsupported fields.Step-by-Step Instructions
When you’re ready to start implementing, follow the step-by-step instructions in the accompanying How-to article.4. Transfer Attachments
Purpose
Receipts and supporting documents associated with each Export Item must be downloaded from Pleo and uploaded to the Accounting System, where they are linked to the accounting entry. The integration must handle cases where no attachments exist (skipping cleanly), where multiple attachments are present, and where upload failures occur. Idempotency is important: re-running this step should not produce duplicate attachments.Input
- Attachment references from the Export Item payload, including download URLs and metadata for each receipt or supporting document
- The accounting entry reference, used to link uploaded attachments to the correct record in the Accounting System
Workflow Process
Output
- Receipts and supporting documents uploaded to the Accounting System and linked to the corresponding accounting entry
- Items with no attachments skipped without error
- Upload failures recorded and handled without blocking other Export Items in the batch
Why It Matters
Attached receipts are essential for audit trails, expense compliance, and bookkeeper review. Without them, accountants must retrieve receipts manually from Pleo or original sources, increasing workload and the risk of documentation gaps during audits or compliance checks.Integration Design
If you’re an integration developer or architect, read the Attachment Handling integration design doc before implementing this step. It covers the attachment retrieval process, how to handle multiple attachments, failure handling, and idempotency requirements.Step-by-Step Instructions
When you’re ready to start implementing, follow the step-by-step instructions in the accompanying How-to article.5. Assign Accounting Period
Purpose
The integration must determine which accounting period the entry belongs to and post it to that period. The default posting date is the expense transaction date from the Export Item. If the Accounting System rejects the posting because the period is closed, the integration applies a configured closed-period strategy: either adjusting the posting date to the next open period and retrying, or failing the Export Item with a clear reason. Once posting succeeds, the integration confirms which period the entry was assigned to using the final posting date.Input
- The expense date (
exportItem.date) as the default posting date - Integration configuration for the closed-period handling strategy: adjust and retry, or fail the Export Item
- Accounting System period rules, fiscal calendar, and open period information
Workflow Process
Output
- The accounting entry assigned to a valid open period using the correct posting date
- Entries rejected due to closed periods either reassigned to an open period (if adjustment is enabled) or failed with a clear reason
- The final resolved accounting period confirmed
Why It Matters
Period assignment determines where entries appear in financial reports. An entry posted to the wrong period distorts profit and loss statements and makes period-end reconciliation unreliable. Handling closed periods correctly prevents entries from being silently rejected or posted to incorrect periods without the bookkeeper being aware.Integration Design
If you’re an integration developer or architect, read the Accounting Periods integration design doc before implementing this step. It covers the expense date vs posting date distinction, the closed-period handling strategies, how to resolve accounting periods for custom or fiscal calendars, and the service period field.Step-by-Step Instructions
When you’re ready to start implementing, follow the step-by-step instructions in the accompanying How-to article.6. Apply Posting Behaviour
Purpose
Before creating the accounting entry, the integration applies the configured posting behaviour: whether entries should be created as drafts (held for bookkeeper review before affecting financial statements) or finalised (posted immediately). The Accounting System may use different terminology for these states, and the integration must translate its configuration into the closest equivalent state supported by the system. If no posting configuration is found, the integration defaults to draft posting.Input
- Integration posting configuration: draft status enabled or disabled
- The Accounting System’s supported posting states and their labels (e.g. draft/posted, approved/unapproved, saved/committed)
Workflow Process
Output
- The accounting entry created in the Accounting System with the correct posting status
- The entry ID and external URL captured from the Accounting System response, ready to be reported back to Pleo in the Export workflow
Why It Matters
Posting behaviour determines whether entries immediately impact financial statements or are held for review first. Draft posting gives bookkeepers the opportunity to verify entries before they affect reporting, particularly valuable during initial integration setup, after configuration changes, or when processing large batches. Defaulting to draft when configuration is missing prevents unintended immediate posting.Integration Design
If you’re an integration developer or architect, read the Posting Behaviour integration design doc before implementing this step. It covers the supported posting states, how to map them to Accounting System equivalents, the default behaviour rules, and the implementation order within the export workflow.Step-by-Step Instructions
When you’re ready to start implementing, follow the step-by-step instructions in the accompanying How-to article.Result
After completing this workflow for all Export Items:- Accounting entries exist in the Accounting System for each successfully processed Export Item
- Entries are balanced, correctly mapped, and assigned to the correct periods
- Attachments are linked to their corresponding entries where supported
- Each entry reflects the configured posting status (draft or finalised)
- A success or failure result has been captured for every Export Item, ready to be reported back to Pleo