With the Sageflo + Iterable integration, you can use two of Sageflo's products in the campaigns you send with Iterable: Coupons and Archiver.
In this article
Using Sageflo Coupons
Sageflo's Coupons feature lets you send coupon codes that are redeemable for free items or discounts. Sageflo provides the coupon management system, and Iterable calls it at send time to pull in unique coupon codes for each subscriber.
Here's how to add the code snippet from Sageflo Coupons to Iterable campaigns in order to display single-use coupons in emails.
Step 1: Customize the data feed URL
Every coupon pool created in Sageflo Coupons has a unique data feed URL that makes a call to Sageflo Coupons. When the call is made, information is sent to the Sageflo system to determine which coupon pool to retrieve a coupon from, which individual coupon should be retrieved, and for which campaign. Then Sageflo passes the single-use coupon back to Iterable to be displayed in the campaign.
Here's what the URL looks like:
https://coupons-app.sageflo.com/coupon/CLIENTNAME/pools/CLIENTPOOL?auth=AUTHCODE&email={{#urlEncode}}{{email}}{{/urlEncode}}&campid={{campaignId}}
Each part of the data feed URL has an important function, and you'll need to review some sections before adding the code snippet to your HTML.
These sections should not be edited:
-
CLIENTNAME
: Your account -
AUTHCODE
: Code unique to your account -
CLIENTPOOL
: The pool within your account -
email
: The key selected for your pool in Sageflo Coupons. (If you selectedcid
as your key, this will display ascid=
)
These are the sections you should review and edit if needed:
-
={{#urlEncode}}{{email}}{{/urlEncode}}
: The field in your Iterable user profile that will be used to populate the value for the selected key. This is the identifier used to log which record received each coupon. - If you want to use a different profile field, replace the highlighted
email
text with your desired field name (for example,userID
).
Optional sections that are included for log purposes only:
-
campid={{campaignId}}
: The section of the data feed URL that sends campaign information back to Sageflo’s system for logging purposes. Sageflo log files are available to download through the Coupons user interface, so you can see which record received each coupon and for which campaign. We recommend leaving this variable in the data feed URL for all emails.
For more ways to customize your data feed URL, see More Options
Step 2: Create a data feed in Iterable
Once you have reviewed the data feed URL and made any necessary adjustments, you're ready to attach it to a data feed in Iterable.
Log in to your Iterable account.
Click Content > Data Feeds.
Click + CREATE NEW FEED.
Add a name for your data feed. We recommend using the pool name or another name that describes the offer and campaign the data feed will be used for.
For Format, select JSON.
Leave the Template handlebars alias section blank if you only intend to call in codes from one pool for each campaign. Otherwise, if you're planning to call in codes from more than one pool for a single campaign, enter an alias name.
For URL, enter the data feed URL.
Click SAVE FEED.
If you're calling in codes from more than one pool, make sure to enter a name and template Handlebars alias for each data feed.
Step 3: Add the data feed to your template
Once you've created your data feed, you're ready to add it to your campaign.
Create a new campaign and add your template to it.
Continue to Edit Template.
Click Advanced options.
Click Enable template generation using data feeds.
Select the data feed(s) you want to add to your campaign.
If you're adding more than one data feed, check the Use data feed alias checkbox.
Step 4: Add the coupon to your template
Add the following to your template where you want the coupon code to display:
[[coupons.[0]]]
This will return one coupon from the data feed added to your campaign. For example, your HTML might look like this:
<p class="section-head">50% OFF SITEWIDE</p> <p>Use code: [[coupons.[0]]]</p>`
Step 5: Preview your campaign
- Click Save Template.
- Click Preview > Preview with data.
- Enter the email address for a user on your list and click Load User data.
- Scroll down the page and click 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.
Step 6 (Optional): Format your coupon
You can format your coupon to display a few different ways:
No formatting
To insert the coupon with no formatting, 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=" https://sageflo.com/coupons/">[[coupons.[0]]]</a>
Example output: WEL1234
Forced Case
To insert the coupon with a forced case, add one of the following where you want the coupon displayed:
-
Lowercase:
<span style="text-transform: lowercase;">[[coupons.[0]]]</span>
Example output: wel1234
-
Uppercase:
<span style="text-transform: uppercase;">[[coupons.[0]]]</span>
Example output: WEL1234
More options
You can choose to display either a single coupon from a pool or multiple.
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 coupons 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 1234
and 30% off shoes with code 5678
. (You can only display more than
one coupon from pools that are not persistent.)
To add more than one coupon from a single pool:
- Add a
count
parameter to the data 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 data feed URL:
https://coupons-app.sageflo.com/coupon/CLIENTNAME/pools/CLIENTPOOL?auth=AUTHCODE&email={{#urlEncode}}{{email}}{{/urlEncode}}&campid={{campaignId}}&count=2
Add the data feed URL to your Iterable data feed, and add the data feed to your template.
-
Add the coupons to your template:
-
Where you want the first coupon to display, add the following:
[[coupons.[0]]]
-
Where you want your second coupon 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 coupons from different pools.
To add more than one coupon from separate pools:
-
Create separate data feeds for each pool's data feed URL. Make sure you create a template Handlebars alias for each data feed.
For example, you might create:
-
Data feed 1:
- Name:
Pool1
- Template Handlebars alias:
Poolone
- Name:
-
Data feed 2:
- Name:
Pool
2 - Template Handlebars alias:
Pooltwo
- Name:
-
-
Add the coupons to your template. You will need to include the template Handlebars alias in the string.
-
Where you want the coupon from the first pool to display, add the following (
Poolone
is the template Handlebars alias for your first pool):[[Poolone.coupons.[0]]]
-
Where you want the coupon from the second pool to display, add the following (
Pooltwo
is the template Handlebars alias for your second pool):[[Pooltwo.coupons.[0]]]
-
Click Load Template Feeds, and 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 Sageflo Coupons system generates. This is useful if you want to send values like customer ID or region.
To add log fields, use the &log.<attribute>=
parameter in the data feed
URL. For example, say you want to add a log field called custid
and pass the
value for an Iterable field called customerid
. Your data feed URL would look
like this:
https://coupons-app.sageflo.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 Sageflo Coupons will include a column called custid
, which will be
populated with each record’s customerid
value from Iterable.
Add a prefix to your code
You may have a pool of coupons that you would like to add a prefix to.
You can do this by editing the data feed URL to include additional parameters.
Use the &prefix=
parameter in the data feed URL. For example, if you want the
prefix to your coupon to be ABC
, your data feed URL would look like this:
https://coupons-app.sageflo.com/coupon/CLIENTNAME/pools/CLIENTPOOL?auth=AUTHCODE&email={{#urlEncode}}{{email}}{{/urlEncode}}&campid={{campaignId}}&prefix=ABC
In the example above, if the coupon in your pool was 12345
with the prefix
parameter added to the data feed URL your coupon would display in your template
as ABC12345
. If you're also using the count
parameter, you must include the
same number of prefixes, separated by commas, or you'll get an error. For
example:
https://coupons-app.sageflo.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 coupon in your pool was 12345
and the
second coupon was 23456
with the prefix
and count
parameters added to the
data feed URL, your coupons would display in your template as ABC12345
and
DEF23456
. If you wanted to use the same prefix for multiple coupons, your data
feed URL would look something like this:
https://coupons-app.sageflo.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 coupon in your pool was 12345
and the
second coupon was 23456
with the prefix
and count
parameters added to the
data feed URL, your coupons would display in your template as ABC12345
and
ABC23456
.
Adding a suffix
To add a suffix to your coupon(s), use the &suffix=
parameter in the data feed
URL.
For example, if you want the suffix to your coupon to be XYZ
, your data
feed URL would look like this:
https://coupons-app.sageflo.com/coupon/CLIENTNAME/pools/CLIENTPOOL?auth=AUTHCODE&email={{#urlEncode}}{{email}}{{/urlEncode}}&campid={{campaignId}}&suffix=XYZ
In this example, if the coupon in your pool was 12345
with the suffix
parameter added to the data feed URL, your coupon would display in your template
as 12345XYZ
. If you're also using the count
parameter, you must include the
same number of suffixes, separated by commas, or you'll see an error. For
example:
https://coupons-app.sageflo.com/coupon/CLIENTNAME/pools/CLIENTPOOL?auth=AUTHCODE&email={{#urlEncode}}{{email}}{{/urlEncode}}&campid={{campaignId}}&count=2&suffix=XYZ,WXY
In this example, if the first coupon in your pool was 12345
and the
second coupon was 23456
with the suffix
and count
parameters added to the
data feed URL, your coupons would display in your template as 12345XYZ
and
23456WXY
. If you want to use the same suffix for multiple codes, your data
feed URL would look something like:
https://coupons-app.sageflo.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 coupon in your pool was 12345
and the
second coupon was 23456
with the suffix
and count
parameters added to the
data feed URL, your coupons would display in your template as 12345XYZ
and
23456XYZ
.
Using Sageflo Archiver
Sageflo's Archiver feature lets you save all the unique, personalized messages you've sent to your customers. With Archiver, your marketing and customer care teams can view, resend, download, and print sent messages, as well as view and manage each subscriber's status.
To archive messages, you'll need to BCC them to an email address Sageflo will provide you during your Archiver account setup process.
NOTE
Talk to your Iterable customer success manager about possible fees for BCC.
You'll need to add the BCC email address you receive from Sageflo to each email template that you want to archive.
Capturing campaign metadata
Sageflo automatically captures the following campaign metadata values:
- Subject line
- Send date and time
- Campaign name
- Campaign ID
- Labels
You can also capture the following campaign metadata values:
messageType
channelType
To learn how to capture messageType
and channelType
, talk to your Sageflo
account manager.
Resending messages
Sageflo Archiver can use the Iterable API to resend messages that have been BCC’ed to Archiver. This feature is incredibly useful for when customer care teams receive requests about deleted or missing email messages.
To set this up, you'll need to work with your Sageflo account manager to create a user account with the correct access permissions. Once you've done this, Sageflo will create a resend campaign in your Iterable account. This campaign will be triggered via API when a resend request is made from Archiver and will resend the exact same message the customer originally received.
Looking up subscribers
Archiver can connect with Iterable to display subscriber details in the Archiver user interface. This is particularly useful for distributed customer care and retail teams who need access to customer details and/or subscriber status.
To enable Subscriber Lookup through the Archiver user interface, you'll need to give Sageflo API user access to your Iterable account. Talk to your Sageflo account manager to create a user account with the proper access. Once you've done this, you can work with your Sageflo account manager to determine which user profile fields to display and which channel and message types Archiver users should be able to manage opt-in status for.