Add support for querying Xero Contacts by AccountNumber field
Our company uses Workato to sync data from Salesforce to Xero, which we use primarily for invoicing. The general flow of our recipe(s) is as follows:
An Account object (or Opportunity for which we retrieve the associated Account) is created/updated in Salesforce, triggering the recipe
Search for a matching Contact in Xero using the Contact Name field, which matches with the Account Name field in Salesforce
If no matching Xero Contact is found, create a new one. Otherwise update the existing Contact
When new Xero Contacts are created, we store the Salesforce Account ID field in the Xero Account Number field, and likewise the Xero Contact ID field in the Salesforce Account Number field, such that we can match them up later to sync data as it changes.
The basic idea of the steps above is that we treat Salesforce as the source of 'truth', with information being copied and linked in Xero, with any future changes flowing from Salesforce to Xero later on to be updated.
The issue we face is that obviously a Salesforce field like Account Name is subject to change — through typos, corrections, new/changing client information, etc. — and is not a reliable unique identifier. However, when searching for Xero Contacts as part of a Workato recipe, the only fields available in the UI are:
Contact ID: this won't work as a matching field because for Salesforce records that don't yet have a counterpart in Xero, the field where we store the Xero Contact ID will be empty and causes an error claiming at least one field must be specified with a non-empty value.
Contact Name: this field is subject to arbitrary change and is not reliable for matching data objects in the same way as an ID field.
Email: We can't guarantee that all our Salesforce Accounts will have data in the root level email field — similarly, if we were to try to find, for example, the first related Salesforce Contact as a means of finding an email, we still can't guarantee those won't change/be removed/etc.
As a result of using the (potentially non-unique) Contact Name field, we regularly receive recipe errors wherein someone has changed the field's value in Salesforce, but the sync fails because the data has a new Contact Name but an existing Xero Account Number, which must be unique.
My question is: how possible would it be to open up the Xero Account Number field as a way of querying for Contacts? It seems this would be a helpful thing for anyone who is using Workato to sync between Xero and another external service — that is, being able to match data objects based on a guaranteed unique key determined outside Xero, yet stored in the Xero Contact.
As a test, I tried Xero's GET request previewer and was able to successfully retrieve a contact using the appropriate Account Number API query string, so it seems like it's not necessarily something limited by Xero. Any further info/advice/potential workarounds would be appreciated.