10 minute read time
Zapier is an online tool that helps you automate workflows by connecting apps and services that you use. You can automate tasks without having to build an integration yourself or hiring someone to build an integration for you.
Combining Zapier with Campaign Monitor allows you to pass data about your subscribers from one platform to another!
Important: Building Zaps in order to pass the correct data into Campaign Monitor requires coding knowledge of Javascript. If you’re unfamiliar with Javascript, please ask a developer for help.
The types of Zaps you’ll want to build is dependent on the actions that will increase a subscriber’s Punch Card Stamps amount.
For a transaction-based punch card program, any time a valid transaction is made, you will want to adjust a subscriber’s Punch Card Stamps based on the number of products or services that were purchased in the last transaction. Example Zaps include:
For an engagement-based punch card program, you will want to adjust a subscriber’s Punch Card Stamps if you’ve completed some action on your website like filling out a survey, creating an account, or leaving a comment or review. Example Zaps include:
Note: Your Zap triggers will be dependent on the integration that Zapier supports.
If you’re just starting your punch card program, you’ll need to make sure your list has the following recommended custom fields. These fields will allow you to run a loyalty program smoothly in Campaign Monitor.
We recommend creating a new list that stores all of your loyalty program subscribers. Once you’ve created your list, add the following custom fields.
Custom Field Name | Data Type | Personalization Tag | Description |
Punch Card Stamps | Number | [PunchCardStamps] | Count of how many stamps a customer has accrued. |
Completed Punch Cards | Number | [CompletedPunchCards] | Count of how many punch cards a subscriber has completed. |
Last Order Count | Number | [LastOrderCount] | Count of how many items were purchased in the last order. |
Increase Punch Card Stamps | Text | [IncreasePunchCardStamps] | A custom field that is set to “true” or “false” used to enter a subscriber into a segment – pulling them into a journey that will adjust the punch card stamps. |
Decrease Punch Card Stamps | Text | [DecreasePunchCardStamps] | A custom field that is set to “true” or “false” used to enter a subscriber into a segment – pulling them into a journey that will adjust the punch card stamps. |
Adding these fields can be done within the Campaign Monitor UI or you are free to use the Lists API to add these fields.
You’ll want to connect your Campaign Monitor app to Zapier as your first step.
1. In Zapier, navigate to the apps section.
2. Add the Campaign Monitor app.
3. Apply your Campaign Monitor API key and click the continue button.
Note: Follow these instructions to find your API key in Campaign Monitor.
Be sure to connect apps that will trigger loyalty-specific events as well.
For these Zaps, the following steps are typically required:
1. A trigger from your eCommerce store or website.
2. (If data is coming from an eCommerce / POS app) A “Code by Zapier” action to convert Line Item Quantities to a single Order Count value.
Note: Most eCommerce / POS integrations store the total number of items ordered as individual quantities of a single line item and must be summed before being passed into Campaign Monitor.
3. A “API Request in Campaign Monitor” action to send data over to Campaign Monitor.
As noted earlier, your Zaps are dependent on the type of app you’re integrating with and the trigger you’d like to use. We’ll be using the Shopify integration to pull our order data that will increase our subscriber’s Punch Card Stamps, but feel free to adjust the steps as necessary!
// Initialize variables var lineItemQuantity = inputData.lineItemQuantity; // Initialize input data var orderCount = 0; // Initialize orderCount value // Convert Shopify Line Items from string to an integer var lineItemQuantityArray = lineItemQuantity.split(',').map(Number); // Sum Shopify Line Items lineItemQuantityArray.forEach( num => { orderCount += num; }) // Return sum of line items ordered as orderCount output = [{orderCount}];
https://api.createsend.com/api/v3.3/subscribers/{listid}.json
Note: Replace {listid} with your loyalty lists’ ID. To find your list’s ID, navigate to your list in Campaign Monitor, and select the “Settings” option.
Scroll to the bottom of the page to find your list ID.
{"CustomFields": [ {"Key":"LastOrderCount", "Value":"{LastOrderCount}"}, {"Key":"IncreasePunchCardStamps", "Value":"true"}], "ConsentToTrack": "Unchanged"}
Note: Replace {listid} with your loyalty lists’ ID. To find your list’s ID, navigate to your list in Campaign Monitor, and select the “Settings” option.
Scroll to the bottom of the page to find your list ID.
{"CustomFields": [ {"Key":"LastOrderCount", "Value":"{LastOrderCount}"}, {"Key":"IncreasePunchCardStamps", "Value":"true"}], "ConsentToTrack": "Unchanged"}
If you’ve already created a Zap to increase a subscriber’s Punch Card Stamps, you can quickly create this Zap by duplicating your previous Zap. After your Zap has been duplicated, follow steps 2 and 4 to make the necessary changes. Otherwise follow the steps below.
// Initialize variables var lineItemQuantity = inputData.lineItemQuantity; // Initialize input data var orderCount = 0; // Initialize orderCount value // Convert Shopify Line Items from string to an integer var lineItemQuantityArray = lineItemQuantity.split(',').map(Number); // Sum Shopify Line Items lineItemQuantityArray.forEach( num => { orderCount += num; }) // Return sum of line items ordered as orderCount output = [{orderCount}];
https://api.createsend.com/api/v3.3/subscribers/{listid}.json
Note: Replace {listid} with your loyalty lists’ ID. To find your list’s ID, navigate to your list in Campaign Monitor, and select the “Settings” option.
Scroll to the bottom of the page to find your list ID.
{"CustomFields": [ {"Key":"LastOrderCount", "Value":"{LastOrderCount}"}, {"Key":"DecreasePunchCardStamps", "Value":"true"}], "ConsentToTrack": "Unchanged"}
Important – Please Note
This code is provided as is, without warranty, but we’ll do our best to answer questions you have about it here.
Supporting custom code is outside of the scope of Campaign Monitor by Marigold Support, so if you need help with this, or other code you’re working on, the best place to ask is on Stack Overflow. You’re still welcome to ask Support just in case it’s something unrelated to the code that isn’t working, but you may be directed to an outside source to get help from the community.
In order to trigger Punch Card Program-specific journeys in Campaign Monitor, you’ll need to create segments in your loyalty list. Navigate to your loyalty list in Campaign Monitor and create the following segments:
A segment that subscribers join when their punch card stamps need to be increased.
This segment will be used to enter subscribers into a journey that increases their Punch Card Stamps. Create a rule where the “Increase Punch Card Stamps” custom field matches exactly the word “true”.
Name this segment “Increase Punch Card Stamps”.
A segment that subscribers join when their punch card stamps need to be decreased.
This segment will be used to enter subscribers into a journey that decreases their Punch Card Stamps. Create a rule where the “Decrease Punch Card Stamps” custom field matches exactly the word “true”.
Name this segment “Decrease Punch Card Stamps”.
Keeping your customer informed on how many stamps they have on their punch card and how many more stamps they need until their next reward can drive your customers to purchase more from you. A message that says “you need to buy 3 more coffees for your next reward” incentivizes the customer, driving them towards a finish line!
For instructions on how to surface loyalty information in your emails, view this guide.
Automations are necessary to run your loyalty program smoothly and efficiently. Here is a list of example journeys you can build, including directions on how to set them up in Campaign Monitor:
Redemption journeys
At this time, in relation to punch card programs, Campaign Monitor supports automatically providing a customer a coupon code when they complete a punch card. The customer will ideally receive another coupon when they’ve completed another card.
You’re now able to manage your punch card program data using Zapier Zaps.
For in-depth loyalty program check-lists, read below:
For other how-to loyalty guides, read below:
Emails that are personalized, timely and relevant are proven to be more effective.
With our powerful yet easy-to-use tools, it's never been easier to make an impact with email marketing.
Try it for free