Iterable integrates with Sageflo to enable mutual customers to send messages with coupon codes that are redeemable for free items, discounts, etc. Sageflo's product provides the entire coupon management backend, which Iterable can call, at time of send, to pull in unique coupon codes for each subscriber.
NOTE
This integration requires an Iterable account and a Sageflo account.
If you’re not already an Iterable client, request a demo to discuss the how the Iterable and Sageflo integration can work for you.
Instructions
Contents
1 Overview
2 Feed URL Customization
2.1 Feed URL Anatomy
2.1.1 Sections that do not need to be reviewed and should not be edited:
2.1.2 Sections that should be reviewed and edited if needed:
2.1.3 Optional sections that are included for log purposes only:
3 Adding the Data Feed to Iterable
4 Adding the Coupon to Your Campaign
4.1 Add the Data Feed to your template
4.2 Adding the Coupon to Your Template
4.3 Preview Your Template
5 Formatting Your Coupon
5.1 No Formatting
5.2 Bold
5.3 Linked
5.4 Forced Case
6 Additional Customizations
6.1 Display more than one coupon code from a pool
6.2 Display more than one coupon code from separate pools
6.3 Add Log Fields
6.4 Add a Prefix or Suffix to Your Code
6.4.1 Adding a Prefix
6.4.2 Adding a Suffix
COUPON SERVICE
-
Overview
This document is a guide for how to add the code snippet from Coupon Service to Iterable campaigns in order to display single-use coupons in emails.
-
Feed URL Customization
The code snippet provided for each Coupon Service pool contains a Feed URL. This URL makes a call to Coupon Service for the single-use coupon and passes valuable information back to our system for logging which individual received each coupon code. Below is a sample URL:
https://coupon.shawscottlabs.com/coupon/CLIENTNAME/pools/CLIENTPOOL?auth=AUTHCODE&email={{#urlEncode}}{{email}}{{/urlEncode}}&campid={{campaignId}}
-
Feed URL Anatomy
Each part of the Feed URL has an important function, some of which must be reviewed before adding the code snippet to your HTML. Below is the function for each part of the Feed URL:
-
Sections that do not need to be reviewed and should not be edited:
- CLIENTNAME = client account
- AUTHCODE = code unique to the client’s account
- CLIENTPOOL = pool within the client’s account
- email = the key selected for your pool
- If you selected “cid” as your key, this will display as “cid=”
-
Sections that should be reviewed and edited if needed:
- ={{#urlEncode}}{{email}}{{/urlEncode}} is the field in your Iterable account that will be used to populate the value for the selected key
- If you want to use a different field, replace the highlighted “email” text with the field name desired
-
Optional sections that are included for log purposes only:
The “campid” section of the Feed URL are used to send campaign information back to our system for log purposes. The log files are available for download so you can see which record received each coupon and for which campaign. We recommend leaving the variable in the Feed URL for all emails.
- &campid={{campaignId}} = the Iterable campaign ID.
See Section 6 for additional customizations that can be made to your Feed URL.
-
Adding the Data Feed to Iterable
Once you have reviewed the Feed URL and made any desired adjustments, you are ready to add it to your Iterable account.
- Log into your account.
- From the menu on the left side of your screen, click on Integrations then select Data Feeds from the options.
- Click on the green + CREATE NEW FEED button.
- From the pop up:
- Add a name for your data feed. We recommend you use the pool name or another title that describes the offer and campaign the Data Feed is for.
- For Format select “JSON” from the dropdown.
- For Template Handlebars Alias you can leave it blank if you only intend to call in codes from one pool for each campaign. If you may call in codes from more than one pool for a single campaign, enter an alias name.
- For URL paste the Feed URL
- Click on the green SAVE FEED button
- If you are calling in codes from more than one pool, repeat steps c. and d. for the additional feed(s)
- More information on how to create Data Feeds can be found here under the section “Create a data feed to query the web service.”
-
Adding the Coupon to Your Campaign
Once your Data Feed has been created, you are ready to add it to your campaign and call the code into your HTML.
-
Add the Data Feed to your template
Once you have created your campaign and added your template:
- Continue to Edit Template
- Click on the Advanced options tab
- Click on the check box to Enable template generation using data feeds…
- Select the Data Feed(s) needed for your campaign
- If you are adding more than one Data Feed, you must also check the Use data feed alias checkbox. See Section 6.2 for information on adding more than one Data Feed to a template.
- More information on how to add Data Feeds to campaigns can be found here under the section “Reference data feeds in a template.”
-
Adding the Coupon to Your Template
Within your HTML template, where you want the code to display, add the following: [[coupons.[0]]]
This will return one coupon from the data feed added to your campaign. For example, the code may look like below:
<p class="section-head">50% OFF SITEWIDE</p>
<p>Use code: [[coupons.[0]]]</p>
-
Preview Your Template
At the bottom of your template, click the green Save Template button. Next, preview your template so you can verify that codes are populating as expected.
- Click on the Preview button and select the option to Preview with data.
- From the Preview tab, enter the email address for a user on your list and click the button to Load User Data.
- Scroll down the page and click the button to Load Template Feeds. You will see the feed data populate in the window below and can also preview the codes within the template in the window to the left.
-
Formatting Your Coupon
You can format your code to display as needed. Please see below for examples:
-
No Formatting
To insert the coupon with no formatting, simply add the following where you want the coupon displayed:
[[coupons.[0]]]
- Example output: WEL1234
-
Bold
To insert the coupon with bold text, add the following where you want the coupon displayed:
<b>[[coupons.[0]]]</b>
- Example output: WEL1234
-
Linked
To insert the coupon with a hyperlink, add the following where you want the coupon displayed:
<a class="text-link" href="http://www.link.com">[[coupons.[0]]]</a>
- Example output: WEL1234
-
Forced Case
To insert the coupon with a forced case, add the following where you want the coupon displayed:
<span style="text-transform: lowercase;">[[coupons.[0]]]</span>
- Example output: wel1234
Or
<span style="text-transform: uppercase;">[[coupons.[0]]]</span>
- Example output: WEL1234
-
Additional Customizations
The Feed URL can be further customized for the specific use cases noted below.
-
Display more than one coupon code from a pool
This is useful if you want to use the same pool for multiple offers. For example, your pool may contain codes that are valid for 30% off any item. You may want to show different offer types in your email such as 30% off hats with code XXXXX and 30% off shoes with code XXXXX. Note that displaying more than one code from a pool only works if the pool is not persistent.
To add more than one code from a single pool:
- Edit the Feed URL: You will need to add a “count” parameter to the Feed URL to indicate the number of coupons to request. For example, if you want to display two coupons from one pool, you would add the highlighted section to the Feed URL:
https://coupon.shawscottlabs.com/coupon/CLIENTNAME/pools/CLIENTPOOL?auth=AUTHCODE&email={{#urlEncode}}{{email}}{{/urlEncode}}&campid={{campaignId}}&count=2
- Follow the instructions in Section 3 to add the Feed URL to your Iterable Data Feed.
- Follow the instructions in Section 4.1 to add the Data Feed to your template.
- To add the codes to your HTML template:
- Where you want the first code to display, add the following: [[coupons.[0]]]
- Where you want your second code to display, add the following: [[coupons.[1]]]
-
Display more than one coupon code from separate pools
This is useful if you need to display multiple offers in one email and need to use codes from different pools.
To add more than one code from separate pools:
- Follow the instructions in Section 3 to create separate Data Feeds for each pool Feed URL. When doing this, make sure you create a Template Handlebars Alias per section 3.1.e.iii. For example, you may create:
- Data Feed 1: Pool1
- Template Handlebars Alias: Poolone
- Data Feed 2: Pool2
- Template Handlebars Alias: Pooltwo
- Follow the instructions in Section 4.1 to add the Data Feeds to your template. Make sure you click the checkbox to “Use data feed alias”
- Next, add the codes to your HTML template. You will need to include the Template Handlebars Alias in the string:
- Where you want the code from the first pool to display, add the following, where “Poolone” is the Template Handlebars Alias for your first pool: [[Poolone.coupons.[0]]]
- Where you want the code from the second pool to display, add the following, where “Pooltwo” is the Template Handlebars Alias for your first pool: [[Pooltwo.coupons.[0]]]
- To preview your template, follow the instructions in Section 4.3. When you click the button to Load Template Feeds you will see data populate for all the feeds you have added to your template.
-
Add Log Fields
You may want to send additional values for the log files the Coupon Service system generates. This is useful if you would like to send values like customer ID, region, etc.
To add log fields, use the “&log.<attribute>=” parameter in the Feed URL. For example, if you would like to add a log field called “custid” and pass the value for an Iterable list field that is called “customerid” your Feed URL would look like below:
https://coupon.shawscottlabs.com/coupon/CLIENTNAME/pools/CLIENTPOOL?auth=AUTHCODE&email={{#urlEncode}}{{email}}{{/urlEncode}}&campid={{campaignId}}&log.custid={{#urlEncode}}{{customerid}}{{/urlEncode}}
When the Data Feed is used in a template and the campaign is launched, the log files from Coupon Service will include a column called “custid” which will be populated with each record’s “customerid” value from Iterable.
-
Add a Prefix or Suffix to Your Code
You may have a pool of codes that you would like to add a prefix and/or suffix to. You can do this by editing the Feed URL to include additional parameters.
-
Adding a Prefix
- Use the “&prefix=” parameter in the Feed URL. For example, if you would like the prefix to your code to be “ABC” your Feed URL would look like below:
https://coupon.shawscottlabs.com/coupon/CLIENTNAME/pools/CLIENTPOOL?auth=AUTHCODE&email={{#urlEncode}}{{email}}{{/urlEncode}}&campid={{campaignId}}&prefix=ABC
In the example above, if the code in your pool was “12345” with the prefix parameter added to the Feed URL your code will display in your template as “ABC12345”
- If you are also using the count parameter, you must include the same number of prefixes, separated by commas or an error will be returned. For example:
https://coupon.shawscottlabs.com/coupon/CLIENTNAME/pools/CLIENTPOOL?auth=AUTHCODE&email={{#urlEncode}}{{email}}{{/urlEncode}}&campid={{campaignId}}&count=2&prefix=ABC,DEF
In the example above, if the first code in your pool was “12345” and the second code was “23456” with the prefix and count parameters added to the Feed URL your codes will display in your template as “ABC12345” and “DEF23456”
- If you would like the same prefix for multiple codes, your Feed URL would look something like:
https://coupon.shawscottlabs.com/coupon/CLIENTNAME/pools/CLIENTPOOL?auth=AUTHCODE&email={{#urlEncode}}{{email}}{{/urlEncode}}&campid={{campaignId}}&count=2&prefix=ABC,ABC
In the example above, if the first code in your pool was “12345” and the second code was “23456” with the prefix and count parameters added to the Feed URL your codes will display in your template as “ABC12345” and “ABC23456”
- Once your Feed URL is ready, follow the instructions in Sections 3 and 4 to add the coupon to your template.
-
Adding a Suffix
- Use the “&suffix=” parameter in the Feed URL. For example, if you would like the suffix to your code to be “XYZ” your Feed URL would look like below:
https://coupon.shawscottlabs.com/coupon/CLIENTNAME/pools/CLIENTPOOL?auth=AUTHCODE&email={{#urlEncode}}{{email}}{{/urlEncode}}&campid={{campaignId}}&suffix=XYZ
In the example above, if the code in your pool was “12345” with the suffix parameter added to the Feed URL your code will display in your template as “12345XYZ”
- If you are also using the count parameter, you must include the same number of suffixes, separated by commas or an error will be returned. For example:
https://coupon.shawscottlabs.com/coupon/CLIENTNAME/pools/CLIENTPOOL?auth=AUTHCODE&email={{#urlEncode}}{{email}}{{/urlEncode}}&campid={{campaignId}}&count=2&suffix=XYZ,WXY
In the example above, if the first code in your pool was “12345” and the second code was “23456” with the suffix and count parameters added to the Feed URL your codes will display in your template as “12345XYZ” and “23456WXY”
- If you would like the same suffix for multiple codes, your Feed URL would look something like:
https://coupon.shawscottlabs.com/coupon/CLIENTNAME/pools/CLIENTPOOL?auth=AUTHCODE&email={{#urlEncode}}{{email}}{{/urlEncode}}&campid={{campaignId}}&count=2&suffix=XYZ,XYZ
In the example above, if the first code in your pool was “12345” and the second code was “23456” with the suffix and count parameters added to the Feed URL your codes will display in your template as “12345XYZ” and “23456XYZ”
- Once your Feed URL is ready, follow the instructions in Sections 3 and 4 to add the coupon to your template.
Any questions? Contact labs@shawscott.com
Shaw + Scott | Copyright © 2019. All Rights Reserved of 11
Comments
0 comments
Please sign in to leave a comment.