Introduction
We, at Annex Cloud, are a leading software company specializing in delivering comprehensive customer loyalty solutions, referral marketing platforms, and customer retention tools. Our core offering, the Loyalty Experience Platform, is a robust suite of cloud-based software designed to help businesses cultivate and nurture customer loyalty. Through our platform, companies can effectively manage loyalty programs, incentivize repeat purchases, and personalize customer experiences to foster long-term engagement and brand loyalty.
In addition to our Loyalty Experience Platform, we also provide an Email Service Provider (ESP) solution, enabling businesses to integrate email marketing strategies into their customer engagement efforts. Our ESP empowers companies to deliver targeted and personalized email campaigns, leveraging customer data to drive conversions, enhance brand awareness, and strengthen relationships with their audience.
Overall, our innovative suite of solutions equips businesses across various industries, including retail, e-commerce, hospitality, and consumer goods, with the tools necessary to build enduring customer relationships, drive customer retention, and ultimately achieve business growth.
Purpose
The purpose of this document is to outline the process of integrating Annex Cloud's Loyalty Experience Platform with Blueshift, specifically focusing on pushing loyalty data and events based on the workflows created within ESP/Blueshift. This integration aims to streamline the exchange of customer data between the Loyalty Experience Platform and Blueshift, enabling businesses to leverage loyalty insights and engagement events to enhance their email marketing strategies effectively. By integrating these two platforms, businesses can create more targeted and personalized email campaigns, drive customer engagement, and maximize the impact of their loyalty programs on overall customer retention and brand loyalty.
High Level Design (HLD)

Revision History
| Version | Date | Name | Description |
|---|---|---|---|
| V1 | 08-03-2024 | Manoj & Dhananjay W | Blueshift Integration ( HD-1800) |
Prerequisites for Installation
Defaults:
- Dev path: http://api.socialannexdev.com/blueshift/Blueshift.php
- Production path: https://api.socialannex.com/blueshift/Blueshift.php
- The prerequisite sample values have been provided below. These are provided by Annex Cloud.
| Client Name: | Blueshift |
|---|---|
| Site ID: | 12293470 |
| Access Token: | MWWaspeCIeZgvITwjqpZF1tWzM7kOD31 |
| Authorization Key: | MWWaspeCIeZgvITwjqpZF1tWzM7kOD31 |
Loyalty Program Version
The version v3 of the platform supports the integration with Blueshift ESP Loyalty program.
Configuration Steps
Steps to Log in to Blueshift:
- Click the link provided, which will direct you to the specific webpage where you can log in to Blueshift.
- The URL in the link, "Blueshift: SmartHub CDP ", is the web address for Blueshift's login page. When you click on the link, your web browser will open this page, allowing you to log in to your Blueshift account.
- Once you're on the login page, you will see fields where you can enter your username and password to access your Blueshift account.
Steps to Create a List:
- Navigate to the All-Lists section, which is depicted in the accompanying image. Click on the button labeled "Customer List" to proceed.
- Lists can also be generated via API. Refer to the Postman screenshot below demonstrating the API execution.
Steps to get Users API Key & Event API Key:
- Navigate to Account Settings -> API key as shown in the following image.
- Navigate to the Account Settings section and then click on API keys, as indicated in the accompanying image.
Integration Flow

Functions
addOrUpdateContactBatch()
- This function adds new contacts or updates existing ones in large quantities, commonly referred to as bulk operations. It implements a restriction where no more than 5 such operations can be executed within a single second. This translates to a throughput of up to 250 user additions or updates per second.
Parameters:
| Parameter Name | Parameter Description | Example |
|---|---|---|
| $fielddata | Enter the field mapping array. |
[ "customers" => [ [ "email" => "test@gmail.com", "customer_id" => "6769", "firstname" => "John", "lastname" => "doe" ], [ "email" => "test1@gmail.com", "customer_id" => 6710, "firstname" => "Douglas", "lastname" => "Rose" ] ] |
addOrUpdateContact()
- This function updates contacts from a given list. It begins by verifying whether the user already exists in the list. If the user is found, it proceeds to update their information. However, if the user does not exist in the list, the function adds them to the list. This dual functionality ensures that the contact list remains up to date with the latest information for each user, whether they are being updated or added for the first time.
Parameters:
| Parameter Name | Parameter Description | Example |
|---|---|---|
| $fieldData (required) | Enter the field mapping array. |
[ "email" => "spunekar@annexcloud.com", "AC_Available_Points" => "500", "AC_Lifetime_Points" => "500" ]; |
addEvent()
- This function incorporates new contacts into the Blueshift ESP (Email Service Provider). It serves as a bridge for integrating external contact data into the Blueshift platform, allowing for management and utilization of contact information within the ESP ecosystem.
Parameters:
| Parameter Name | Parameter Description | Example |
|---|---|---|
| $fieldData (required) | Enter the field mapping array. |
[ "event"=> "Member_reward_added", "firstname"=> "Suvarna", "lastname"=> "Punekar", "email"=> "spunekar@annexcloud.com", "AC_Available_Points" => "1000", "AC_Current_Tier" => "Bronze", "AC_Points_Expiration"=>"200", "customer_id"=>"54521", "eligible_rewards" => "$10 Off" ] |
addUserToList ()
- This function adds a contact to a specified list within the Blueshift ESP (Email Service Provider). It integrates external contact data into the designated list within the Blueshift platform.
Parameters:
| Parameter Name | Parameter Description | Example |
|---|---|---|
| $fieldData (required) | Enter the field mapping array. |
[ "identifier_key" => "email", "identifier_value" => "ac.test@annexcloud.com", "list_id" => "52586" ];
|
Example usage of class:
$userApiKey = ‘a13ac9975ad32b8b7f3f085e7fd855e7’;
$eventApiKey = ‘a881571de6ec74b4fe7cc1c6a90a201c’;
$apiEndpoint= ‘https://api.getblueshift.com”;
$blueshiftObj= new Blueshift();
$fieldData = [
"event"=> "Member_reward_added",
"firstname"=> "Suvarna",
"lastname"=> "Punekar",
"email"=> "spunekar@annexcloud.com",
"AC_Available_Points" => "1000",
"AC_Current_Tier" => "Bronze",
"AC_Points_Expiration"=>"200",
"customer_id"=>"54521",
"eligible_rewards" => "$10 Off"
];
$blueshiftObj-> addEvent($fieldData);Appendix
- List of Definitions
| Acronym | Abbreviation |
|---|---|
| ESP | Email Service Provider |