Mailchimp Developer LogoMailchimp Developer Wordmark

Create a Webhook for Customer Journey Builder or Campaign Manager

For Marketers

At a glance

Webhooks are a helpful tool that you can use to trigger actions in your third-party applications through our customer journey map. By sending a FormData object or JSON payload to a valid URL that’s set up to accept HTTP POST requests, you can automatically send updates to applications you work with outside of Mailchimp based on your customers’ progress through a customer journey map or as part of a campaign you’re working with in Campaign Manager.  

You can use webhooks to:

  • Text a coupon code to a customer using a third-party app if the customer abandons their cart.

  • Cancel an event in a scheduling app when a customer opts out of the event in Mailchimp.

  • Mail a catalog to a repeat customer using a direct mail application.

  • Send a reminder text as part of a coordinated marketing campaign.

For this guide, we'll walk through an example for Customer Journey builder and one for Campaign Manager. For these examples, we run an online store for a chain of cafes called You Win Some, You Brew Some.

  • For the Customer Journey builder, we want to add a trigger to our customer journey map that will let us text a coupon code using our account at SimpleTexting when a customer abandons their cart. We’ll create a webhook that sends a POST request with the necessary information about the customer and the text message to the destination URL at SimpleTexting.

  • For Campaign Manager, we want to add a touchpoint to our campaign that sends a text to announce a special sale for friends and family. We’ll create a webhook that sends a POST request with the necessary information about the customer and the text message to the destination URL at SimpleTexting.

Note: By creating webhooks with the Customer Journey builder or Campaign Manager, you are connecting a third-party application to Mailchimp. Mailchimp is not a party to, or responsible for, compliance with any third-party application’s terms and Mailchimp does not guarantee any third-party application is adequate for your own needs. By using webhooks, you authorize the third-party application to access your Mailchimp data. Mailchimp is not responsible for any access, use, transfer or security of data or information by third-party applications. You are solely responsible for your decision to permit any third-party application to access your data.  

What you’ll need

  • A Standard or higher Mailchimp plan. Learn more about our pricing plans.

  • The authorization credentials for the third-party app you want to work with. Typically, this is your user ID and password, or your API key and API secret, or a bearer token.

  • The URL for the third-party app that accepts HTTP POST requests.

Note: Currently, you can only create webhooks that use a POST requests. GET or DELETE are not currently supported with Customer Journey Builder or Campaign Manager.

Create a Customer Journey builder webhook

To add a webhook to a customer journey map, you’ll need to launch the Customer Journey builder and add a webhook action.

Once you’ve added a webhook action to your customer journey map, you’ll see a pop-up modal where you’ll enter the details specific to the webhook you’re creating. 

For our example, we’re sending a text message using the SimpleTexting API to customers who’ve abandoned their cart. 

On the pop-up modal, we'd enter the following information.

FieldEntry

URL Destination

https://api-app2.simpletexting.com/v2/api/messages

Authorization

Click the Type drop-down and choose Token. Enter your SimpleTexting API token.

Payload

Copy and paste the body of your webhook request. This payload can contain Mailchimp merge tags in the field values. Your request might look something like:

{ "contactPhone": "*|PHONE|*", "accountPhone": "005551234", "mode": "MMS_PREFERRED", "subject": "Don’t leave empty-handed!", "text": "Take 10% off the items you left in your cart!", "fallbackText": "[url=%%fallback_link%%]", "mediaItems": [      "https://txt.so/img.jpg",      "507f1f77bcf86cd799439011" ] }

Once you’ve entered the webhook details, click Close and continue working with your customer journey map.

Create a Campaign Manager webhook

To add a webhook touchpoint to a campaign, you’ll need to launch Campaign Manager and add a webhook or an SMS webhook. 

Once you’ve added either type of webhook touchpoint to your campaign, you’ll see a pop-up modal where you’ll enter the details specific to the webhook you’re creating. 

For our example, we’re sending a text message using the SimpleTexting API to customers as part of a coordinated marketing campaign to announce our Friends and Family sale. We’ll add an SMS webhook touchpoint, and on the pop-up modal, we'd enter the following information.

FieldEntry

SMS Webhook Name

F&F Sale SMS

URL Destination

https://api-app2.simpletexting.com/v2/api/messages

Authorization

Click the Type drop-down and choose Token. Enter your SimpleTexting API token.

Payload

Copy and paste the body of your webhook request. This payload can contain Mailchimp merge tags in the field values. Your request might look something like: { "contactPhone": "*|PHONE|*", "accountPhone": "005551234", "mode": "MMS_PREFERRED", "subject": "Special sale prices!", "text": "For our friends and family, take 10% off all orders!", "fallbackText": "[url=%%fallback_link%%]", "mediaItems": [ "https://txt.so/img.jpg", "507f1f77bcf86cd799439011" ] }

Once you’ve entered the SMS webhook details, click Schedule SMS webhook and continue working with your campaign.