Integrating Pleo with Xledger enhances your financial operations by automating expense management and streamlining accounting processes. This guide outlines the steps for setting up the integration, handling standing data, exporting expenses, and managing errors.
Setting things up
To begin the integration between Pleo and Xledger, ensure you have administrative access to both platforms. This setup phase involves configuring authentication and preparing your standing data.
When ready get in touch with your Xledger CSM representative or support to book a set up call with the integration team to perform the following tasks.
Authentication
On Xledger's side
Access Xledger.net and log in to your Xledger account with domain admin credentials. Navigate to the API settings in Xledger (Administration>System Access>GraphQL>API Tokens). To enable API access, generate an API key that the integration will use to communicate with Xledger. Ensure that the API key has the necessary permissions to read and write data, particularly for expenses and accounting modules.
Securely share the Token with your integration consultant.
On Pleo's Side
Access Pleo and log in to your Pleo account with administrative credentials. Navigate to the integration settings within Pleo (Pleo>Settings>Accounting). Select Xledger from the list of available integrations.
You will be redirected to the integration layer (your Xledger integration consultant will have set credentials and shared them during the setup call) where the OAuth authorization handshake will happen as shown in this video.
Standing data
GL account codes
GL Account codes (or Account nominals) are the foundation of your chart of accounts. Ensure that your chart of accounts in Xledger is comprehensive and reflects all necessary expense categories. To use accounts in Pleo, map the expense categories to the corresponding GL account codes in Xledger. To do so, navigate to the Categories tab under accounting and record the account codes against your categories
NB : Categories Codes need to be an exact match to Xledger GL account codes.
Tax Rules
Proper tax rule mapping is crucial for accurate tax reporting. Review the tax rules available in Xledger and match the tax codes in Pleo to those.
NB : Pleo tax codes need to be an exact match to Xledger tax rules.
Tags
Tags help in categorizing expenses beyond GL account and tax rules. By default the integration will be set up with cost centre and project tags. These translate to GL dimension 1 and 2 in Xledger (these should already be setup in Xledger and no extra setup is necessary).
When setting the integration, it is necessary to set up new tag group to accommodate for Pleo's new API design therefore some existing tags set up might have to be archived.
To add a tag group value (i.e. the list of cost centres and projects) navigate to the tags tab :
select the correct one and add the values you need.
NB: Values can also be imported via CSV, see at the bottom of this article for an attached sample file of the format.
NB : Tag Codes need to be an exact match to Xledger dimension codes.
NB : GL dimension and Tags are inherently custom and setup might differ for each customer, should you need to discuss different needs (for example more tags for multi company etc) please get in touch with your Xledger contact.
Other Data
Company ID
Some API calls require the Pleo company id to be performed. Your Xledger consultant will show you how to obtain it during the set up call. This is usually done via Chrome network tool.
Income GL account code
The GL code of the Pleo control account. This account will be used as the offset account for transaction postings.
OOP GL account code
Optional. The GL code of the Pleo out of pocket account. This account is needed if you wish to reconcile OOP expenses with reimbursements.
Exporting expenses
Once the setup and standing data are in place, you can start exporting expenses from Pleo to Xledger.
Process flow
Export user journey
The below video quickly shows the steps to export your expenses.
Data mappings
This integration will send each expense (or expense split if applicable) this will automatically create both the credit an debit entries in Xledger. Those can be accessed in Import>File upload>GL Import. After the voucher import automated process is run in Xledger, these will then be posted journals.
Here is the list of fields populated in Xledger with their source data.
-
Transaction Source
- Always GL
-
Tr. Source Reg
- Always GL
-
Reg no
- an 8 digit number to batch all expenses in the export job to the same journal header. Uses the date of import (YYYYmmDD), for example for an export job triggered on the 1st of Jan 2024, Reg no will be 20240101.
-
Posted Date
- Date the accounting entry should be bookkept (from Pleo)
-
Account
- On credit lines, Pleo's category GL account code
- On debit lines, Xledger Pleo control GL account code
-
Ledger Type
- Always General Ledger
-
Text
- Link to Pleo original expense (access to receipt) + Employee name + Supplier name + notes
-
Tax Rule
- On credit lines, tax rule code from pleo
- On debit lines, null
-
Invoice Date
- Date the accounting entry should be bookkept (from Pleo)
-
Cost centre
- Cost centre tag code from Pleo
-
Project
- Project tag code from Pleo
-
Currency
- Currency of Pleo's wallet
-
Invoice Amount
- On credit lines, negative amount from Pleo
- On debit lines, positive amount from Pleo
-
Job Level
- 1 for draft (only for testing purposes)
- 2 for ready for processing (BAU, ensures GL lines are posted automatically)
Accounting logic
Here is a description of how each export item in Pleo is treated by Xledger in terms of double entry.
-
Card Purchases
- CR to Pleo Control account
- DR to P&L account
-
Out of Pocket Expense
- CR to Pleo OOP account
- DR to P&L
-
Reimbursement
- DR to Pleo OOP account
- CR to Pleo control account
-
Fee
- CR to Pleo Control account
- DR to P&L account
-
Cashback
- CR to P&L account
- DR to Pleo Control account
-
Refund
- CR to P&L account
- DR to Pleo Control account
-
Wallet top up
- Not currently accessible via Pleo's API
Schedules
Once an export job is triggered from Pleo, it stays active for 1 hour. The integration will run every 30 minutes to pick active export jobs and process them as above.
Pleo is currently working on adding a webhook so we are aiming to support this when this will be ready meaning the processing of a triggered export job would be near instant.
Error reporting
Effective error reporting ensures that any issues during the integration process are quickly identified and resolved.
When an expense fails to export because of an issue in Xledger or Pleo set up, the export job status in pleo will reflect that as well as giving the cause. To see error reason of a failed expense simply click on the review errors link on the export queue set up :
Common error scenarios
Most errors in the API would be caused by improper standing data set up, meaning likely that the Pleo set up doesnt match Xledger's. Such errors will return the following reasons :
- Cost Center code is invalid or doesn't exist in Xledger.
- Project code is invalid or doesn't exist in Xledger.
- GL account code is invalid or doesn't exist in Xledger.
- Tax rule code is invalid or doesn't exist in Xledger.
To fix, please validate both systems are correctly set up and codes are matching.