> For a complete page index, fetch https://docs.synthflow.ai/llms.txt. For full documentation content, fetch https://docs.synthflow.ai/llms-full.txt.

# Salesforce

> Install and configure the Synthflow Salesforce app so Salesforce workflows can work with AI agents.

Salesforce is a customer relationship management platform where teams manage leads, contacts, accounts, and sales workflows.

With this integration, you can install the [Synthflow Salesforce app](https://appexchange.salesforce.com/appxListingDetail?listingId=b3c5184b-8f61-48c9-be81-b8672b6bd33e), trigger AI-powered calls from Salesforce Flows, and use [custom actions](/about-custom-actions) to call Salesforce APIs from Synthflow agents. If you use custom actions, you can connect both Salesforce Production and Salesforce Sandbox and choose the environment per action.

## Install the Synthflow Salesforce App

<Tip>
  You'll need to have a Synthflow Enterprise plan before you start.
</Tip>

Install the [Synthflow app](https://appexchange.salesforce.com/appxListingDetail?listingId=b3c5184b-8f61-48c9-be81-b8672b6bd33e) from the AppExchange.

![Synthflow app listing on Salesforce AppExchange](https://files.buildwithfern.com/synthflow.docs.buildwithfern.com/6835582bc62437f8e2063018874f129c9f81e0a83e1e017812913d1c82bbbe79/docs/assets/screenshots/salesforce_marketplace.png)

## Use Salesforce in custom actions

For [custom actions](/about-custom-actions), you can connect both **Salesforce** (Production) and **Salesforce Sandbox** in the same workspace, then choose the connection per action in **Authentication**.

<Steps>
  <Step>
    Open **Integrations** and connect **Salesforce** for Production and **Salesforce Sandbox** for Sandbox.
  </Step>

  <Step>
    In each custom action, set endpoint URL and **Authentication** to the matching environment.
  </Step>

  <Step>
    Keep separate actions per environment, such as `salesforce_prod` and `salesforce_sandbox`, so testing and live traffic stay isolated.
  </Step>
</Steps>

### Salesforce Production

* Use for live workflows and customer-facing automations.
* Point to your Production Salesforce domain.
* Promote only after validation in Sandbox.

### Salesforce Sandbox

* Use for prompt, payload, and field-mapping validation.
* Point to your Sandbox Salesforce domain.
* Validate here before enabling the Production variant.

![Custom action configured for Salesforce Sandbox with GET method, Salesforce Sandbox authentication, and initialized status](https://files.buildwithfern.com/synthflow.docs.buildwithfern.com/a5b83d6f03dec524282db6abd61af0636de586b2ff1770dbd30bc2698322f292/docs/assets/screenshots/salesforce_custom_action_sandbox.png)

## Create a Call Action

<Steps>
  <Step>
    In your Salesforce dashboard, select **Process Automation** > **Flows** on the left-hand sidebar. Click **New Flow** in the top-right corner.
  </Step>

  <Step>
    Select **Start from Scratch** and click **Next**. Select **Record-Triggered Flow** and click **Create**.
  </Step>

  <Step>
    Select **Contact** under Object and **A record is created** under Trigger the Flow When.
  </Step>

  <Step>
    Under Set Entry Conditions, select **All Condition Requirements Are Met (AND)**. Enter this configuration:

    <table>
      <tr>
        <th>
          Field
        </th>

        <th>
          Operator
        </th>

        <th>
          Value
        </th>
      </tr>

      <tr>
        <td>
          LeadSource
        </td>

        <td>
          Equals
        </td>

        <td>
          Phone Inquiry
        </td>
      </tr>

      <tr>
        <td>
          LeadSource
        </td>

        <td>
          Is Changed
        </td>

        <td>
          True
        </td>
      </tr>

      <tr>
        <td>
          MobilePhone
        </td>

        <td>
          Is Null
        </td>

        <td>
          False
        </td>
      </tr>
    </table>
  </Step>

  <Step>
    Close the configuration form (click the cross icon under Activate).
  </Step>

  <Step>
    Click the plus icon and select the **Action** element. Select **Apex** > **Make a Call**.
  </Step>

  <Step>
    Under Set Input Values for the Selected Action, select these variables:

    <table>
      <tr>
        <th>
          Field
        </th>

        <th>
          Value
        </th>
      </tr>

      <tr>
        <td>
          Name of Customer
        </td>

        <td>
          Triggering Contact > Full Name
        </td>
      </tr>

      <tr>
        <td>
           Phoen Number 
        </td>

        <td>
          Triggering Contact > Mobile Phone 
        </td>
      </tr>

      <tr>
        <td>
          Record ID
        </td>

        <td>
          Triggering Contact > Contact ID 
        </td>
      </tr>
    </table>
  </Step>

  <Step>
    Close the configuration form (click the cross icon under Activate) and click **Save**. Name your flow and add an API name for it. Click **Save** and **Activate**.
  </Step>
</Steps>

## FAQ

<AccordionGroup>
  <Accordion title="Can I connect both Salesforce Production and Sandbox in one workspace?">
    Yes. You can connect both environments in the same workspace and choose the correct connection per [custom action](/about-custom-actions).
  </Accordion>

  <Accordion title="Do I need separate endpoints for Production and Sandbox?">
    Yes. Each environment has its own Salesforce domain, so each action should point to the matching endpoint for that environment.
  </Accordion>

  <Accordion title="When should I use Salesforce Sandbox instead of Production?">
    Use Sandbox to validate prompts, payloads, and field mappings before enabling the same workflow in Production.
  </Accordion>

  <Accordion title="Can I trigger Synthflow calls from Salesforce Flows?">
    Yes. After installing the Synthflow app, you can configure a Flow action to trigger calls from Salesforce.
  </Accordion>
</AccordionGroup>