Implementation
- Vendor Sync Workflow Guide: workflow context and sequencing
- How to Fetch and Match Vendors: API usage and step-by-step instructions
Vendors: Data Mapping
Map the following datapoints from AS vendor records to Pleo Vendors API fields.Using externalId and code
code and externalId can be the same value if the AS has no separate stable identifier beyond the account code. externalId is what Pleo uses for matching, so it must never change for a given vendor across sync runs.
Only set code and externalId to the same value if the AS’s account codes are themselves immutable. If the AS can renumber account codes (for example, during a chart-of-accounts reorganisation), do not use the code as externalId. Use a separate, AS-internal record identifier that does not change when the code does, so matching continues to work after a renumbering event.
Handling Invalid AS Field Values
This mapping assumes the AS returns valid values for each field. If an AS vendor record has a blank, malformed, or non-ISOcountry or defaultCurrency (for example, a legacy record with no country set, or a free-text currency name instead of an ISO 4217 code), do not fail the entire sync run and do not write the invalid value into Pleo as-is.
countryis optional on the Vendors API. Skip writing it for that vendor, log it for investigation, and still process the vendor’s other valid fields and matching/state transition normally.defaultCurrencyis required on the Vendors API (VendorCreateRequestandVendorUpdateRequestboth reject a request that omits it), so it can’t simply be skipped. Either skip the create or update for that vendor and log it for investigation, or send a fallback value and continue: fall back to the Vendor’s existingdefaultCurrencyalready on Pleo (update only), or to a fallback currency your integration preconfigures for the company. Log the invalid value for investigation either way.
Matching Field
Vendors are matched to their AS counterparts using theexternalId field on both ends.
The externalId is the stable identifier used to track a vendor across sync runs, even if its name, code, or other details change.