- CRM
- Account Engagement (formerly Pardot)
What’s supported
Supported actions
This connector has two modules, with CRM as the default. The CRM module supports:- Proxy Actions, using the base URL
https://{{.workspace}}.my.salesforce.com. - Read Actions, including full historic backfill and incremental read.
- Subscribe Actions.
- Write Actions, including Bulk Write and Delete.
- Proxy Actions, using the base URL
https://{{.workspace}}.my.salesforce.com. - Read Actions, including full historic backfill and incremental read.
- Write Actions.
Supported CRM objects
| Object | Read | Write | Subscribe |
|---|---|---|---|
| Account | ✅ | ✅ | ✅ |
| Campaign | ✅ | ✅ | ✅ |
| Case | ✅ | ✅ | ✅ |
| Contact | ✅ | ✅ | ✅ |
| Event | ✅ | ✅ | ✅ |
| Lead | ✅ | ✅ | ✅ |
| Opportunity | ✅ | ✅ | ✅ |
| Product | ✅ | ✅ | ✅ |
| Task | ✅ | ✅ | ✅ |
| User | ✅ | ✅ | ✅ |
| All other standard objects | ✅ | ✅ | 🟡 (See the full list*) |
| All custom objects | ✅ | ✅ | ✅ |
- Standard fields
- Custom fields
Supported Account Engagement objects
The Salesforce connector supports the following Account Engagement module objects:Example integration
Example manifest files can be found in our samples repository on GitHub:Before you get started
Salesforce orgs needed
You will need two separate Salesforce orgs to complete this process:- Dev Hub Org: A Salesforce org with Dev Hub enabled. You will create the External Client App inside this org.
- Namespace Org: A Developer Edition Salesforce org that is only used to register a namespace. You will link this namespace to the Dev Hub Org.
1. Enable Dev Hub
First you need to choose the Salesforce org to make into your “Dev Hub Org”. If you intend to become a Salesforce partner and distribute via AppExchange later:- You can sign up for a trial Salesforce Partner Business Org, which is essentially a trial of a regular Salesforce org (typically 12 months long). Once you become an official partner, Salesforce will grant you two free Sales Cloud licenses. You can request an extension of the trial or purchase more licenses.
- Alternatively, if you are already a Salesforce customer, then you can use your existing Salesforce org, and Salesforce will add these free licenses to your existing org when you are accepted as a partner. Please see Salesforce documentation for more information.
- You can sign up for a free Developer Edition Salesforce org and use it as your Dev Hub Org. Please note that even though Developer Edition orgs are subject to deletion when there is inactivity, this does not apply if you have an External Client App in the org, so it is safe to use a free Developer Edition org as your Dev Hub Org.
- Log in to your Salesforce org.
- From Setup, enter Dev Hub in the Quick Find box and select Dev Hub.
- Select Enable Dev Hub.
- Select Enable Unlocked Packages and Second-Generation Managed Packages.

2. Register a namespace
Please note that namespaces cannot be created in the Dev Hub Org you just enabled in the step above. You must use a separate Salesforce Developer Edition org (we will call this org the “Namespace Org”).- Sign up for a free Developer Edition org.
-
Navigate to the gear icon in the top right corner and select Setup.

- In the quick search box at the top, type in Package Manager in the Quick Find box and select Package Manager. In Namespace Settings, click Edit.
- Enter a namespace and select Check Availability. We recommend picking a namespace that is your product name or a shortened version of your product name.
- When prompted to select a package to associate with this namespace, select None, then click Review.
- Review your selections and click Save.

3. Link namespace to Dev Hub Org
- Log in to the Dev Hub Org from Step 1.
- Open App Launcher (9 dots at the top left), and search for Namespace Registries.
- Click Link Namespace on the top right.
- When prompted to authenticate, log into the Namespace Org from Step 2. If you are having trouble with this step, try again in an incognito window.
- After linking, select All Namespace Registries filter to view the namespace.


4. Create External Client App
In order to connect with your customer’s Salesforce instances, you’ll need to create a Salesforce External Client App by following the steps below:- Log in to your Dev Hub Org that you created above.
-
Navigate to the gear icon in the top right corner and select Setup.

- Search for External Client App Manager.
- Click New External Client App.

- Enter a name for the External Client App. This should match your product name.
- Specify a contact email; this should be your support email address.
- Set Distribution State to “Packaged”.
- Enable OAuth settings.
- In callback URL put
https://api.withampersand.com/callbacks/v1/oauth. - Add the following OAuth scopes at the minimum:
- Perform requests at any time (
refresh_token,offline_access) - Manage user data via APIs (
api)
- Perform requests at any time (
✅ For more details on which OAuth scopes to include, refer to the OAuth Tokens and Scopes guide.
- Uncheck the box for
Require Proof Key for Code Exchange (PKCE) extension for Supported Authorization Flows - Check the box for
Enable Authorization Code and Credentials Flow

- Go to the Policies tab, expand “OAuth Policies”, and click the edit button. In the “App Authorization” box, make the following modifications:
- In “Refresh Token Policy”, select “Refresh token is valid until revoked”
- In “IP Relaxation”, select “Relax IP restrictions”

- Go to the Settings tab, expand “OAuth Settings”. Click on “Consumer Key and Secret”.

5. Create Provider App in Ampersand
- Log in to your Ampersand Dashboard.
-
Select the project where you want to create a Salesforce integration.

- Select Provider apps.
- Select Salesforce from the Provider list.
-
Enter the previously obtained Consumer Key in the Client ID field and the Consumer Secret in the Client Secret field.

6. Package the External Client App
In order for your External Client App to be able to make API calls to your customers’ Salesforce instances, Salesforce requires that you create a package version, and have your customers install your package in their Salesforce org.- Install the Salesforce CLI using npm or another supported method:
- Create a Salesforce DX project. From a new directory, generate a project:
MySalesforcePackage with a name that fits your integration, such as your product name.
- Authenticate with your Dev Hub Org. From the project directory you just created, log in to your Dev Hub Org (the org where you created the External Client App):
- Set the namespace in the project. Edit
sfdx-project.jsonin the project root. Set thenamespacevalue to the namespace you registered and linked to your Dev Hub earlier:
MY_NAMESPACE with your actual namespace prefix.
- Create the managed package. Use the command below and replace these flags with actual values that are applicable to you:
name: replace with your product nameerror-notification-username: this must match the email address of one of the users in the Dev Hub Org. For example, you can use your own email here. This is the email address that will receive notifications from Salesforce about errors in the package.
- Pull External Client App metadata into the project. Run this command to programmatically fetch the settings that you had just configured for your External Client App:
force-app/main/default/extlClntAppOauthSettings/force-app/main/default/externalClientApps/
- Build and promote a package version. Create a new package version (this can take several minutes). Replace
My Packagewith the name you supplied in thenameflag of thesf package createcommand above.
- Promote that version so it can be installed by customers:
SUBSCRIBER_PACKAGE_VERSION_ID with the ID from the previous step.
- Get the package install URL. Use the Subscriber Package Version ID to build the install URL for your package.
- Ask your customers to install the package. Instruct your customers to go to the package install URL and click “Install for All Users”. They must complete this step before connecting their Salesforce account using Ampersand’s prebuilt UI components. Otherwise OAuth will fail.


Migrating Connected App to External Client App
Salesforce no longer supports the creation of new Connected Apps. If you had previously created a Connected App to be used for Ampersand integrations, it will continue to work for your existing and new customers as long as their user profile has theApprove Uninstalled Connected Apps or Use Any API Client permissions. See Salesforce customer guide for details.
Whenever you would like to, you can follow these steps to migrate a Connected App to an External Client App:
- Open Salesforce Setup and search for Manage Connected Apps and select the Connected App that you want to convert. Click Migrate To External Client Application.

- Check both required checkboxes to confirm migration.

- Click Migrate.

- Click OK.

- A confirmation message will appear.

- Open External Client App Manager.

- Select your app, go to the Settings tab and set “Distribution State” to Packaged.

- Go to the Policies tab, expand “OAuth Policies”, and click the edit button. In the “App Authorization” box, make the following modifications:
- In “Refresh Token Policy”, select “Refresh token is valid until revoked”
- In “IP Relaxation”, select “Relax IP restrictions”

- Enable Dev Hub on your Salesforce org that is hosting the Connected App (which is now an External Client App).
- Create a new Developer Edition Salesforce org and register a namespace, then link the namespace to the Dev Hub Org.
- Package the External Client App by following these instructions.
Using the connector
To start integrating with Salesforce:- Create a manifest file like the example.
- Deploy it using the amp CLI.
- If you are using Read Actions or Subscribe Actions, create a destination.
- Embed the InstallIntegration UI component.
- Start using the connector!
- If your integration has Read Actions or Subscribe Actions, you’ll start getting webhook messages.
- If your integration has Write Actions, you can start making API calls to our Write API.
- If your integration has Proxy Actions, you can start making Proxy API calls.

