Skip to main content
Attachment handling ensures that supporting documents (receipts, invoices) are transferred and linked to accounting entries in your Accounting System.

Prerequisites

Before you begin:

Relevant Export Item Fields

Attachments are provided in:
Each Export Item may contain:
  • zero attachments
  • one attachment
  • multiple attachments

Steps

1. Check for Attachments

2. Download Attachments

Iterate through all files:
Guidelines:
  • download immediately (URLs may expire)
  • preserve file format and filename where possible

3. Handle Multiple Attachments

If multiple attachments exist:
Recommended merge strategies:
  • PDF merge (preferred)
  • ZIP archive (fallback)

4. Upload and Associate Attachments

Attach files to the created record:
  • journal entry
  • vendor invoice (AP)
  • expense transaction
Ensure:
  • attachments are linked to the correct entry
  • traceability to the original Export Item is preserved

5. Handle Failures

Attachment failures must be handled explicitly.
Recommended behaviour:
  • 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.
Strategies:
  • 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: