We are right in the middle of a large data migration to OnePage. Over 30k records successfully uploaded. We now have about 500 or so with the following errors. I cannot find documentation on the messages and in most cases cannot find anything wrong with the data. Please review and get back soon as we are without a CRM until this gets resolved.
"company_name": "Name must be unique" - We have many companies with the same name that uploaded just fine, why only some fail?
"company_name": "Organization name cannot be updated when it contains more than one contact" - We have hundreds of companies with the more than one contact that uploaded just fine. What does this error mean?
Hello Shane,
I'm sorry to hear you are experiencing problems with our API.
It looks like you are trying to update existing contacts - there are some restrictions on doing so via the API.
The first error"company_name": "Name must be unique"
means that you are trying to update a contact who already has a company_name
- and you are trying to change it to a different company_name
for which a company already exists in OnePageCRM. This is an ambiguous operation, as it could either be asking to
1. rename the contact's company
2. split the contact from this company and move it to the existing company with this name
If you want to do 1 (rename), then you need to update the existing company via PUT /companies/{id}.format
If you want to do 2 (split), then you need to make a call to POST /contacts/{id}/split.format
with the other companies name
For the second error "company_name": "Organization name cannot be updated when it contains more than one contact"
, you are updating a contact and their company_name
, but as the company_name
is for a company with more than 1 contact, it cannot be updated via this endpoint, as again it is unclear if you want to 1. split from the company or 2. rename the company. The same solutions as for the first error apply here.
These are both edge cases with the current implementation of the company endpoint via the API.
We are currently looking into updating this behavior to make it easier to interact with companies via the API.
Kind regards,
Liam