Prerequisites
Before you begin:- You’ve fetched the export item payload data
- You’ve completed:
- You’re familiar with the Integration Design for attachment handling
Relevant Export Item Fields
Example Export Item Payload (Journal Entry)
Example Export Item Payload (Journal Entry)
- zero attachments
- one attachment
- multiple attachments
Steps
1. Check for Attachments
2. Download Attachments
Iterate through all files:- download immediately (URLs may expire)
- preserve file format and filename where possible
3. Handle Multiple Attachments
If multiple attachments exist:- PDF merge (preferred)
- ZIP archive (fallback)
4. Upload and Associate Attachments
Attach files to the created record:- journal entry
- vendor invoice (AP)
- expense transaction
- attachments are linked to the correct entry
- traceability to the original Export Item is preserved
5. Handle Failures
Attachment failures must be handled explicitly.- retry transient failures (network/timeouts)
- log all failures
- decide whether to:
- fail the Export Item, or
- continue without attachment (system-dependent)
6. Ensure Idempotency
Avoid duplicate uploads when retrying exports.- Generate a deterministic attachment key, for example:
accountingEntryId + file index, or- a hash of file metadata (e.g. URL, size, type)
- Store processed attachment keys to prevent duplicate uploads during retries
- Optionally check existing attachments in the Accounting System (if supported)
Results
After completing this step:- All available attachments have been:
- downloaded
- uploaded
- linked to accounting entries
- Attachments remain traceable to their originating Export Item
What Comes Next?
this how-to is part of: