Overview
Lists allow you to segment contacts in ways relevant to your business. List names may relate to subscriptions such as Newsletter or Weekly Specials, or types of membership like VIP or Western Region. Lists can be used to personalize message content, build an audience, trigger messages, and create analytics reports.
When creating lists, keep in mind that:
- A contact can be associated with one or more lists.
- There is no limit to how many lists can be created.
- List names must be unique from other list names, as well as contact attribute names.
How Cordial Stores Lists
A contact's list association is stored in the contact's record within the Contacts Collection. Below is a simplified example of how list association is stored in Cordial's database as part of a contact record. To help with visualization, we highlighted the portion pertaining to lists.
[ { "channels": { "email": { "address": "fredgarvin@example.com", "subscribeStatus": "subscribed", } }, "firstName": "Fred", "lastName": "Garvin", "gender": "male", "lists": [ "newsletter", "weekly_specials" ], "listJoinDate": { "newsletter": "2017-03-13T17:50:46+0000", "weekly_specials": "2017-03-13T17:50:46+0000" }, "_id": "58c6dae96e05abd5fef72184" } ]
Create a List
You can create lists in Cordial three different ways:
Create a list via the UI
1. Log into the Cordial platform and navigate to Data > Lists.
2. Select the New button to create a list.
3. Complete the fields for List name and Date Tracking.

Create a List via a CSV Upload
Lists can also be created when importing contact records.
1. Prepare a CSV file where the header row contains the names of the lists you would like to add to the system, and place a 1 or a 0 in the row for each contact. This will tell the system whether a contact is on a list (1=true), or not on a list (0=false).

2. Log into the Cordial platform and navigate to Contacts > Import Contacts.

3. Select the appropriate fields to import the file.
- Import Source: Select whether the source is a local file or hosted remotely.
- Header Row: Select if your data file has a header row. We recommend using a header row to make it easier to match the columns with their corresponding attributes when importing.
- Choose Delimiter

4. Select and upload your CSV file.
5. You'll then have the option to Add List for each header row column you have created.

Create a List via the API
You can create a list via the API using the POST /accountlists API call.
You can update a contact's list membership via the API using the POST /contacts and POST /contactimports API calls.
View and Edit a List
Navigate to Data > Lists to view all lists created in your account.
Hover over the arrow next to each list name to see the options:
- Remove: Removes the list from the system.
- Edit: Updates the name and date tracking option of the list.
- Clear: Removes all contact list associations while keeping the list in the system (changes the contact's boolean value for that list from a 1 to a 0).
Use Lists for Message Content
While you can render list names in a message, you'll most likely use list membership as a way to display dynamic content.
You would use the following Smarty code to display the above example.
{if in_array('gold', $contact.lists)} Gold Content {if in_array('silver', $contact.lists)} Silver Content {/if}
{$utils->jsonPrettyPrint($contact)}By pasting the above code into the HTML editor and clicking the Preview button, you can view the specified contact's record with all attributes, list association, and cart items (if available).
Visit this article to learn more about using "if" statements in Smarty.
Use Lists for Building Audiences
Using the List audience rule, you can build audiences based on list membership. Create complex segmentation queries by combining list audience rules with other rules to create queries such as: "Show me all male contacts on the Gold list that have more than $40 in their cart."

You can learn more about Cordial's Audience Builder here.
Use Lists for Triggering Messages
You can trigger automated messages based on when a contact is added to a list. This is useful for welcome message campaigns.
To trigger an automated message based on list membership, use the Event Triggered sending method, and choose the Trigger event: "When a contact is added to a list".

You can learn more about automated messages here.
Build Analytics Reports Using Lists
Audiences based on list membership can be saved as audience rules and either visualized over time with audience trend reports, or used as filters for event data dashboards and event data reports.
Audience Trend Reports
Using audience trend reports, you can view the population of an audience over time, based on their list membership.

Filter Event Dashboards
Event dashboards provide a way to visualize event activity over time by creating customizable charts. You can take advantage of list membership in event dashboard charts using audience filters.

Filter Event Data Reports
Event data reports allow you to view reports of event activity. You can filter reports using audience rules similar to event dashboards.

In the next article, you can learn about cart items.
Comments
0 comments
Please sign in to leave a comment.