This guide is intended for developers that would like to send subscribers and events from their application to Drip, on behalf of their users.
If you’re a landing page provider, your integration with Drip will likely create a new subscriber when a landing page is submitted.
If you’re a shopping cart or payment provider, your integration will likely submit a purchase event to Drip, creating a new subscriber along the way.
If you would like Drip to send subscribers and events into your application, we will be releasing our outbound integration guide soon.
Before You Start
Before you start your integration, contact us so we can work out the specifics of your integration.
You will first need to create an OAuth application in Drip. To do this, sign up for a Drip account and head to My User Settings > OAuth Applications.
Next, use your application credentials to request access tokens on behalf of your users (see our REST API documentation for more details).
What You Should Send to Drip
There is often more than one way to accomplish a task in Drip using our three basic constructs: events, tags, and custom fields.
This document describes the best practices you will want to follow to be eligible for a listing in our integrations directory, and to ensure you build a robust integration that serves our shared customers’ needs.
Integrating with Drip is simple, requiring calls to 2 API endpoints, in the following order:
- Create (or update) the subscriber in Drip
- Send an event to Drip
Create (or update) the subscriber in Drip
The only required field for this API call is an email address. If you’ve gathered more data than an email address (like a name, address, or phone number), you can send that data along as custom fields.
You do not have to worry about whether the subscriber already exists in Drip. If it does not exist, we will create it; otherwise, we will simply update the subscriber with any new data you send along.
See the API docs for more specifics about our “Create or Update” call.
Send an event to Drip
Once you’ve sent us the subscriber data, you’ll want to send an event to Drip. This allows your customer to trigger automations based on an event that happened in your application.
Once you’ve sent the event to Drip, your user will be able to login to Drip and create a trigger in a Workflow or automation rule that will fire when your event arrives:
Events in Drip have two main components: a name and a set of properties.
Examples of popular event names from Drip integration partners include:
- Made a purchase
- Submitted a landing page
- Submitted a form
- Payment authorized
- Payment refunded
When naming your events, follow these guidelines:
- Always begin with a verb
- Use proper sentence structure (i.e., don’t omit words)
- Only capitalize the first word (don’t use title case)
- Include your application’s name in the source property, not the name of the event\
You should always include a source property with your events, in snake-case for consistency. For example, if your service is called “Awesome Pages”, use awesome_pages as your source. This will make it possible for us to add you to our list of officially supported integrations.
In addition to the source attribute, you should send any other identifying information that will help your user target specific events.
For example: suppose your user has five different landing pages in your service. Since the user will likely want to trigger different actions in Drip based on which landing page was submitted, you should send along information like the unique landing page id (likely as landing_page_id) and its name (landing_page_name).
If you are an e-commerce provider, you should consider sending us the value of the purchase (in cents), a unique product_id, the product_name, and an order_id.
See the API docs for more specifics about this call.
Things to Avoid
One common anti-pattern we’ve seen is adding a drop down list in your UI to allow your users to add subscribers to a Drip campaign.
Campaigns are a small aspect of Drip, and are not the correct mechanism for introducing a subscriber to a Drip account. Drip is event-based, so sending your event to Drip (as described above) will give your user ample flexibility to add subscribers to Drip campaigns, Workflows, etc.
If you really want to provide your customer with an action in your UI, add a drop down list containing the user’s Workflows (a list of active workflows can be obtained using this API call). Workflows are a core feature of Drip and users have much more flexibility than with campaigns.
If you decide to add a Workflows drop down list, make it an optional field.
Testing Your Integration
Once the above API calls are in place, you can test your integration in Drip using a “Performed a custom event” trigger. Enter the name of your event to trigger an action in Drip:
Once your integration is tested and live in your application, contact us and we will add your application and event names to our list of native trigger providers:
Get In Touch
We love to hear about new integrations. If you have questions along the way, don’t hesitate contact us!