12th Apr 2021

Receiving the Loyalty Ledger of a Customer through Braze

This is a guide on integrating Braze with Talon.one. This guide will walk you through the Braze endpoint to retrieve Loyalty ledger information of customer coupons.

Endpoint usage

This endpoint contains the following built-in properties

(*) Required

  • USER_ID (*)

Example with all built-in properties

curl --location --request GET 'https://[YOUR_DEPLOYMENT].talon.one/v1/loyalty_programs/[LOYALTY_PROGRAM_ID]/profile/[USER_ID]' \
--header 'Authorization: Bearer [BEARER_TOKEN]'

Configuring Connected Content

To trigger the Talon.One coupon creation you have to use Braze's Connected Content Feature. You can use it in every campaign message body or any canvas message body.

ℹ️ The code snippet beneath these steps can be copied.

  1. Add the connected content tag to the body of your message and add the URL to the getLoyaltyPoints endpoint. You can access Braze attributes by using liquid tags. For example, {{${user_id}}} to pass the user id.


  2. Add the authorization header and the method (get) of the request. Follow this instructions to generate a session token.


  3. Add the save parameter at the end to store the Talon.One response as a Braze variable (in the below case, result).


  4. Use a liquid tag to show the value of the Total points of loyalty ledger in the message.


  5. Testing the campaign/canvas will give you the following result:

    Value of total points {{result.ledger.total}}:


    Whole response {{result}}:


Code snippet:

{% connected_content https://demo.europe-west1.talon.one/v1/loyalty_programs/19/profile/loyaltytier1

:headers {
  "authorization": "Bearer q-8pnumpXXXXXXXXXXAxf9Bz-i22G1"
:method get
:content_type application/json
:save result

Total points: {{result.ledger.total}}

Extracting the session token

Once you are logged into your Talon.One deployment as an administrator, you can get your session token by following these steps:

  1. Open the console/developer settings of your browser.
  2. Navigate to cookie storage.
  3. Copy the value of the talonone-credentials cookie.
  4. Paste it into an online URL decoder.


Still need help? Get in touch!
Last updated on 12th Apr 2021

Was this article helpful?

Thank you! You have already voted

If you’d like a member of our support team to respond to you, please send a note to support@talon.one