Where You Are
You are viewing the Export Integration Workflow Guide. This guide explains how an integration interacts with Pleo to export data — from detecting Export Jobs through to reporting export results back to Pleo. It focuses on the integration-facing workflow and the responsibilities of the integration when communicating with Pleo’s Export API.What You’ll Have Built
After implementing this workflow:- Export Jobs are detected and processed reliably.
- Expenses are recorded correctly in the Accounting System.
- Attachments and bookkeeping logic are handled consistently.
- Export outcomes are clearly reported to users.
- The integration aligns with Pleo’s export guarantees and bookkeeping model.
Who This Guide Is For
This guide is intended for:- Integration developers
- Solution architects
- Accounting platform integrators
Before You Start
You should be familiar with:- Pleo’s supported authentication methods.
- The Export Lifecycle
Export Workflow Overview
The export process moves expenses through a controlled lifecycle:- Detect & Claim Export Jobs
- Perform Pre-Export Validation
- Fetch Export Items
- Process & Record Export Items
- Update Export Items
- Update & Complete Export Job
Steps
1. Detect and Claim Export Jobs
Purpose:Detect when Pleo has prepared expenses for export and claim an Export Job for processing. Input
- Export Job created in Pleo
- Webhook event or polling trigger
- One Export Job selected
- Export Job marked as
in_progress
- Prevents multiple integrations processing the same data
- Establishes sequential processing
How to Detect and Claim Export Jobs for Processing
Find eligible jobs to process
2. Perform Pre-Export Validation
Purpose:Confirm the Accounting System is ready before processing begins. Input
- Started Export Job
- Accounting System connection
- Validation passed → continue workflow
- Validation failed → Export Job marked
failed
- Prevents partial exports
- Avoids mid-process failures
How to Perform Pre-Export Validation
Validate Accounting System availability before exporting.
3. Retrieve Export Job Items (Control Layer)
Purpose:Determine which Export Items belong to the Export Job and track their processing state. Input
- Export
jobId
- List of Export Job Items (control metadata)
- Processing scope (e.g.
pendingitems)
- Defines what must be processed
- Enables resumable and deterministic workflows
- Prevents duplicate processing
How to Retrieve Export Job Items
Determine which Export Items belong to the Export Job.
4. Fetch Export Item Data (Data Layer)
Purpose: Retrieve full accounting payload required to process each Export Item in the Accounting System. Input- Export
jobId - List of Export Items (from control layer)
- Full Export Item payloads ready for accounting processing
- Provides complete accounting data (GL, vendor, amounts, attachments)
- Enables correct mapping into the Accounting System
- Separates data retrieval from workflow control
How to Fetch Export Item Data
Retrieve full accounting payloads for processing.
5. Process & Record Export Items
Purpose:Transform Export Items into accounting entries and record them in the Accounting System. Input
- Valid Export Items
- Mapping configuration
- Attachments
- Draft or finalised accounting entries created
- Attachments uploaded where applicable
- Applies bookkeeping logic
- Converts Pleo data into accounting records
- Completes the export lifecycle
Implementation Detail
This step moves from the Pleo export workflow into the Accounting System processing layer. You are still continuing the same export workflow, but the guide below provides a deeper, system-focused walkthrough of how integrations should process and record Export Items inside an Accounting System or ERP.AS / ERP Processing Workflow Guide
Deep dive: create accounting entries, apply mappings, and upload attachments.
6. Update Export Items
Purpose:Report the result of processing each Export Item back to Pleo. Input
- Accounting System response
- Processing results
- Export Items marked
successfulorfailed - External IDs and URLs recorded
- Provides transparency and auditability
- Enables user troubleshooting
How to Update Export Items
Report export results and errors back to Pleo.
7. Update & Complete Export Job
Purpose:Finalise the Export Job once all items have been processed. Input
- Final Export Item statuses
- Export Job marked:
completedcompleted_with_errorsfailed
- Signals workflow completion
- Enables reporting and downstream automation
How to Update & Complete Export Job
Finalise the export workflow and report job status.