Skip to main content

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
It focuses on workflow understanding, not implementation details.

Before You Start

You should be familiar with:

Export Workflow Overview

The export process moves expenses through a controlled lifecycle:
  1. Detect & Claim Export Jobs
  2. Perform Pre-Export Validation
  3. Fetch Export Items
  4. Process & Record Export Items
  5. Update Export Items
  6. Update & Complete Export Job
Each step produces outputs required by the next step.

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
Output
  • One Export Job selected
  • Export Job marked as in_progress
Why It Matters
  • Prevents multiple integrations processing the same data
  • Establishes sequential processing
See Integration Design

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
Output
  • Validation passed → continue workflow
  • Validation failed → Export Job marked failed
Why It Matters
  • Prevents partial exports
  • Avoids mid-process failures
See Integration Design

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
Output
  • List of Export Job Items (control metadata)
  • Processing scope (e.g. pending items)
Why It Matters
  • Defines what must be processed
  • Enables resumable and deterministic workflows
  • Prevents duplicate processing
See Integration Design

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)
Output
  • Full Export Item payloads ready for accounting processing
Why It Matters
  • Provides complete accounting data (GL, vendor, amounts, attachments)
  • Enables correct mapping into the Accounting System
  • Separates data retrieval from workflow control
See Integration Design

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
Output
  • Draft or finalised accounting entries created
  • Attachments uploaded where applicable
Why It Matters
  • 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
Output
  • Export Items marked successful or failed
  • External IDs and URLs recorded
Why It Matters
  • Provides transparency and auditability
  • Enables user troubleshooting
See Integration Design

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
Output
  • Export Job marked:
    • completed
    • completed_with_errors
    • failed
Why It Matters
  • Signals workflow completion
  • Enables reporting and downstream automation
See Integration Design

How to Update & Complete Export Job

Finalise the export workflow and report job status.


What Comes Next?

After implementing the Export Expenses workflow, you can extend your integration with: