---
title: "Set Up Salesforce Integration"
canonical: "https://help.agiloft.com/space/HELP/621281283/Set+Up+Salesforce+Integration"
format: markdown
---
This article guides you through the steps to set up a new integration with Salesforce. The initial setup involves configuring both Agiloft CLM and Salesforce to enable record matching, setting up the Integration Hub, and installing the managed package in Salesforce.

# > Macro (anchor)

Set up Agiloft CLM

To set up your KB for the integration, complete the tasks below to create fields for linking records between Agiloft CLM and Salesforce and set up the Integration Hub.

## Create Salesforce ID fields

To link Salesforce records to Agiloft CLM records, you need to update several tables in your KB to add fields for storing unique IDs from Salesforce. These fields are mapped in the integration recipes. 

Follow the steps below to create the following fields in the appropriate table:

| **Table** | **Field Label** |
| --- | --- |
| Adobe Sign Agreements | Salesforce Agreement ID |
| Approvals | Salesforce Approval ID |
| Companies | Salesforce Account ID |
| Contracts | Salesforce Contract ID  
Salesforce Account ID  
Salesforce Opportunity ID |
| Docusign Envelopes | Salesforce Agreement ID |
| Opportunities | Salesforce Opportunity ID |
| People | Salesforce Contact ID |
| Tasks | Salesforce Task ID |

1. Log in to your KB as an administrator.
2. Find the table you want to add a field to and go to Setup [Table].
3. Go to the Fields tab.
4. On the Fields tab, hover over New and select Text.
5. For the Field Label, enter the label from the table above and click Next. It’s important to use the field labels in the table because these field mappings are preconfigured in Agiloft’s Integration Hub recipes.
6. On the Options tab, accept the default settings and click Next.
7. In all of the “Allow group to…” fields on the Permissions tab, select the following groups. Hold Ctrl and click to select multiple groups: admin, Admin Import, Business Admin.
8. Click Next.
9. On the Display tab, accept the default settings and click Finish. The system creates the field in the table.
10. Now, add the new field to the table’s record layout:
  1. Click the Layout tab.
  2. Find the new field on the left side of the screen.
  3. Drag and drop the field onto the Common Area of the layout, such as under the record ID field.
  4. Click Finish.
11. Repeat the steps above for each field and table.

When you’re finished adding fields, proceed to the Integration Hub setup.

## Set up Integration Hub

Now that Agiloft CLM is configured to link records with Salesforce, follow the steps below to set up the Integration Hub and connect it to Salesforce.

1. Enable Integration Hub by following the instructions in [Set Up Integration Hub](https://agiloft-public.atlassian.net/wiki/spaces/HELP/pages/597688481).
2. Create a connection to Salesforce in the hub. For instructions, see the Workato [documentation](https://docs.workato.com/en/connectors/salesforce.html#how-to-connect-to-salesforce-on-workato).

Now that the Integration Hub setup is complete, you can download the Salesforce recipes to your workspace.

## > Macro (anchor)

Download Salesforce recipes

To streamline the integration setup so you can quickly start sharing data between Agiloft CLM and Salesforce, Agiloft offers several preconfigured Integration Hub recipes that include all of the logic needed to synchronize accounts, opportunities, and contracts, including contract attachments, tasks, approvals, and signature agreements.

| **Recipe** | **Description** |
| --- | --- |
| **Sync data from Salesforce to Agiloft CLM** |
| Salesforce to Agiloft Upsert Account/Company | Creates or updates Companies in your KB when Accounts are created or updated in Salesforce. |
| Salesforce to Agiloft Upsert Opportunity | Creates or updates Opportunities in your KB when Opportunities are created or updated in Salesforce. |
| Salesforce to Agiloft Upsert Contract | Creates or updates Contracts in your KB when Agiloft Contracts are created or updated in Salesforce. |
| Salesforce to Agiloft Contract Attachment | Uploads contract documents to your KB when they’re attached to Agiloft Contracts in Salesforce. |
| Salesforce to Agiloft Upsert Task | Creates or updates Tasks in your KB when Agiloft Tasks are created or updated in Salesforce. |
| Salesforce to Agiloft Upsert Adobe Sign Agreement | Creates or updates Adobe Sign agreements in your KB when Signature Agreements are created or updated in Salesforce. |
| Salesforce to Agiloft Adobe Sign Agreement Attachment | Uploads new agreement attachments to your KB when documents are added to Signature Agreements. |
| Salesforce to Agiloft Upsert Docusign Agreement | Creates or updates Docusign envelopes in your KB when Signature Agreements are created or updated in Salesforce. |
| Salesforce to Agiloft Docusign Agreement Attachment | Uploads new agreement attachments to your KB when documents are added to Signature Agreements. |
| **Sync data from Agiloft CLM to Salesforce** |
| Agiloft to Salesforce Update Contract | Updates Agiloft Contracts in Salesforce when Contracts are updated in your KB. |
| Agiloft to Salesforce Upsert Approval | Creates or updates Agiloft Approvals in Salesforce when Approvals are created or updated in your KB. |
| Agiloft to Salesforce Upsert Task | Creates or updates Agiloft Tasks in Salesforce when Tasks are created or updated in your KB. |
| Agiloft to Salesforce Update Adobe Sign Agreement | Updates Signature Agreement records in Salesforce when synced Adobe Sign Agreements are updated in your KB. |
| Agiloft to Salesforce Upsert Adobe Sign Recipient | Creates or updates Signature Recipient records in Salesforce when Adobe Sign Recipients are created or updated in your KB. |
| Agiloft to Salesforce Update Docusign Agreement | Updates Signature Agreement records in Salesforce when synced Docusign Envelopes are updated in your KB. |
| Agiloft to Salesforce Upsert Docusign Recipient | Creates or updates Signature Recipient records in Salesforce when Docusign Recipients are created or updated in your KB. |

Except for the recipes that are specific to an e-signature provider, we recommend downloading all Salesforce recipes to your workspace. You don’t have to activate all of them, but downloading the complete set ensures any dependencies are available.

To copy the recipes to your workspace:

1. Log in to your KB and go to **Setup > Integration Hub**. Then go to the Library tab.
2. In the library, go to the Recipes tab.
3. In the search field, search for Agiloft and then click Agiloft in the result. The Salesforce recipes are displayed.
4. To get a recipe, open the recipe and click Use this recipe to copy it to your workspace.
5. In the Copy dialog box, select the project you want to copy the recipe to and click Copy.
6. Repeat the steps above to download each recipe.

Now that the Agiloft CLM setup is complete, continue to Salesforce setup below.

# Set up Salesforce

To set up Salesforce for the integration, complete the tasks below to install the managed package, add the custom fields to page layouts, add the contract request screen flows to record pages, and add the Agiloft CLM integration service user to Salesforce.

## Install the managed package

The managed package is a second-generation package (2GP) built on the Lightning framework. The package installs the Agiloft for Salesforce Lightning app, which gives you a view of your standard Opportunities and Accounts objects plus custom Agiloft Contracts, Agiloft Approvals, Agiloft Tasks, Signature Agreements, and Signature Recipients objects. The custom objects, along with custom flows and fields, enable you to request, review, and track contracts directly within Salesforce. For details about what’s included in the package, see [Salesforce Managed Package Contents](https://agiloft-public.atlassian.net/wiki/spaces/HELP/pages/862912521).

To install the package:

1. Go to the installation URL sent by your Agiloft representative.
2. When prompted, log in with your Salesforce credentials.
3. On the Install AgiloftSF page, select Install for All Users. Access to read, create, and edit records in the app are controlled by permission sets.
4. Click Install to install the package.

Now that the package is installed, proceed to the sections below to finish setting up Salesforce.

## > Macro (anchor)

Add custom fields to layouts

For matching records between systems, add the connector-managed [custom fields](https://agiloft-public.atlassian.net/wiki/spaces/HELP/pages/862912521/Salesforce+Managed+Package+Contents#custom_fields) to your Salesforce Account, Contact, and Opportunity layouts. In addition to adding ID fields for linking records, include fields like Agiloft Sync Status and Agiloft Sync Error so you can track and report on sync status.

For each object in the table below, update the layout to add the custom fields. We recommend adding them under Related Lists. For instructions, refer to the Salesforce [documentation](https://help.salesforce.com/s/articleView?id=platform.layouts_customize_ple.htm&type=5) on customizing page layouts.

| **Object** | **Custom Fields** |
| --- | --- |
| Account | Agiloft Company ID  
Agiloft Sync Status  
Agiloft Sync Error  
Last Agiloft Sync  
Integration Hub Sent Flag |
| Contacts | Agiloft External Contact ID  
Agiloft Sync Status  
Last Agiloft Sync Error  
Last Agiloft Sync Timestamp |
| Opportunities | Agiloft Opportunity ID  
Agiloft Sync Status  
Agiloft Sync Error  
Has Active Agiloft Contract  
Last Agiloft Sync  
Integration Hub Sent Flag |

When you finish adding the fields to your layouts, proceed below to add the custom screen flows to your record pages. 

## > Macro (anchor)

Add custom screen flows to records

To enable users to create Agiloft Contracts directly from Opportunities and Accounts, add Agiloft’s [custom screen flows](https://agiloft-public.atlassian.net/wiki/spaces/HELP/pages/862912521/Salesforce+Managed+Package+Contents#screen_flows) to your Account and Opportunity record pages. Follow the steps below to add the flows. For more information on embedding screen flows in lightning pages, see the Salesforce [documentation](https://help.salesforce.com/s/articleView?id=platform.flow_distribute_internal_lab.htm&type=5).

1. In Salesforce, go to the Agiloft for Salesforce app and open an Account record.
2. Go to Setup and select Edit Page.
3. In the Lightning App Builder, drag a Flow component onto the layout.
4. In the Flow field in the settings panel, search for and select the Account New Contract flow.
5. Under AccID, select the “Pass record ID into this variable” checkbox.
6. Save the changes. Then activate and assign the page so other users can see it. For details, see the Salesforce [documentation](https://help.salesforce.com/s/articleView?id=platform.lightning_app_builder_customize_lex_pages_activate.htm&type=5) on activating Lightning pages.
7. Now open the Opportunity record page in the Lightning App Builder.
8. Drag a Flow component onto the layout.
9. In the Flow field, search for and select the Opportunity New Contract flow.
10. Under OppID, select the “Pass record ID into this variable” checkbox.
11. Save the changes. Then activate and assign the page so other users can see it.

## Add the Agiloft CLM integration user to Salesforce

When you set up the Integration Hub, you added a dedicated integration service user account to your KB. Add that same user to Salesforce, too. Having the user in Salesforce helps identify integration-driven updates, simplify troubleshooting, manage permissions, and configure flow conditions that differentiate automated updates from end-user activity. For information on adding Salesforce users, see the Salesforce [documentation](https://help.salesforce.com/s/articleView?id=platform.admin_users.htm&type=5).

## > Macro (anchor)

Docusign users only: set signature provider metadata

The managed package includes a custom metadata type called Agiloft Signature Setting, which stores the name of the e-signature provider you use for signing documents. The Agiloft for Salesforce app uses this metadata to create the appropriate Signature Agreement record when you create a contract from an Account or Opportunity.

Agiloft Signature Setting defaults to Adobe Sign. If you use Adobe Sign, you don’t need to make any changes. If you use Docusign, you need to set the value to DocuSign. Follow the steps below to make the change.

To set Agiloft Signature Setting to DocuSign:

1. In the Agiloft for Salesforce app, go to Setup.
2. In the sidebar, go to Custom Metadata Types under Custom Code.
3. On the All Custom Metadata Types screen, click Manage Records next to Agiloft Signature Setting.
4. On the Signature Settings screen, click New.
5. In the Label field, enter DocuSign. You must enter DocuSign exactly as written, with a capital D and S. Otherwise, the value is ignored and the app defaults to Adobe Sign.
6. Click outside the field. Salesforce sets Signature Setting Name to the same value.
7. Click Save. DocuSign is now set as your signature provider.

Now that the initial setup is complete, see [Sync Data with Salesforce](https://agiloft-public.atlassian.net/wiki/spaces/HELP/pages/619708428) for instructions on activating the Integration Hub recipes.

#### Related articles

> Macro (contentbylabel)