Somehow, some of our contacts have multiple email addresses. When I attempt to process such contacts with C# API wrapper support UpdateContact I am getting message:
json.max.items.violation:#/email_addresses: 2 items were contained, but the maximum number of items allowed is 1.
I'm not certain if this is telling me that a contact has two identical email addresses or if it's just telling me that the contact has more than one email address. In either case, it seems to me that whatever the complaint is regarding the contact, it shouldn't have been allowed in the first place. Possibly this happened when we were still using V1 APIs, I don't know. But now we have some contacts out there that can't be maintained via API. In one case I tried removing one of the two email addresses, but since there were still two on your CC database I received the same error message.
Would it be possible for CC technical folks to discover these contacts for us and fix them. They are in a bad state that shouldn't have been allowed.
Solved! Go to Solution.
Thanks for reaching out about this issue. It looks like what you're experiencing is definitely some bad data on those specific contacts related to an older issue we were having. We currently have a member of our team working on a tool that we will be using to clean up data for issues like this one. Currently I do not have a specific time estimate, but I can confirm that this is an issue that we are working to correct.
If you have any questions, please let me know. If you'd like to be notified when we have an update, the easiest way is to shoot us an email at firstname.lastname@example.org and reference this post. That will allow me to link your email with our tracking system so that I can be notified to update you once we have a status update.
Is there a workaround for this problem. It's really causing us quite a bit of trouble lately. For instance, can we remove an email address from the Contact object prior to doing the update? Or is there anything else we can do from our end? When do you plan to have the utility available that addresses this?
I believe you can simply remove one of the addresses from the contact obect to update it successfully. When you (your application) receives the contact from us in these cases, you get an email address channel with an ID of "0" (or the code may show it as null), and that is the address you want to remove. The other email address channel will have a channel ID that's a hashed value. That's the good address.
If you have any trouble doing that, feel free to email us at email@example.com with the username of the account, and the email address or contact ID you're having trouble with. We can troubleshoot on our side to try to find workarounds.
I got a status update from the team working on fixing this, and they're projecting that they can fix this in September. I'm sorry that it's taking us so long.
Partner API Support Engineer
Thank you Shannon. Yes that is a good workaround.
I never tried this even though it was kind of an obvious thing to try because I reasoned that had there been a simple workaround like this that it would have been suggested when I first asked the question. I thought the problem was only addressable by modifying your database. Silly me!