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

# Salesforce

> Enhance your Salesforce workflows with Sequence quoting and real-time billing data

<img src="https://mintcdn.com/sequence/AaBHfWeLf5Am1S8n/images/integrations/covers/salesforce.png?fit=max&auto=format&n=AaBHfWeLf5Am1S8n&q=85&s=6de7a30b8ba3ce0937dffdcf7245aa71" alt="Salesforce" width="1288" height="512" data-path="images/integrations/covers/salesforce.png" />

Sequence’s Salesforce integration allows your Sales reps to easily create quotes, convert them to
billing schedules and track invoices and usage throughout a contract, all from within Salesforce.
This enables a frictionless flow from Sales to Finance to operationalize billing for new deals and
maintain an up-to-date view of the customer in Salesforce to inform future upsells and renewals.

**Use the Salesforce integration to:**

<Card title="Sync billing data from Sequence to Salesforce" horizontal href="/integrations/salesforce#sync-billing-data-from-sequence-to-salesforce" icon="rotate" />

<Card title="Create Sequence customers and billing schedules via Salesforce Flow" horizontal href="/integrations/salesforce#create-sequence-customers-and-billing-schedules-via-salesforce-flow" icon="diagram-project" />

<Card title="Use Sequence CPQ from Salesforce" horizontal href="/integrations/salesforce#use-sequence-cpq-from-salesforce" icon="file-signature" />

## Getting started

<Steps>
  <Step title="Install the Salesforce package">
    Sequence comes with a [Salesforce managed package](https://help.salesforce.com/s/articleView?id=sf.s1_branded_apps_managed_package_about.htm\&language=en_US)
    defining a set of custom components in your Salesforce environment:

    * [Custom objects](/integrations/salesforce#data-model) for Sequence quotes, billing schedule and invoices
    * [Custom Flow actions](/integrations/salesforce#create-sequence-customers-and-billing-schedules-via-salesforce-flow) for creating Sequence customers and billing schedules
      from Salesforce via [Salesforce Flow](https://developer.salesforce.com/developer-centers/flow)

    <Note>Reach out to the Sequence team for an installation link, and follow the [installation guide](/integrations/salesforce#salesforce-package-installation-guide).</Note>

    <Warning>
      Please note that a different installation link is required for your Salesforce production and developer accounts.

      To successfully sync data to Salesforce, the multi-currency feature needs to be enabled in your Salesforce account, and the required currencies need to be added ([learn more](https://help.salesforce.com/s/articleView?language=en_US\&id=000381840\&type=1)).
    </Warning>
  </Step>

  <Step title="Connect your Salesforce account to Sequence">
    From the Integrations page, select Salesforce and Connect. Choose the Salesforce account you want to connect and complete the
    authorization flow.

    <Frame>
      <img src="https://mintcdn.com/sequence/JBbyR0QYn1smSEQ7/images/integrations/salesforce/connect.gif?s=4fe3a0c92d710e7ddca96f9612a2b7c1" alt="Connect Salesforce" width="836" height="480" data-path="images/integrations/salesforce/connect.gif" />
    </Frame>
  </Step>

  <Step title="Link Sequence customers to Salesforce accounts">
    Sequence customers are mapped 1:1 to Salesforce accounts. All billing data synced from Sequence to Salesforce
    is automatically associated with the corresponding account.
    To manage links between Sequence customers and Salesforce accounts, navigate to the Customers tab. Your linked customers are
    marked with a Salesforce icon.

    <Frame>
      <img src="https://mintcdn.com/sequence/JBbyR0QYn1smSEQ7/images/integrations/salesforce/customer-link-01.png?fit=max&auto=format&n=JBbyR0QYn1smSEQ7&q=85&s=c1832907bb7c2dc05caee629408cdc9a" alt="Link customers" width="3170" height="1084" data-path="images/integrations/salesforce/customer-link-01.png" />
    </Frame>

    To link a new customer, select `Link account` from the sidebar on the right and enter a Salesforce Account ID.

    <Frame>
      <img src="https://mintcdn.com/sequence/JBbyR0QYn1smSEQ7/images/integrations/salesforce/customer-link-02.gif?s=5622ae2645261762d677eae4c5db38af" alt="Link customers" width="784" height="480" data-path="images/integrations/salesforce/customer-link-02.gif" />
    </Frame>

    <Tip>You can find the ID of a Salesforce account in the URL of the account page in Salesforce, e.g.
    `https://yourInstance.lightning.force.com/lightning/r/Account/<AccountID>/view` </Tip>

    When you create this link, Sequence automatically syncs all historical billing schedules and invoices
    for this customers into Salesforce, with a reference to the linked account.

    <Tip> If you use custom Flow actions to create Sequence customers from Salesforce, you can automatically
    assign this link at customer creation. This way you won't have to manually link new customers to Salesforce accounts</Tip>
  </Step>
</Steps>

## Sync billing data from Sequence to Salesforce

With the integration set up, Sequence will automatically sync new billing schedules and invoices from Sequence
to Salesforce. All Salesforce records created this way include a reference to the respective accounts.

<Frame>
  <div>
    <img src="https://mintcdn.com/sequence/JBbyR0QYn1smSEQ7/images/integrations/salesforce/schedule-invoice-sync-01.png?fit=max&auto=format&n=JBbyR0QYn1smSEQ7&q=85&s=3ea8475691501d80231953cf7db53d39" alt="Sync billing schedule and invoices" width="3030" height="2312" data-path="images/integrations/salesforce/schedule-invoice-sync-01.png" />

    <img src="https://mintcdn.com/sequence/JBbyR0QYn1smSEQ7/images/integrations/salesforce/schedule-invoice-sync-02.png?fit=max&auto=format&n=JBbyR0QYn1smSEQ7&q=85&s=32b625a4c42b11c15707b7acfeae8836" alt="See invoices in Salesforce" width="3042" height="1950" data-path="images/integrations/salesforce/schedule-invoice-sync-02.png" />
  </div>
</Frame>

<Note>Sequence syncs data to Salesforce in real-time. A billing schedule is synced when you start it or update it.
An invoice is synced when you finalize or send it.</Note>

## Create Sequence customers and billing schedules via Salesforce Flow

The Sequence Salesforce package includes 2 custom Apex actions that allow you to interact with the Sequence API from
Salesforce Flow: **Create Sequence Customer** and **Create Sequence Billing Schedule**. You can access
these actions in the flow builder by adding an Action node to your flow.

<Frame>
  <img src="https://mintcdn.com/sequence/JBbyR0QYn1smSEQ7/images/integrations/salesforce/custom-actions-01.gif?s=35e8c373794ee47fba95178e016eb46c" alt="Sequence custom actions" width="1076" height="480" data-path="images/integrations/salesforce/custom-actions-01.gif" />
</Frame>

The action inputs match the API specifications for the [create customer](https://docs.sequencehq.com/reference/latest/customer/create-customer)
and [create billing schedule](https://docs.sequencehq.com/reference/latest/billing/create-billing-schedule) endpoints respectively.
The package includes custom Apex classes to represent these inputs. Use Assignment nodes to set these variables in your flow.

<Frame>
  <img src="https://mintcdn.com/sequence/JBbyR0QYn1smSEQ7/images/integrations/salesforce/custom-actions-02.gif?s=1c4e476d7b3d447aa9517ae2af8f7db9" alt="Sequence custom actions input assignment" width="852" height="480" data-path="images/integrations/salesforce/custom-actions-02.gif" />
</Frame>

The package also includes a few sample flows that can be used as a reference or starting point:

<Frame>
  <img src="https://mintcdn.com/sequence/JBbyR0QYn1smSEQ7/images/integrations/salesforce/flow-templates.png?fit=max&auto=format&n=JBbyR0QYn1smSEQ7&q=85&s=9482591a5b66af47ad8d6334f627a5ef" alt="Flow templates" width="1794" height="1714" data-path="images/integrations/salesforce/flow-templates.png" />
</Frame>

* **Create Customer** (auto-launched flow): creates a Sequence customer given an account record and a contact record in Salesforce
* **Create Billing Schedule** (auto-launched flow): creates an empty Sequence billing schedule for a given Sequence customer ID and billing schedule start date
* **Create customer for Quoting** (record-triggered flow): creates a Sequence customer when an opportunity enters "Proposal/Price Quote" stage
* **Create customer for Billing** (record-triggered flow): creates both a Sequence customer and a Sequence billing schedule when an opportunity is closed-won

The sample and record-triggered Flows that create customers rely on the **`Sequence Customer ID`** field on the Account. **If the field is empty**, the Flow creates a new Sequence customer and writes the new ID back to the Account. **If the field is already populated**, the Flow treats the account as already linked and **does not** create another customer.

<Warning>
  **Auto-create customer** Flows require a **complete Billing Address**, a **Sequence Billing Contact** with **Mailing Address**, and **two-letter ISO** country codes (`FR`, `US`, not full names) on **every address** the Flow uses (billing and mailing). **Record-triggered** Flows run when an Opportunity is **updated** to a stage such as **Proposal/Price Quote** or **Closed Won**: **save those Account and contact values before** you move the Opportunity to that stage. Updating the stage first can yield an incorrect customer, or the Flow may **fail silently** with no error in the UI. If customers are missing in Sequence, re-check addresses and the billing contact.
</Warning>

For an in-depth overview how to work with Sequence custom actions, watch the video walkthrough below.

<Frame caption="Part 1: creating customers and billing schedules">
  <iframe className="w-full aspect-video" src="https://player.vimeo.com/video/999507483?badge=0&autopause=0&player_id=0&app_id=58479" frameborder="0" allow="autoplay; fullscreen; picture-in-picture; clipboard-write" title="Part 1: creating customers and billing schedules" />
</Frame>

<Frame caption="Part 2: adding products and prices billing schedules">
  <iframe className="w-full aspect-video" src="https://player.vimeo.com/video/999507533?badge=0&autopause=0&player_id=0&app_id=58479" frameborder="0" allow="autoplay; fullscreen; picture-in-picture; clipboard-write" title="Custom Actions: Part 2" />
</Frame>

## Use Sequence CPQ from Salesforce

The Sequence Salesforce package comes with a custom button to launch the Sequence quote builder. Add the button
to your opportunity page layout to create a Sequence quote for your customer directly from Salesforce.

<Frame>
  <div>
    <img src="https://mintcdn.com/sequence/JBbyR0QYn1smSEQ7/images/integrations/salesforce/use-cpq-01.png?fit=max&auto=format&n=JBbyR0QYn1smSEQ7&q=85&s=f9588e709d3c260963db16c53bc74c92" alt="Launch Sequence quotes" width="4500" height="1404" data-path="images/integrations/salesforce/use-cpq-01.png" />

    <img src="https://mintcdn.com/sequence/JBbyR0QYn1smSEQ7/images/integrations/salesforce/use-cpq-02.png?fit=max&auto=format&n=JBbyR0QYn1smSEQ7&q=85&s=acf9748bc5e5f5c11c92350941111885" alt="Launch Sequence quotes" width="4508" height="1018" data-path="images/integrations/salesforce/use-cpq-02.png" />
  </div>
</Frame>

When the quote is published, Sequence syncs it back to Salesforce under the original opportunity.

## Salesforce package installation guide

<Steps>
  <Step title="Get installation link">
    Reach out to the Sequence team to obtain an installation link.
  </Step>

  <Step title="Authenticate your Salesforce account">
    Follow the installation link and complete the Salesforce sign-in flow.
  </Step>

  <Step title="Install for all users">
    Follow the installation link and complete the Salesforce sign-in flow if you are not already signed in.

    Choose **Install for All Users**, approve the installation, and click **Install**.

    <Frame>
      <img src="https://mintcdn.com/sequence/JBbyR0QYn1smSEQ7/images/integrations/salesforce/package-install-01.png?fit=max&auto=format&n=JBbyR0QYn1smSEQ7&q=85&s=220d8c0e2e9e862899844ea838b36ecf" alt="Install the Sequence package" width="2098" height="1346" data-path="images/integrations/salesforce/package-install-01.png" />
    </Frame>
  </Step>

  <Step title="Enable multi-currency">
    Multi-currency must be enabled for billing schedules and other objects to sync correctly between Sequence and Salesforce. Complete this step **before** you connect Salesforce to Sequence in the Sequence app.

    1. In Salesforce **Setup**, use Quick Find to search **Company Information**.
    2. Open **Company Information** and click **Edit**.
    3. Check **Activate Multiple Currencies** and click **Save**.

    Then configure which currencies exist and their rates:

    1. In **Setup**, search **Manage Currencies**.
    2. Click **New** to add the required currencies and set conversion rates.

    For background, see Salesforce’s guide to [multiple currencies](https://help.salesforce.com/s/articleView?language=en_US\&id=000381840\&type=1).
  </Step>

  <Step title="Enter Sequence API credentials">
    Set up access to the Sequence API:

    1. In Sequence, go to **Settings** -> **API keys** and generate a new API key to be used by Salesforce.
    2. Make note of the client ID and secret key.
    3. In Salesforce, go to **Setup** -> **Custom Metadata Types**.
    4. Click **Manage Records** next to **Sequence Integration Settings**.

    <Frame>
      <img src="https://mintcdn.com/sequence/JBbyR0QYn1smSEQ7/images/integrations/salesforce/package-install-02.png?fit=max&auto=format&n=JBbyR0QYn1smSEQ7&q=85&s=43fd2f05f9878d6cbfef7055b7c7f7e0" alt="Manage custom metadata type" width="1964" height="782" data-path="images/integrations/salesforce/package-install-02.png" />
    </Frame>

    Create a new record with your client ID and key pair. By default the endpoint URLs are prepopulated with Sequence's production endpoint URLs.

    <Frame>
      <img src="https://mintcdn.com/sequence/JBbyR0QYn1smSEQ7/images/integrations/salesforce/package-install-03.png?fit=max&auto=format&n=JBbyR0QYn1smSEQ7&q=85&s=4157a6288816d9bacb2a1fb5b16ae119" alt="Add API credentials to Salesforce" width="1958" height="976" data-path="images/integrations/salesforce/package-install-03.png" />
    </Frame>
  </Step>

  <Step title="Add custom components to your Salesforce pages">
    Add Sequence custom components to your page layouts. For example:

    * **Account page layout:** Sequence **Billing Schedules**, **Invoices**, **Quotes**, and the **Sequence Billing Contact** field.
    * **Opportunity page layout:** Sequence **Quotes** and the **Create Sequence Quote** button.

    After installation, **page layouts are not updated automatically**. A Salesforce admin must add the relevant components manually. Adding **Sequence Billing Contact** to the Account layout is **required**. The Flow templates use this field to determine the billing contact when creating a Sequence customer.

    Package installation creates the objects, Flow actions, sample Flows, and custom fields; layout placement is always a separate manual step.

    <Frame>
      <img src="https://mintcdn.com/sequence/JBbyR0QYn1smSEQ7/images/integrations/salesforce/package-install-04.png?fit=max&auto=format&n=JBbyR0QYn1smSEQ7&q=85&s=661c5d0b596f65de3770c70286287445" alt="Customize page layouts" width="4510" height="1826" data-path="images/integrations/salesforce/package-install-04.png" />
    </Frame>
  </Step>
</Steps>

## Sequence Salesforce data model

The data model for the custom objects in the package is illustrated below.

* Billing schedules, invoices and quotes are related to accounts
* Billing schedule and quotes are also related to opportunities
* The pricing details of quotes and billing schedules are captured by a set of related objects: phases, prices, minimums and discounts

<Frame>
  <img src="https://mintcdn.com/sequence/JBbyR0QYn1smSEQ7/images/integrations/salesforce/data-model.png?fit=max&auto=format&n=JBbyR0QYn1smSEQ7&q=85&s=1d49a379026faf4c84a03c89ed23630e" alt="Custom actions data model" width="8736" height="6304" data-path="images/integrations/salesforce/data-model.png" />
</Frame>

## Frequently asked questions

<AccordionGroup>
  <Accordion title="How does Salesforce identify duplicate Sequence customers, and how does Flow auto-linking work?">
    The Salesforce package adds a **Sequence Customer ID** custom field to the Account object. Flows that create customers check this field:

    * If **Sequence Customer ID** is **empty**, the Flow **creates** a new Sequence customer and **writes the ID back** to the Account.
    * If **Sequence Customer ID** is **already populated**, the Flow **stops** and **skips** customer creation. The account is treated as already linked.

    That is how the integration avoids pushing the same Salesforce account into Sequence multiple times.
  </Accordion>

  <Accordion title="What billing contact is used when an account is pushed into Sequence?">
    The Salesforce package adds a custom field called **Sequence Billing Contact** to the Account object. Add this field to the **Account page layout** (see the installation guide). Once added, users can select a contact as the Sequence billing contact. The Flow templates use this field by default to determine the billing contact when creating a Sequence customer. You can change the Flow to use a different contact or field if needed.
  </Accordion>

  <Accordion title="How do I get the 'Create quote' toggle to show on an opportunity?">
    Update the default Opportunity page layout to include **Quotes** and the **Create Sequence Quote** button from the package. The button opens a **blank quote** by default with the **customer pre-assigned**.
  </Accordion>

  <Accordion title="How do I map my existing Salesforce accounts to Sequence during onboarding?">
    You can **initiate the customer link from Salesforce** rather than Sequence, but **the link must exist on both sides**. The managed package adds **Sequence Customer ID** on the Account object, which you can bulk-populate with the **Data Import Wizard** or **Data Loader**. You must also create the corresponding link **in Sequence** via the **API**, a **script**, or **manually in the Sequence dashboard**.

    Reach out to our team for help during onboarding. In practice:

    1. **In Salesforce**, populate **Sequence Customer ID** on each Account in bulk as needed. The Data Import Wizard is built into Salesforce (no extra install), supports up to 50,000 records per run, and uses a CSV. Export accounts from Salesforce, add Sequence customer IDs (for example from a CSV export in the Sequence dashboard), and import to update Accounts. Our team can help match Salesforce accounts to Sequence customers.
    2. **In Sequence**, link each customer to the Salesforce account via the **dashboard**, **API**, or a **script**. Sequence can assist with **manual linking in the Sequence dashboard** during the initial setup phase if needed.
  </Accordion>
</AccordionGroup>

## Troubleshooting

<AccordionGroup>
  <Accordion title="My customer isn't syncing (using provided Salesforce Flow templates)">
    This could be for a number of reasons:

    1. An issue with the Flow configuration
    2. Missing or incomplete data on the Account: Sequence expects a **complete Billing Address** and a designated **Sequence Billing Contact** with a **Mailing Address**. The **country** on **every address** involved must be a **two-letter ISO code** (for example `FR`, `US`, not full country names). When these are wrong or incomplete, customer creation from Flow can **fail silently** with **no visible error message**. Verify addresses and the billing contact even if the Flow appears to run.
    3. A country on an address was not in ISO 2-letter format (for example use `FR` for France).
  </Accordion>

  <Accordion title="When I create a quote, I'm getting an error">
    For the quote to launch in Sequence, the account in Salesforce must be linked to an existing Sequence customer. If you're using the provided Salesforce Flow templates, consider creating a customer in Sequence once a Salesforce opportunity moves to `Negotiation/Proposal` stage (i.e. prior to moving to `Closed won`). This ensures the customer is linked and ready to receive a sales proposal via Sequence.
  </Accordion>

  <Accordion title="I'm unable to sync billing schedules and other objects back with Salesforce">
    For Sequence objects to sync back to Salesforce, you need to have the multi-currency setting enabled in your Salesforce environment (see above). If you're still seeing sync errors, please get in touch with our team.
  </Accordion>
</AccordionGroup>
