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

# Connect Salesforce

> Authorize a production or sandbox org and PipeLime creates Lead records with your email history attached as tasks.

export const UiPath = ({children}) => {
  const parts = String(children).split(/\s*(?:→|>)\s*/).filter(Boolean);
  return <span className="pl-path">
      {parts.map((part, index) => <span key={`${index}-${part}`}>
          {index > 0 && <span className="pl-path__sep">→</span>}
          {part}
        </span>)}
    </span>;
};

export const Screenshot = ({id, alt, caption, frame = 'browser', url, marks = [], lang = 'en', workspace = 'northwind-outbound'}) => {
  const src = `/images/screenshots/${lang}/${id}.png`;
  const chrome = url ? `app.pipelime.ai/${workspace}${url}` : 'app.pipelime.ai';
  return <figure className={`pl-shot pl-shot--${frame} not-prose`}>
      <div className="pl-shot__frame">
        {frame !== 'bare' && <div className="pl-shot__bar">
            <span className="pl-shot__dots">
              <span className="pl-shot__dot" />
              <span className="pl-shot__dot" />
              <span className="pl-shot__dot" />
            </span>
            <span className="pl-shot__url">{chrome}</span>
          </div>}
        <div className="pl-shot__media">
          <img src={src} alt={alt} loading="lazy" />
          {marks.map(mark => <span key={mark.n} className="pl-shot__mark" style={{
    left: `${mark.x}%`,
    top: `${mark.y}%`
  }} aria-hidden="true">
              {mark.n}
            </span>)}
        </div>
      </div>
      {caption && <figcaption className="pl-shot__caption">{caption}</figcaption>}
    </figure>;
};

Authorize a Salesforce org, production or sandbox, so you can push leads there as Lead records with their email history attached as tasks.

<div className="pl-availability">
  <div className="pl-availability__row">
    <div className="pl-availability__label">Where</div>
    <div className="pl-availability__value"><span className="pl-path">Integrations<span className="pl-path__sep">→</span>Integrations<span className="pl-path__sep">→</span>Apps & CRM</span></div>
  </div>

  <div className="pl-availability__row">
    <div className="pl-availability__label">Your role needs</div>
    <div className="pl-availability__value">Read access to Apps & CRM <code>read-integrations</code>. Admin, Member and Viewer have it by default.</div>
  </div>

  <div className="pl-availability__row">
    <div className="pl-availability__label">To create or change</div>
    <div className="pl-availability__value"><code>create-integrations</code> to add one, <code>update-integrations</code> to change one, on top of the permission above.</div>
  </div>

  <div className="pl-availability__note">If you cannot find this in your sidebar, your workspace may have a custom menu configuration. Contact support and we will check it for you.</div>
</div>

## Before you begin

* A Salesforce login for the org you want to connect, production or sandbox.

<Note>
  You are never asked for credentials of your own. The connect dialog collects exactly one thing, the environment. There is no API key field, no client ID field, and nothing to copy out of Salesforce beforehand.
</Note>

## Steps

<Steps>
  <Step title="Open the Salesforce connect dialog">
    Go to <UiPath>Integrations → Integrations → Apps & CRM</UiPath>, choose **Add integration**, then choose **Salesforce** from the list. The dialog opens with a short description of what connecting shares, an environment choice, and a **Connect Salesforce** button.

    <Screenshot id="integrations/connect-salesforce--environment" frame="bare" alt="The Connect Salesforce dialog with a Production option selected above a Sandbox option, each naming the login host it connects through, and a Connect Salesforce button underneath" caption="Production or Sandbox is the only environment choice anywhere in the product. No other connector offers one." />
  </Step>

  <Step title="Choose an environment and connect">
    **Production** is selected when the dialog opens, and it connects a live org through login.salesforce.com. **Sandbox** connects a sandbox org through test.salesforce.com instead. Nothing on the card afterwards records which one you chose, so this dialog is the one place to get it right.

    Choose **Connect Salesforce**. The browser leaves this screen for Salesforce's own sign-in page.
  </Step>

  <Step title="Sign in and authorize on Salesforce">
    This page is Salesforce's own, not ours: whatever your org's sign-in and consent screens look like is what you see. Approve access and Salesforce sends you back. We never see your Salesforce password. What we keep is an access token, plus a refresh token we exchange for a new one whenever a push comes back unauthorized, so you are not asked to sign in again.
  </Step>

  <Step title="Land back, connected">
    You come back to <UiPath>Settings → Integrations</UiPath>, the settings tab, even though you started from the sidebar. It is the same screen with the same cards, and a **Salesforce** card now carries a **Connected** chip, with the name and email of the Salesforce user you signed in as underneath. The same card is on <UiPath>Integrations → Integrations → Apps & CRM</UiPath>.

    <Screenshot id="integrations/connect-salesforce--connected-card" url="/integrations" alt="The Salesforce card in the Apps & CRM grid with a green Connected chip, the connected user's name and email underneath, and the Auto-push analyzed leads toggle at the bottom, switched off" caption="A representative example. The real round trip leaves your browser on Salesforce's own site for a few seconds first, which is not something a seeded workspace can reproduce." />
  </Step>
</Steps>

## What happens next

<Check>
  A "Salesforce connected successfully" toast appears, and the card shows a **Connected** chip with the name and email of the Salesforce user you signed in as.
</Check>

Connecting again as a different Salesforce org, or a different user in the same org, adds a second card rather than replacing this one. Signing in again as the same Salesforce user updates the existing connection instead.

Connecting Salesforce pushes nothing on its own. A lead reaches the org only when you switch on **Auto-push analyzed leads** on the card and then choose **Save** (the switch alone changes nothing until it is saved), or choose **Push to CRM** on a lead's own page, or run a workflow whose **Send to CRM** step points at this connector. That switch needs the `update-integrations` permission, separate from the one that let you connect the account: a role without it gets the card with no auto-push block on it at all. See [Auto-push analyzed leads and stage filters](/en/integrations/auto-push-and-stage-filters) and [Push a lead to your CRM manually](/en/integrations/push-to-crm-manually).

Only one CRM ever owns a lead. If HubSpot, Odoo, Kommo or HeyReach has already claimed it, the automatic push skips it without telling you, and a workflow's **Send to CRM** step takes its Sent branch without creating anything. A manual push from the lead's own page is the one route that still goes through.

Once a lead is pushed, Salesforce gets a Lead record carrying its name split into first and last, its most recently added email and phone number, its job title, its company's website and industry, a Lead Source set to your workspace's brand name, and a description built from its LinkedIn URL, its own description, its company's description and summary, and its company's links, leaving out whichever of those it does not have. Salesforce requires both a last name and a company on every Lead, so a one-word lead name is filed as the last name, and a lead with no company, or no name at all, is filed under the literal word "Unknown". The same notes are then logged again as their own completed task, and every email in the lead's thread becomes its own completed task too, skipping only warm-up traffic. [Field mapping reference per CRM](/en/integrations/what-gets-pushed-per-crm) has the complete, field-by-field version.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Nothing is arriving in Salesforce">
    The card says **Connected** and no Lead records appear. Three things stop a push, in the order worth checking. **Auto-push analyzed leads** is off, or it was switched on and never saved. The lead has no email address, which the automatic push skips and the manual button refuses with "Cannot push lead to CRM without an email address". Or another record-creating CRM already claimed the lead, in which case the automatic push and a workflow's **Send to CRM** step both skip it in silence. [Auto-push analyzed leads and stage filters](/en/integrations/auto-push-and-stage-filters) goes through every reason a lead is skipped.
  </Accordion>

  <Accordion title="'Failed to connect Salesforce. Please try again.'">
    You came back from Salesforce but the connection did not complete, either because the token exchange with Salesforce failed or because the browser lost the session the authorization was started in. Finish the round trip in the same browser you started it in, and in one sitting. The message reads the same whatever the cause, so there is nothing more specific to read: open **Add integration** and try again.
  </Accordion>

  <Accordion title="A pushed lead's name or company reads 'Unknown' in Salesforce">
    Salesforce requires both a last name and a company on a Lead record, and not every lead has both. A one-word lead name becomes the last name; a lead with no company name, or no name at all, is filed under the literal word "Unknown". [Field mapping reference per CRM](/en/integrations/what-gets-pushed-per-crm) covers every fallback like this one, across every connector.
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="Field mapping reference per CRM" icon="table" href="/en/integrations/what-gets-pushed-per-crm">
    What object each connector creates, which lead fields land where, and what happens to your email history.
  </Card>

  <Card title="Auto-push analyzed leads and stage filters" icon="send" href="/en/integrations/auto-push-and-stage-filters">
    What triggers an automatic push, which stages it fires on, and every reason a lead is silently skipped.
  </Card>

  <Card title="Push a lead to your CRM manually" icon="plug" href="/en/integrations/push-to-crm-manually">
    Send one lead to a connected CRM from the lead page, and read the Synced to CRM badge it leaves behind.
  </Card>
</CardGroup>
