Introduction
Cordial is the behavioral data management, analytics, and messaging automation platform helping companies build, deliver, and optimize email and mobile campaigns using machine learning.
Cordial Dashboard
- To view the Cordial dashboard for the specific account, first visit the following URL:https://admin.cordial.io/#login/
- The following image shows the login window for Cordial admin.
- Enter the provided login credentials and click Log me in.
- It will redirect to the dashboard page of that account as shown in the following image.
View all (current) lists
To view the current lists for the specific account, you need to click on the Data tab and select the Lists option i.e., Data → Lists, as shown in the following image.

- After that, it will redirect to the Lists page, which shows all the current lists associated with that specific account as shown in the following image.
- To create a new list, you need to click on New, as shown in the following image.
- It will open the Create List window, as shown in the following image.
- In the List name field, enter the name for the specific list, select the checkbox to enable automatic tracking of user add date, then click Save, which will create a new list.
Create Contact Attributes for List
- To add data to the specific list, you will need to create the required attributes for the list.
- To create an attribute, navigate to Data → Contact Attributes, as shown in the following image.
- After selecting the Contact Attributes option, a list of available attributes will be displayed, as shown in the following image.
- To initiate the creation of a new attribute, select the New option, as shown in the following image.
- Following this action, it will open the following window.
In Create a Contact Attribute, you must complete the following fields:
o Attribute Name: Enter a specific name for the attribute you are in the process of creating.
o Attribute Key: Enter the specific attribute key, which will be utilized in data imports and API calls.
o Attribute Type: You are required to specify the field type. For example, string, number, date, location, array, etc.
- Click Save. This action will create the new attribute and it will be displayed in the attribute list.
- To modify an already created attribute, click on the Edit option located next to the specific attribute, as shown in the following image.
- After selecting the Edit option, the Edit attribute popup window will be displayed, as shown in the following image.
- Here, you can modify the details about the specific attribute.
View Contacts from a Specific List
- You can access the contact details listed in a specific list by first navigating to the Contacts → Search Contacts, as shown in the following image.
- After clicking on Search Contacts, it will redirect you to the window displayed below.
- To view the contacts from a specific list, select the Add Rule option to introduce a new search rule.
- After clicking on Add Rule, it will display the Choose a Rule popup, as shown in the following image.
- Select Lists from the listed rules, as shown in the above image (as we need to see the contacts from the specific list).
- After that, it will display the section to configure the rule for specific contact search, as shown in the following image.
- In this section, choose the specific list (in select segment field) containing the contacts you wish to access.
- After selecting the specific list, it will display the number of contacts (from the specific list), as shown in the following image.
- Now, proceed to click on Actions → View/Edit Individual Subscriber Result link, as shown in the following image.
- Upon clicking, it will display the list of all contacts from the specific list, as shown in the following image.
- To access the details of a specific contact, click on the email address of the specific member, as shown in the above image.
- After clicking on the specific member, it will display the member details, as shown in the following image.
This section displays the following details:
- Profile Attributes and Attribute values
- List associated with the specific contact
View Contacts from All Lists
- To view the contacts from all lists, navigate to Contacts → Search Contacts, as shown in the following image.
- After clicking Search Contacts, it will redirect to the following page.
- Select the Include All Contacts checkbox as shown in the above image.
- After clicking on Include All Contacts, it will display the number of contacts (from the specific list), as shown in the following image.
- Click on Actions → View/Edit Individual Subscriber Result link, as shown in the following image.
- After clicking on View/Edit Individual Subscriber Result option, it will display the list of all contacts from the specific list, as shown in the following image.
- To view the details of a specific contact, click on the email address associated with that member, as shown in the above image.
- After clicking the email address, it will display the member details, as shown in the following image.
This section displays the following details:
- Profile Attributes & attribute values
- List associated with the specific contact
Push Required Data into Specific Cordial list
- To facilitate loyalty, you can integrate the following data points into a specific list:
- Available Points
- Lifetime Points
- Used Points
- First Activity Date
- Codes claimed
- Highest Reward Available
- Expiring Points
- Points expiration date
- Activity history of user
- Tier info (if applicable)o Segmentation info (if applicable)
- To incorporate loyalty data points into a specific list, you must integrate the Cordial REST API into Annex Cloud code.
Sample Code:
$url2='http://api.cordial.io/v1/contacts';
$data_cc = array ("channels" =>array( "email" => array( "address" =>"xyz@test.com","subscribeStatus" => "subscribed" )),"loyalty_points"=>"100","available_points"=>"80","used_points"=>"20", "PASS_LIST_NAME"=>"1");
$data_string_cc = json_encode($data_cc);
$ch11 = curl_init($url2);
curl_setopt($ch11,CURLOPT_HEADER,false);
curl_setopt($ch11,CURLOPT_HTTPHEADER,array('Authorization:Basic xxxxxxxxxxxxx==','Content-Type: application/json'));
curl_setopt($ch11, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch11, CURLOPT_POSTFIELDS, $data_string_cc);
curl_setopt($ch11, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch11, CURLOPT_SSL_VERIFYPEER, False);
$result2_cordial = curl_exec($ch11);
curl_close($ch11);
//print_r($result_cordial);
print_r($result2_cordial);- To push the point data into the specific list, we require the following data.
- Access token
- List Name
- Fields Name
Note: In addition to standard data points, we can also send any custom information based on the business requirements.
Send Triggered Emails
- You have the option to utilize Cordial for sending the triggered emails as detailed below.
- Welcome Email: This email will be automatically generated whenever a member enrolls in the loyalty program.
- Reward Earned: This email will be automatically generated whenever a member earns a loyalty reward.
- Reward Redeemed: This email will be automatically generated each time a member redeems an earned reward.
- Monthly Statement: This email, sent on a monthly basis, will be distributed to all loyalty members. It provides a comprehensive overview of the loyalty points accumulated and rewards redeemed in the past month.
-
Here are essential steps for setting up the triggered email:
- Create an email automation within Cordial.
- Get the message ID, which you will use in the specific API or automated jobs to send the specified email.
- Initiate a call to the specific API or configure an automated job to send the specified triggered email.
Create Email Automation
- To initiate the sending of a triggered email, the first step is to create a specific email template.
- To create an email template, navigate to Message Automation → Email Automations section, as indicated in the following image.
- After clicking on Email Automations, it will open the email automation section, as shown in the following image.
- Select New, as shown in the above image.
- After selecting New, a pop-up will appear. In this pop-up you will be required to complete the following fields to create a new email template.
- Message Name: Provide a specific name for the email message.
- Message Key: The message key can be generated automatically, or you have the option to manually enter a specific key for the email message.
- Tag This Message: A tag will be assigned to the message, which can be used to easily search that specific message in the system.
-
Classification: Give the message a classification to comply with SPAM laws.
- Promotional: For subscribers who have granted permission to receive promotional messages. Note that such messages will only be sent to contacts who are both valid and have a subscription status of subscribed.
-
Transactional: Messages are distributed to subscribers based on order specific criteria. Transactional messages can be sent to any valid recipient, regardless of their subscription status.
- After inputting the necessary information, choose the email classification and proceed with a click on Continue. This action will generate a fresh email message and subsequently lead to the next window.
- To configure the Subject, From Email, Reply Email, and From Description, select the Edit link for the message header.
- After clicking on Edit, it will open the Edit header section, as shown in the following image.
- You will complete the following parameters:
- Subject: Enter the specific subject for the email message.
- From Email: Enter the specific email address from which the member will receive the triggered email.
- Reply Email: Enter the specific email address that members can use to reply to the triggered email.
- From Description: Enter the specific email description that will be visible to the member in the received email.
- After setting the parameters mentioned above, select Save to update the message header.
- Following the update of the message header, the next step involves incorporating the HTML code for the designated email template. To do so, click on the Edit link for message content, as shown in the image below.
- After selecting Edit, it will initiate the opening of the message content editing page, as show in the following image.
- In this section, you will be required to paste the HTML code for the specific email template.
- Once you have added the HTML code, click on Preview to view the specific email template as shown in the following image.
- After selecting this option, it will present a Preview of the specific email template, as shown in the following image.
- If the entered HTML code is deemed satisfactory, select Save & Close to save the modifications. This action will generate a new email message template and subsequently lead to the following page.
- After the creation of a specific email template, proceed by selecting Publish to make the email template available as shown in the following image.
- Once you have successfully published the template, the next step involves enabling the API sending method to send. To achieve this, click on the Sending Methods → API settings option, as shown in the following image.
- This will redirect to the following page.
- Select the Enable option to activate the API method for sending the specific email.
Send the created email message
- When the specific email condition is met, the Annex Cloud code will use Cordial APIs. First, it will add the specific member to the Cordial list. After that, it will send the specific email to that member.
- Below is the sample Annex Cloud code, which includes various Cordial SOAP APIs.
Sample code:
$url3='http://api.cordial.io/v1/automationtemplates/PASS_EMAIL_TEMPLATE_NAME/send';
$data_cc3 = array ('to' =>array ('contact' =>array ('email' => 'xyz@test.com'),'extVars' =>
array ("loyalty_points"=>"200","available_points"=>"80","used_points"=>"120","first_name"=>"abc")));
$data_string_cc3 = json_encode($data_cc3);
$ch13 = curl_init($url3);
curl_setopt($ch13,CURLOPT_HEADER,false);
curl_setopt($ch13,CURLOPT_HTTPHEADER,array('Authorization:Basic XXXXXXXXXXXXXXXXX==','Content-Type: application/json'));
curl_setopt($ch13, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch13, CURLOPT_POSTFIELDS, $data_string_cc3);
curl_setopt($ch13, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch13, CURLOPT_SSL_VERIFYPEER, False);
$result3_cordial = curl_exec($ch13);
print_r($result3_cordial);
curl_close($ch13);- To send this triggered email, it’s necessary to provide the following parameters:
- Access token
- List Name
- Field Name
- Email Template Name