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
externalUrlexternalIdexportedAt
Failed Export Item
Set:status = failed
failureReasonTypefailureReason
Validation Failure Errors
Use the following mappings when validation prevents processing:| Validation Error | failureReasonType | failureReason |
|---|---|---|
| Missing Journal | missing_configuration | “Journal X missing: provide journal X in the configurations” |
| Missing Account | missing_configuration | “Account X missing: provide account X in the configurations” |
| Missing Expense GL Account | missing_configuration | “Account X missing: provide account X in the configurations” |
Common Export Errors
| Error | failureReasonType | failureReason |
|---|---|---|
| Tax Code missing in AS | invalid_configuration | “Tax Code X does not exist in the Accounting System” |
| Expense GL Account missing | invalid_configuration | “Account No. X does not exist in the Accounting System. Check Category.” |
| Tag missing | invalid_configuration | “Tag with code X does not exist on the Accounting System. Check the Tag.” |
| Vendor not found in AS | vendor_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 large | receipt_file_size_limit_exceeded | “Attachment file size exceeds accounting system limits.” |
| Receipt download failed | receipt_download_failure | “Failed to download the attachment file from Pleo. Re-export the expense.” |
| Receipt upload failed | receipt_upload_failure | Pass Accounting System error message |
| API rate limit exceeded | accounting_system_rate_limit | Pass Accounting System error message |
| Authorisation failure | accounting_system_authentication_failure | Pass Accounting System error message |
Other Export Errors
For all remaining failures:failureReasonType = accounting_system_validation_failurefailureReason =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_errorsorfailed)