- a debit account
- a credit (counter) account
- Export Items are fetched
- Bookkeeping method has been resolved
Implementation
See the corresponding how-to article for API usage and step-by-step instructions:Mapping Inputs
Accounts Mapping depends on:data[].typeanddata[].subType(e.g.,card_purchase,invoice,wallet_topup)- Expense category (Expense GL Account)
- Bookkeeping method:
journalaccounts_payable
Required Account Configuration
The integration must obtain the following GL accounts from user configuration in the Accounting System:- Pleo Wallet Account
- Pleo Out-of-Pocket Account
- Pleo Contra Account
- Accounts Payable Account (fallback)
Vendor-Specific Accounts Payable
When Accounts Payable Applies
If:Vendor Resolution Logic
- If
data[].vendorexists:
- Match vendor in the Accounting System using:
vendor.code(preferred)- or
supplier.code(legacy support)
- If a match is found:
- Use vendor-specific Accounts Payable account
- If no match or vendor is missing:
- Use fallback Accounts Payable account from configuration
Example
- Vendor =
ACME Ltd→ matched →2901-AP-ACME - Vendor not found →
2000-AP-Default
Expense Booking Logic
Scope
This section defines how debit and credit accounts are assigned once:- bookkeeping method is resolved
- (for Accounts Payable) vendor resolution is completed
Line-Level Expense Account
Each Export Item line provides the expense (debit) account:Fields
- id – internal Pleo account ID
- name – category name
- code – ERP-facing GL account code
- identifier – ERP-facing identifier
Counter Account Sources
The counter account is determined as follows:Journal Entries
If:data[].type+data[].subType- Expense Type Mapping rules
data[].contraAccount(when provided)- configured accounts:
- Wallet account
- Out-of-pocket account
- Contra account
Accounts Payable Entries
If:- vendor-specific AP account (if resolved)
- otherwise fallback AP account
Mapping Rule Summary
- Identify bookkeeping method
-
Set expense (debit) account from:
data[].accountingEntryLines[].account
-
Determine counter account:
- journal
- Based on Expense Type Mapping rules
data[].type+data[].subTypedata[].contraAccount(if applicable)- configured wallet / out-of-pocket / contra accounts
- Accounts Payable
- Vendor-specific Accounts Payable account if matched
- Otherwise fallback Accounts Payable account
- journal
Example Mapping Table
| Export Item Type | Bookkeeping Method | Debit Account (Expense) | Credit Account (Counter) |
|---|---|---|---|
card_purchase | journal | data[].accountingEntryLines[].account | data[].contraAccount (wallet/bank) |
invoice | accounts_payable | data[].accountingEntryLines[].account | Vendor AP account or fallback |
wallet_topup | journal | Wallet account | Contra account (direction depends on flow) |
Expense Type Mapping Dependency
Accounts Mapping relies on Expense Type Mapping, which defines:- how
typeandsubTypedetermine accounting treatment - how counter accounts are selected for journal entries
Upstream Dependencies
- Export Job has been claimed (status = in_progress)
- Fetch Export Item Data (data layer)
- Bookkeeping method resolved
Downstream Dependencies
- 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
- Posting Behaviour – determines whether entries are created as drafts or finalised
- Export Item status update – updates outcome of Export Item (
successfulorfailed) - Export Job status update – updates outcome of Export Job (
completed,completed_with_errorsorfailed)
What Comes Next?
Related Reading
- How to Apply Accounts Mapping for Export Items
- Export Integration Workflow Guide
- AS/ERP Processing Workflow Guide