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

SpiroTaleski
Valued Contributor

@NAl

If there is an match on email addresses from both orgs, then based on your logic it should go on update branch.

After the Join Snap, I suppose that you have a router snap where you are routing create/update messages. Can you please share the conditions inside the router snap?

Regards,
Spiro Taleski

Thatโ€™s correct, in our Router itโ€™s just looking at the whether the Id is populated or not:

$Id != null - EXISTS > go to update snap
$Id == null - DOES NOT EXIST > go to create snap

SpiroTaleski
Valued Contributor

@NAl

Then, it remains what @bojanvelevski said. Maybe it was an case sensitivity issue.

Since SnapLogic is case sensitive, and in order to avoid duplicate scenario, before the join snap you can add .toLowerCase() on the field that you are using as an join key.

Regards,
Spiro Taleski

del
Contributor III

@Nai,
If Email is not required to be unique across Org 1, then it may be possible the same email address exists on more than one record in Org 1, thus producing multiple records with the same email address in the Join output. Each duplicate would follow the same path in the Router output toward the Create snap (or Upsert snap).

NAl
Contributor

Hey all,
So I stepped back from the pipeline, had a brainstorm and increased the batch size from 2000 to 10,000 on the Salesforce Read Snap and this seems to have done the trick.