Skip to main content
Question

Trouble with Zap searching multiple Salesforce email fields before adding new contact.


helenad

I’m trying to find a way to make a Zap search (1) one field that contains several email addresses or (2) multiple email fields in Salesforce before adding a new contact. We have several email fields (personal, work, alternative) that we would like to search on in addition to our primary one. We also have a field that consolidates all emails into one field, separated by a comma.

 

I have this:

SELECT Email, Alternate_Email
FROM Contact

 

But it does not return any results.

 

Many thanks for any help!

Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Troy Tessalone
Forum|alt.badge.img+14

Hi @helenad 

Check the field description for guidance about how to use the Salesforce SOQL.

https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql.htm

 


helenad
  • Author
  • Beginner
  • 3 replies
  • December 22, 2023
Troy Tessalone wrote:

Hi @helenad 

Check the field description for guidance about how to use the Salesforce SOQL.

https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql.htm

 

Hi @Troy Tessalone, thanks for responding.

I’ve checked the documentation and tried the options offered but the query still doesn’t bring any results.

 

I’ve used:

  1. All_Emails__c LIKE ‘selectedEmailField
  2. All_Emails__c IN (‘selectedEmailField’)

Neither query works.

 

This one works successfully:

  1. npe01__HomeEmail__c = ‘selectedEmailField

 

This one works successfully:

  1. Email = ‘selectedEmailField’

 

Separating all fields also works successfully:

  1. npe01__HomeEmail__c = ‘selectedEmailField’ OR npe01__WorkEmail__c = ‘selectedEmailField’ OR Emai = ‘selectedEmailField

 

However, the All_Emails__c field captures all the emails in one field so I would like to use that one to search by. Would just like some help with the syntax.


Troy Tessalone
Forum|alt.badge.img+14

@helenad 

Did you try asking ChatGPT for help writing the SOQL?