Salesforce Integration: Search for Contact by 2 fields conditionally

  • Profile Image
    Dominique_Hicks
    Asked on September 11, 2025 at 5:49 PM

    Hi,

    For the Salesforce Integration, I'd like to be able to first 'Find the Contact' by Email address, then if not found, 'Find the Contact' by SSN, then if not found, creat new contact.

    Salesforce Integration   Search for Contact by 2 fields Image 1 Screenshot 30 Screenshot 10



    And also, only search by either of those, if the email is NOT BLANK or the SSN is NOT BLANK.


    Do you have a solution for this?


    After,

    I also need to find (or create, if it does not exist) another custom salesforce object that is linked to this Contact.


    Salesforce Integration   Search for Contact by 2 fields Image 2 Screenshot 41 Screenshot 21

    Jotform Thread 30971101 Screenshot
  • Profile Image
    Podo: Support AI Agent
    Replied on September 11, 2025 at 5:49 PM

    Hi Dominique,

    Thanks for reaching out to us for help. I'm an AI assistant. I'll do my best to help you until someone from the support team is available.

    Regarding your Salesforce integration request, you want to:

    • Search for a Contact first by Email address, and if not found, then by SSN, but only if the respective field is not blank.
    • If no Contact is found by either field, create a new Contact.
    • After that, find or create another custom Salesforce object linked to that Contact.

    Let me help you with that:

    1. Set up conditional searches: Use the Salesforce integration's 'Find existing record' action twice—once to search by Email (with a condition that Email is not blank) and once to search by SSN (with a condition that SSN is not blank).
    2. Configure conditional logic: Ensure the integration attempts the SSN search only if the Email search returns no results.
    3. Create new Contact: If both searches find no matching Contact, use the 'Create or update a record' action to create a new Contact.
    4. Find or create custom object: Use another 'Find existing record' action for the custom Salesforce object linked to the Contact, and if not found, create it accordingly.

    This setup aligns with the flow you described in your screenshots and steps.

    Give it a try and let us know how it goes.

  • Profile Image
    Dominique_Hicks
    Replied on September 11, 2025 at 5:52 PM

    How do I set up conditional search?

  • Profile Image
    Podo: Support AI Agent
    Replied on September 11, 2025 at 5:52 PM

    Hi Dominique,

    One of our Support Team members has taken over this thread and will assist you further with setting up the conditional search in your Salesforce integration.

    Let us know if you have any other questions.

  • Profile Image
    Ronald JotForm Support
    Replied on September 11, 2025 at 6:09 PM

    Hi Dominique,

    Unfortunately, conditional matching of fields for finding a record for the Salesforce integration is not supported. Each action will be triggered every time there's a new submission. While the feature you're looking for isn't available at Jotform right now, we've gone ahead and escalated your request to our developers. Exactly when or if it's developed depends on their workload, how viable it is, and how many other users also request it. If there are any updates, we’ll circle back to this thread and let you know.

    Thanks for your patience and understanding, we appreciate it.

    Salesforce Integration: Search for Contact by 2 fields conditionally Image 1 Screenshot 20

Your Reply