11-11-2021 03:54 AM
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
11-11-2021 07:40 AM
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
11-11-2021 08:04 AM
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
11-11-2021 08:44 AM
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
11-11-2021 12:04 PM
@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).
11-26-2021 04:32 AM
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.