> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cassidyai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Find or create Salesforce record

> Look up a Salesforce record and automatically create one if no match is found.

The Find or Create Salesforce Record action searches for a record by field criteria and creates a new record if no match exists. Use it to ensure a contact or account exists before updating it, or to create records only when they don't already exist in your [Workflow](/workflows/overview).

<Steps>
  <Step title="Add the Find or Create Salesforce Record action">
    While editing a Workflow, click the **+** button between existing steps. Select **Find or Create Salesforce Record** from the action list to add it to your Workflow.

    <Frame>
      <img src="https://mintcdn.com/cassidy/UO0c6HH8Ick4vNlS/images/reference/find-or-create-salesforce-record-img-0.png?fit=max&auto=format&n=UO0c6HH8Ick4vNlS&q=85&s=12e4d4a918343314f0b3530d3b66abea" alt="Adding the Find or Create Salesforce Record action from the action picker" width="868" height="460" data-path="images/reference/find-or-create-salesforce-record-img-0.png" />
    </Frame>
  </Step>

  <Step title="Connect your Salesforce account">
    If you haven't already, connect your Salesforce account to Cassidy. This allows Cassidy to access your Salesforce records and find or create them from your Workflow.

    <Frame>
      <img src="https://mintcdn.com/cassidy/UO0c6HH8Ick4vNlS/images/reference/find-or-create-salesforce-record-img-1.png?fit=max&auto=format&n=UO0c6HH8Ick4vNlS&q=85&s=51b4d9ecd948aa0f02cd94e21926dbe5" alt="Salesforce connection prompt in the action configuration" width="804" height="374" data-path="images/reference/find-or-create-salesforce-record-img-1.png" />
    </Frame>
  </Step>

  <Step title="Rename the action (optional)">
    If you want to make the action more descriptive or easier to reference as a variable later, enter a new name in the action title field.
  </Step>

  <Step title="Select the record type">
    Use the **Type** dropdown to choose the Salesforce object type you want to find or create — for example, **Lead**, **Contact**, **Opportunity**, **Account**, **Task**, **User**, **Case**, or a custom object.

    <Frame>
      <img src="https://mintcdn.com/cassidy/UO0c6HH8Ick4vNlS/images/reference/find-or-create-salesforce-record-img-2.png?fit=max&auto=format&n=UO0c6HH8Ick4vNlS&q=85&s=dc8c27d8bef7f1fbb5bea5895d11c8ca" alt="Type dropdown in the Find or Create Salesforce Record action" width="788" height="186" data-path="images/reference/find-or-create-salesforce-record-img-2.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/cassidy/UO0c6HH8Ick4vNlS/images/reference/find-or-create-salesforce-record-img-3.png?fit=max&auto=format&n=UO0c6HH8Ick4vNlS&q=85&s=644a801a8d23bcfbabffcf1c4c9420d3" alt="Expanded list of Salesforce object types" width="504" height="438" data-path="images/reference/find-or-create-salesforce-record-img-3.png" />
    </Frame>
  </Step>

  <Step title="Define search criteria">
    Under **Fields to search by**, click **Add Condition** to specify how to find the record. Select the field to search on, choose the operation (equals, contains, etc.), and enter the value to match. You can add multiple conditions — they combine with AND logic, so only records matching all conditions are returned.

    <Frame>
      <img src="https://mintcdn.com/cassidy/UO0c6HH8Ick4vNlS/images/reference/find-or-create-salesforce-record-img-4.png?fit=max&auto=format&n=UO0c6HH8Ick4vNlS&q=85&s=8e169cd6e4fdb984187c086547e41345" alt="Search criteria configuration with field, operation, and value" width="786" height="334" data-path="images/reference/find-or-create-salesforce-record-img-4.png" />
    </Frame>

    <Tip>Use variables from your trigger or previous steps as search values — for example, reference an email address from the trigger to look up a contact.</Tip>
  </Step>

  <Step title="Select fields to return">
    Under **Fields to return**, click **+ Add Field** and select the Salesforce fields you want returned as output variables. These values are available in subsequent Workflow steps for both found and newly created records. Click the trash icon next to a field to remove it.

    <Frame>
      <img src="https://mintcdn.com/cassidy/UO0c6HH8Ick4vNlS/images/reference/find-or-create-salesforce-record-img-5.png?fit=max&auto=format&n=UO0c6HH8Ick4vNlS&q=85&s=78b58100df78241d0b97e60c58db887b" alt="Fields to return configuration showing selected Salesforce fields" width="782" height="172" data-path="images/reference/find-or-create-salesforce-record-img-5.png" />
    </Frame>
  </Step>

  <Step title="Map fields for new record creation">
    Under **Create new object (if no results found)**, map the fields and values to use when creating a new Salesforce record. Required fields for the selected record type are pre-populated. Click **+ Add Field** to add additional fields, and enter the corresponding value for each. Use variables from previous steps to populate field values dynamically.

    <Frame>
      <img src="https://mintcdn.com/cassidy/PSOwom-PV6-w07rd/images/reference/find-or-create-salesforce-record-img-6.png?fit=max&auto=format&n=PSOwom-PV6-w07rd&q=85&s=627831b041d3f79dd9b8a6eac18a342f" alt="Field mapping for creating a new record when no match is found" width="768" height="540" data-path="images/reference/find-or-create-salesforce-record-img-6.png" />
    </Frame>
  </Step>
</Steps>

## Related

* [Look Up Salesforce Record](/integrations/salesforce/look-up-record)
* [Update Salesforce Record](/integrations/salesforce/update-record)
* [Salesforce Record Created trigger](/integrations/salesforce/record-created-trigger)
* [Salesforce for Workflows](/integrations/salesforce/workflows)
