Quickstart
For this Quickstart, we are going to build integrations for a cool new SaaS app called MailMonkey - an email campaign manager that integrates with Salesforce. You can see the final amp.yaml
file on Github.
Create an Ampersand org and project
Sign up for an Ampersand account, and then follow the steps on the screen to create an org and then a project. Each org can have multiple projects, this is helpful for separating development and production environments.
Create a provider app
We’ll first set up a Salesforce Connected App and put the Client ID and Client Secret inside of Ampersand Dashboard. See the Salesforce guide for more information.
Create a destination
Next, we create a webhook destination for Ampersand to send data that it reads from Salesforce. See Destinations for more details.
Define the integrations
To make MailMonkey interoperate seamlessly with our customers’ Salesforce, we will create an integration which will:
- Read Contacts and Leads: pull all Contacts and Leads from a customer’s Salesforce into MailMonkey.
- Create Leads: create a new Lead in Salesforce whenever somebody replies to to a MailMonkey email campaign.
Let’s create a folder called source
, with a file inside called amp.yaml
, this is where we will define our integration.
Read Contacts and Leads
Our integration will have a Read Actions. We’ll read 2 objects from Salesforce: contacts and leads.
Create Leads
Next we will add a Write Action. We want to insert new leads into our customer’s Salesforce.
Once a customer installs our integration, MailMonkey’s application backend will make an API call to Ampersand to create the new lead whenever there’s an email reply that we detect.
Deploy the completed manifest
You can see the final amp.yaml
file on Github.
Once we are happy with the definition of our integrations, we can deploy them with the amp CLI:
Embed UI components
Next, we will use Ampersand’s react library to embed ready-made UI components into our app, so that our customers can start using our shiny new integrations! We’ll use the InstallIntegration
component for the auth flow and configuration steps. Check out Embed UI components for more details on this component and other components to help your users set up and manage their integrations.
Here’s a simplified version of what our frontend code would look like: