Talon.One
Talon.One provides personalized incentives for your mobile marketing CRM and gives you the ability to launch contextual 1-to-1 coupon, referral, discount, and loyalty campaigns quickly and efficiently.
Coupled with the use of a flexible rules engine to boost your conversion and retention rates without burning the promotion budget, Talon.One and Braze’s partnership can help take your loyalty or coupon program to the next level by sending codes generated by Talon.One to your audience through Braze.
This partnership is in early access beta. All features may not perform as exactly described. Please reach out to your Braze Account Manager for more information.
Pre-Requisites
Requirement | Origin | Description |
---|---|---|
Braze Account | Braze Settings | You will need an account with Braze, as well as an active Braze campaign that vouchers and codes will be generated for. |
Talon.One requires a rate-limit of 500 messages per minute.
You can modify your rate-limit using Braze. Find out how here.
API Integration
Set Up Coupons in Talon.One
You can modify the form of generated codes for any campaign by navigating to the Coupon Code Generator for that campaign found within the Talon.One dashboard under Campaign > Settings > Coupon Code Generator.
Endpoint Usage
Because Braze’s connected content only supports string data types, a custom endpoint must be used to convert everything to the correct data type. This endpoint contains the following built-in properties:
applicationID
(required)campaignID
(required)identifier
(required)integrationID
startDate
expiryDate
Endpoint Use Examples
Example One: Only Required Properties
1
2
3
4
5
6
7
8
curl https://demo.talon.one/v1/braze/createcoupon \
-X POST \
-H 'Authorization: Bearer [sessionToken]' \
-d '{
"applicationID": "1",
"campaignID: "1",
"identifier": "an-example-identifier"
}'
Example Two: All Built-In Properties
1
2
3
4
5
6
7
8
9
10
11
curl https://demo.talon.one/v1/braze/createcoupon \
-X POST \
-H 'Authorization: Bearer [sessionToken]' \
-d '{
"applicationID": "1",
"campaignID": "1",
"identifier": "an-example-identifier",
"integrationID": "an-example-integrationID",
"startDate": "2019-06-12T09:00:00Z",
"expiryDate": "2019-06-13T09:00:00Z"
}'
Example Three: Custom Attributes
Custom attributes can also be passed directly as long as they are notated with a dot prefix and still wrapped in a string as shown below.
1
2
3
4
5
6
7
8
9
10
curl https://demo.talon.one/v1/braze/createcoupon \
-X POST \
-H 'Authorization: Bearer [sessionToken]' \
-d '{
"applicationID": "1",
"campaignID": "1",
"identifier": "an-example-identifier"
".stringAtrrName": "examplestring",
".listOfNumbers": "[1,2,3,4,5,6,7,8,9,10]",
}'
Using Talon.One in Your Braze Campaign
To trigger the Talon.One coupon creation event, use Braze’s Connected Content feature. However, the coupon creation event can still be used in any Campaign message body or any canvas message body.
Place the code snippets below in your message body to configure your Campaign or Canvas to call Talon.One coupons into your message.
You can use Talon.One Coupon Codes in any Braze messaging channel (email, in-app message, push, Content Cards, News Feed) using any of our tools (Canvas or Campaigns). Get creative!
Step One: Add the Connected Content Tag to the Body of Your Message
1
2
{% connected_content %}
You can access Braze attributes by using liquid tags (e.g. {{${user_id}} to pass the user id).
Step Two: Add the URL to the createCoupon Endpoint of Your Talon.One Deployment
1
2
{% connected_content https://[YOUR_SUBDOMAIN].talon.one/v1/braze/createcoupon %}
Step Three: Add the Authorization Header and the POST Method of the Request
1
2
3
4
5
6
{% connected_content https://[YOUR_SUBDOMAIN].talon.one/v1/braze/createcoupon
:headers {
"authorization": "Bearer [sessionToken]"
}
:method post %}
Further details on how to generate a session token can be found here.
Step Four: Add the Body of the Request Containing the Coupon Code Specs Mentioned Above
1
2
3
4
5
6
7
8
9
{% connected_content https://[YOUR_SUBDOMAIN].talon.one/v1/braze/createcoupon
:headers {
"authorization": "Bearer [sessionToken]"
}
:method post
:body applicationID=[YOUR_APPLICATION_ID]&campaignID=[YOUR_CAMPAIGN_ID]&identifier={{campaign.${message_api_id}}}&integrationID={{${user_id}}}
:content_type application/json
%}
The identifier parameter is necessary to prevent the creation of multiple coupons for one message, and each paramter should be separated with an “&” as shown above.
Step Five: Storing the Talon.One Result
Add the save parameter at the end to store the Talon.One response as a Braze variable. In the example below, the Talon.One response is being saved in a variable name result.
1
2
3
4
5
6
7
8
9
10
{% connected_content https://[YOUR_SUBDOMAIN].talon.one/v1/braze/createcoupon
:headers {
"authorization": "Bearer [sessionToken]"
}
:method post
:body applicationID=[YOUR_APPLICATION_ID]&campaignID=[YOUR_CAMPAIGN_ID]&identifier={{campaign.${message_api_id}}}&integrationID={{${user_id}}}
:content_type application/json
:save result
%}
Step Six: Show the Value of the Code in the Message
Use a liquid tag to show the value of the generated code in the message.
1
2
3
4
5
6
7
8
9
10
11
12
{% connected_content https://[YOUR_SUBDOMAIN].talon.one/v1/braze/createcoupon
:headers {
"authorization": "Bearer [sessionToken]"
}
:method post
:body applicationID=[YOUR_APPLICATION_ID]&campaignID=[YOUR_CAMPAIGN_ID]&identifier={{campaign.${message_api_id}}}&integrationID={{${user_id}}}
:content_type application/json
:save result
%}
{{result.value}}
You can acess the coupon code with ` {{result.value}} ` as shown above, which will return the generated value similar to 44D4-U4PL
.
You can also access the entire response from Talon.One by accessing ` {{result}} ` directly, which will look similar to {"id"=>1548040, "value"=>"44D4-U4PL", "__http_status_code__"=>200}
.
Troubleshooting
Ensure your Connected Content syntax is correct (as in, using the right liquid tags for either a Canvas or Campaign, as well as referencing the right value in the json
response).
Be aware of the 500 messages/minute rate limit that you would want to implement in to the Braze Campaign/Canvas. If the rate limit is not respected, it cannot be guaranteed that every code will be generated, nor that the response will be there in time.