Skip to content

Commit

Permalink
HGI-6489 / add flag for lookup on emails in fallback sink (#24)
Browse files Browse the repository at this point in the history
---------

Co-authored-by: Hassan Syyid <hassansyyid@gmail.com>
keyn4 and hsyyid authored Sep 17, 2024
1 parent bfac06a commit dbf5e5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion target_salesforce_v3/sinks.py
Original file line number Diff line number Diff line change
@@ -899,7 +899,7 @@ def preprocess_record(self, record, context):
req = self.request_api("GET", "queryAll", params={"q": query})
req = req.json().get("records")
# lookup for record with email fields
else:
elif self.config.get("lookup_by_email", True):
# Try to find object instance using email
email_fields = ["Email", "npe01__AlternateEmail__c", "npe01__HomeEmail__c", "npe01__Preferred_Email__c", "npe01__WorkEmail__c"]
email_values = [record.get(email_field) for email_field in email_fields if record.get(email_field)]

0 comments on commit dbf5e5e

Please sign in to comment.