cancel
Showing results for 
Search instead for 
Did you mean: 

Records not marrying up based on Email

NAl
Contributor

I have a pipeline which is pulling data from 2 salesforce orgs. These data sets are then combined and matched based on the email address using a sort and join (left outer) snap. The end result is an upsert operation is in 1 of the orgs.

When executed, the pipeline fails because our duplicate management rule in salesforce is triggered since it is trying to create rather than update a record with an existing email address.

My question is why isn’t this being picked up through the salesforce read snaps and being mapped through the join? What am I missing

Screen Shot 2021-11-11 at 11.54.14 AM

Screen Shot 2021-11-11 at 11.54.19 AM

9 REPLIES 9

bojanvelevski
Valued Contributor

If the record is picked up by the Duplicate management rule, that means that it is not joined properly in SL. Could it be a case sensitivity issue? I don’t know about Salesforce, but SnapLogic is case sensitive, so you may try and add a .toLowerCase() method after you read the records.

There’s another record that exists in both systems which is correctly identified in the join snap.
The email addresses on both records which is firing the duplicate management rule, for has the exact same spelling and case used. Salesforce’s duplicate rule is based on a an EXACT match for email addresses.

SpiroTaleski
Valued Contributor

@NAl

Did you try to get the data from two different Salesforce org and insert into third one? If yes, before upserting the records in the target org, you should query/check if the record with the given email address(if this field is unique field in the target org) exist in the target org. If exist update it, if not exist create new one.

If you are using Salesforce Upsert Snap, then you should have an unique external id field(in your case email address) setup that is required for this action. Based on that field, Salesforce will decide if the operation will be create or update.

Regards,
Spiro Taleski

Hi Spiro,
For context are comparing datasets extracted from Org 1 and Org 2.
The Join snap uses the Email address from both sets as the join paths.

If records from Org 1 does not have a corresponding record (Id) in Org 2, they are created in Org 2 using a Salesforce Create snap.
If records from Org 1 does have a corresponding record (Id) in Org 2, then we update the record in Org 2 using a Salesforce Update snap.

If the email exists in both orgs, I’d expect this to be handled by the Join snap?

Screen Shot 2021-11-11 at 2.49.54 PM
Join Snap Output