
What you’ll build
You’ll create a single Ampersand integration between MailMonkey and Salesforce that:- Reads Contacts and Leads: pulls all Contacts and Leads from a customer’s Salesforce into MailMonkey.
- Creates Leads: inserts a new Lead in Salesforce whenever someone replies to a MailMonkey email campaign.
amp.yaml file that this tutorial builds toward on GitHub.
Prerequisites
Before you start, make sure you have:- An Ampersand account. Sign up at dashboard.withampersand.com.
-
The Ampersand Command Line Interface (CLI) installed. The
ampCLI is the tool you’ll use to deploy your integrations from the terminal. On macOS, install it with Homebrew:On Windows or other systems, download the binary from the releases page and add it to yourbashPATH. See the CLI overview for details. Verify the install by runningamp. You should see a list of available commands. - A Salesforce org (a free Developer Edition org works) that you can configure.
- A React frontend to embed the install UI into. If you don’t have one, clone our Starter Project.
What you’ll have at the end
A deployed integration and an embedded install wizard in your React app. When one of your customers clicks through it, they’ll connect their Salesforce, choose which fields to sync, and their Contacts and Leads will start arriving at your webhook. Each step below is tagged with where you’ll be working:Step 1: Create an Ampersand org and project
Sign in to your Ampersand account, then follow the on-screen steps to create an org and a project. Each org can have multiple projects, which is helpful for separating development and production environments. Note your project’s ID or name, since you’ll need it when you deploy in Step 5.
Optional: claim your domain. As an org owner, go to org settings and claim your domain so teammates auto-join when they sign up. Once enabled, anyone with a @yourcompany.com email is automatically added to your org.
Checkpoint: You’re in the dashboard with a project selected.
Step 2: Create a Salesforce provider app
A provider app holds the OAuth credentials Ampersand uses to connect to your customers’ Salesforce. For Salesforce, this is an External Client App created in your own Salesforce org.- In Salesforce, go to Setup, search for Dev Hub in the Quick Find box, and select Enable Dev Hub.
-
In Setup, search for External Client App Manager and click New External Client App. Give it a name, enable OAuth settings, and set the callback URL to:
text


-
Open the app’s Settings → OAuth Settings → Consumer Key and Secret and copy the Consumer Key and Consumer Secret.

-
In the Ampersand Dashboard, select your project, go to Provider apps, and choose Salesforce. Paste the Consumer Key as the Client ID and the Consumer Secret as the Client Secret, then save.

Going to production? Salesforce also requires you to register a namespace and package the External Client App so customers can install it. Those steps are covered in the full Salesforce provider guide.Checkpoint: Salesforce now appears under Provider apps in your project.
Step 3: Create a destination
A destination is where Ampersand delivers the data it reads from Salesforce. For this tutorial we’ll use webhooks.- Go to the Destinations page in the dashboard and add a new destination.
- Provide a name (this is the alias you’ll reference in
amp.yaml) and a URL that starts withhttps.
contactWebhookleadsWebhook
Don’t have a real endpoint yet? Create a temporary one with the Hookdeck Console and paste its URL. For the payload format and signature verification, see Webhooks and the Destinations overview.Checkpoint: Both
contactWebhook and leadsWebhook are listed on the Destinations page.
Step 4: Define the integration
Create a folder calledsource with a file inside called amp.yaml. This is where you define the integration.
The manifest below is the minimum needed to learn the flow: a Read action for two objects (contact and lead) and a Write action for lead.
source/amp.yaml
This is a trimmed manifest to keep the tutorial focused. For the complete set of options (optional fields, field mappings, custom schedules, and more), see the Manifest schema reference and the full sample on GitHub.Checkpoint: You have a
source/amp.yaml file with a read and a write block.
Step 5: Deploy the manifest
Deploy the integration with theamp CLI:
bash
Step 6: Embed the UI component
Now embed Ampersand’s React library so your customers can install the integration themselves. TheInstallIntegration component handles the auth flow and configuration steps for you. See Prebuilt UI components for the full component set.
First, create an API key in the dashboard under API keys:
Then add the component to your app. Note that the integration prop must match the name from your amp.yaml (mailmonkey-salesforce):
TypeScript

contactWebhook and leadsWebhook destinations, and your integration is live. 🎉
What’s next
- Prebuilt UI components: customize the install experience and manage installed integrations.
- Manifest schema reference: the complete set of
amp.yamloptions. - Destinations overview: deliver data to webhooks, S3, or Kinesis.
- Salesforce provider guide: package your app for production.

