Question

Why is Salesforce returning an error for duplicate contact records?

  • 19 August 2022
  • 7 replies
  • 631 views

I have a zap that pull info from a form on a Front end that customers have to Enter information about the Account then the contacts to put under that account. 

 

The zap will pull the fields entered and find an account in that name or create one if the fields entered are unique. Then Contact fields are entered bellow to put into the account. There are 3 types of contact: A, B, and C (the contact types are decided by a picklist field in Contact object). So the Form has A contact info: first, last, email, phone, title. B has First, last, email, phone, title. C has First, last, email, phone, title, identification number. 

 

The problem arises when One person can be both contact type A and B OR A and C and so on (same first, last, etc...) . Zapier returns an error for duplication contact records, and only contact type A in any case will be successfully entered into Salesforce. It seems like contact Type A is in good condition to be entered since it is the first on the Zap, the other ones are under and considered duplicates therefore run into error. Sometimes it works and the same contact is entered in all 3 Contact types.

 

Is there a solution to this? I dont think i can make 3 separate Zaps because of the Account fields at the very top required to put these contacts under.

 


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

7 replies

Userlevel 7
Badge +9

Hey there, @jagolli! Thanks for reaching out and sorry to hear you’re running into this!

Are you able to share screenshots of your zap setup as well as a screenshot of the error you’re seeing and where?

That might help the Community get a feel for how to troubleshoot with ya.  🙂

Hey there, @jagolli! Thanks for reaching out and sorry to hear you’re running into this!

Are you able to share screenshots of your zap setup as well as a screenshot of the error you’re seeing and where?

That might help the Community get a feel for how to troubleshoot with ya.  🙂

Yes i can. 

 

Step 9 and 10 are identical to 8 only difference is the contact type.

Userlevel 7
Badge +12

Hi @jagolli, thanks for sharing the set up of your Zap with us. 

I have to admit, this has me scratching my head but I think I can see what’s wrong. Before I dig into the Zapier side of things, double check that you have Salesforce set up so that different contacts can belong to more than one account. For example, one primary physician may be the physician for more than one account. 

 

For Zapier, to make this work you’ll need to add some Paths by Zapier to create logic/rules for the different combinations of types of contact (eg if someone is all three types, if they are type A and B but not C, etc). You can then add steps for each path that work for that particular type of contact. For example, if you have the same person as the primary contact and billing contact but a different primary physician, you would need something like this:

  1. Find or Create Primary contact
  2. Update Billing contact (use the ID from the previous step to tell Zapier which record to update then add the necessary information)
  3. Find or Create Primary physician
  4. Update Primary physician

The reason for the update physician step is in case the physician already exists and is attached to another contact, you’ll want to attach them to this account in addition to the previous account and so will need to update the contact. 

 

This kind of Zap can get fiddly, so I’d recommend planning it on a piece of paper first! Also, don’t forget that you can now duplicate steps and paths! This will save you some time as you’ll only need to edit each path after you copy it as opposed to creating each one from scratch. 

I hope that gets you pointed in the right direction!

Hi @jagolli, thanks for sharing the set up of your Zap with us. 

I have to admit, this has my scratching my head but I think I can see what’s wrong. Before I dig into the Zapier side of things, double check that you have Salesforce set up so that different contacts can belong to more than one account. For example, one primary physician may be the physician for more than one account. 

 

For Zapier, to make this work you’ll need to add some Paths by Zapier to create logic/rules for the different combinations of types of contact (eg if someone is all three types, if they are type A and B but not C, etc). You can then add steps for each path that work for that particular type of contact. For example, if you have the same person as the primary contact and billing contact but a different primary physician, you would need something like this:

  1. Find or Create Primary contact
  2. Update Billing contact (use the ID from the previous step to tell Zapier which record to update then add the necessary information)
  3. Find or Create Primary physician
  4. Update Primary physician

The reason for the update physician step is in case the physician already exists and is attached to another contact, you’ll want to attach them to this account in addition to the previous account and so will need to update the contact. 

 

This kind of Zap can get fiddly, so I’d recommend planning it on a piece of paper first! Also, don’t forget that you can now duplicate steps and paths! This will save you some time as you’ll only need to edit each path after you copy it as opposed to creating each one from scratch. 

I hope that gets you pointed in the right direction!

Thank you for your help. I will definitely try this and report back to you. This is actually my first time working on Zapier since the last employee that made it left the company. If you have more resources to share I will appreciate it.

@Danvers so the Zap has a loop instead of a path at the bottom to see if more contact types are entered and keep entering them into salesforce. Do you think it is this that is causing the problem and replacing this with Path can work?

 

Userlevel 7
Badge +12

Hi @jagolli!

It’s a little tricky for me without seeing the whole Zap and all the data, but a Loop would only work if you can specify the type of contact/relationship (ie primary physician/billing contact/primary contact) each time the loop runs.  For example, in the Salesforce step you use the find or create a new contact action and can then tell the action which type of contact it is. 

 

I think that will work if

a) the role/relationship is something you can select in the Find or Create action type

b) you create a lookup table before the loop to look up the type of contact and then get the ID of that type of contact that Salesforce uses

 

You would then use the ID of the contact type as a custom value in the Find or Create contact step so the Zap creates the right type of contact each time the Zap runs. 

 

This help guide talks about using custom values in dropdown fields: https://zapier.com/help/create/customize/add-custom-values-to-dropdown-menu-fields-in-zaps

You also mentioned wanting some more resources generally so here’s a couple:

Zapier University - a series of short videos on using Zapier

The Learn and Share area of the Community has lots of articles sharing interesting use cases and workarounds for common questions

 

I hope that helps, I really want to get this Zap working for you!