Skip to main content
Export Items must be updated after entries have been recorded in the Accounting System, including attachment handling, accounting period assignment, and posting behaviour. This step communicates the final outcome of each individual Export Item back to Pleo.

Implementation

See the corresponding how-to article for API usage and step-by-step instructions:

Purpose

  • Report success or failure for every Export Item.
  • Provide traceability between Pleo and the Accounting System.
  • Surface actionable error messages to users.
  • Enable accurate Export Job completion.

Definitions

  • External URL — Direct link to the created entry in the Accounting System.
  • External ID — Unique identifier assigned by the Accounting System.
  • Exported At — Timestamp when the entry was successfully created.

Export Item Status Updates

Export Items must be updated in batches of 10. Each Export Item must be assigned one final status.

Successful Export Item

Set:
  • status = successful
Provide when available:
  • externalUrl
  • externalId
  • exportedAt

Failed Export Item

Set:
  • status = failed
Provide:
  • failureReasonType
  • failureReason
Failure messages must be clear, actionable, and based on the Accounting System response where possible.

Validation Failure Errors

Use the following mappings when validation prevents processing:
Validation ErrorfailureReasonTypefailureReason
Missing Journalmissing_configuration“Journal X missing: provide journal X in the configurations”
Missing Accountmissing_configuration“Account X missing: provide account X in the configurations”
Missing Expense GL Accountmissing_configuration“Account X missing: provide account X in the configurations”

Common Export Errors

ErrorfailureReasonTypefailureReason
Tax Code missing in ASinvalid_configuration“Tax Code X does not exist in the Accounting System”
Expense GL Account missinginvalid_configuration“Account No. X does not exist in the Accounting System. Check Category.”
Tag missinginvalid_configuration“Tag with code X does not exist on the Accounting System. Check the Tag.”
Vendor not found in ASvendor_unknown“Selected vendor cannot be processed because it does not exist or is currently blocked. Please verify the vendor’s status in the accounting system and try again.”
Attachment too largereceipt_file_size_limit_exceeded“Attachment file size exceeds accounting system limits.”
Receipt download failedreceipt_download_failure“Failed to download the attachment file from Pleo. Re-export the expense.”
Receipt upload failedreceipt_upload_failurePass Accounting System error message
API rate limit exceededaccounting_system_rate_limitPass Accounting System error message
Authorisation failureaccounting_system_authentication_failurePass Accounting System error message

Other Export Errors

For all remaining failures:
  • failureReasonType = accounting_system_validation_failure
  • failureReason = error message returned by the Accounting System

Expected Outcome

At the end of this step:
  • Every Export Item has a final status.
  • Successful items include Accounting System references.
  • Failed items include actionable error information.

Upstream Dependencies

  • Export Job has been claimed (status = in_progress)
  • Fetch Export Item Data (data layer)
  • Bookkeeping method resolved
  • Accounts Mapping – determines which GL accounts are debited and credited
  • 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

Downstream Dependencies

  • Export Job status update – updates outcome of Export Job (completed, completed_with_errors or failed)

What Comes Next?