Sometimes the Xero integration (in Invoices plugin) throws an error when creating a new contact: The contact name Adam B is already assigned to another contact. The contact name must be unique across all active contacts
What the Xero integration is doing is the following:
Find a contact by email, if it exists, add the invoice to that contact's ID
If not, create a new contact with the email Address.
What we should do
Try to find by contact name
If not exists, find by email
Make sure to normalize the contact name. Trim, remove duplicate spaces etc
Sometimes the Xero integration (in Invoices plugin) throws an error when creating a new contact:
The contact name Adam B is already assigned to another contact. The contact name must be unique across all active contacts
What the Xero integration is doing is the following:
What we should do
Make sure to normalize the contact name. Trim, remove duplicate spaces etc