Lists

Sometimes when you send messages to customers, you want to include “a set of information” such as a list with insurance policies, upcoming payments, or items they`ve left in the shopping cart. So, what do you do then? An automatic campaign using customer attributes called Lists would be the best way forward.

The lists, available to Moments users, are stored per customer. Depending on the communication you want to create, you can send separate messages to the same customer about each of the stored items, mention all the objects from the stored list or just the first few.

If, for example, one person has more than one loan and you need to notify them about the approaching payment date for just one of the loans, this is where the Lists will come in handy. Keep in mind that a Person Profile represents one real person and all the data related to this person is stored within the same profile – different loans, information about different lines in the family cell phone plan where this person is a primary subscriber, etc.

Other applicable use cases: 

•    Store cart items so you can later send an email that includes these items
•    Remind customers about several expiring banking products
•    Renewal of each family insurance policy that is stored in one profile
•    Manage several loyalty cards per one person

What Are Lists

These custom attributes represent a list of objects with the type that you define. The image below should give you an idea about how this works in practice: the list name is Cart and each object consists of 4 fields: ProductName, Picture, Price, URL.

list attribute showing items in the cart
 

Lists are created on our web interface, and the values are set using API, WEB SDK, Mobile SDK. When composing messages that will be sent via Broadcast or Flow, you can use Lists to remind customers about items left in the cart, upcoming payment dates, or something else.

Create New List

After signing in to our web interface, navigate to the People module > Configuration > Create Custom Attribute. Decide on the name for your list and select the type: List of objects.

The next step would be to enter all the information you want to have for each of the items on the list. In the abandoned cart scenario, the list consists of items left in the cart, and the information you might want to include is the following:

  • Product Name
  • Product Price
  • Product Image
  • Product Category
     

creating list type user attribute
 

Manage Lists

Once you have selected the objects for your list, you need to configure it so that your system and the Infobip platform can exchange information (set up data stream to fill the lists with values).

Use the following methods:

  • People API

 - Create people profiles and set the list values while creating profiles: Create a New Person, Batch People Create.

 - Set the whole new list: Partial Person Update, Batch people update. This method lets you clear the list or rewrite all the values in it.

 - To add an item to the list, use the Append List method. It will just add one more item to an existing list.

  • JS SDK

 - Go to the Web SDK Library on our web interface for information on how to update information in the person profile. With the Infobip Web SDK, you can set the List value straight from your website. The Update Person method will let you set the list or erase it. 

 See an example below on how to update a customer field of the type List called “ShopperCart.”

pe.updatePerson({
	"customAttributes": {
		"Shopper Cart": [
			{"productName": 'Sneakers' ,
			 "productPrice": 25.33 ,
			 "productImage": "url here" ,
			 "productCategory": "Sport Sneakers"
                       },
            {"productName": 'T-Shirt' ,
			 "productPrice": 9.99 ,
			 "productImage": "url2 here" ,
			 "productCategory": "Casual"
                       }
	       ]
	}
})


 

  • Mobile SDK

Configure Mobile SDK to work with lists of objects when the scenario is slightly more complex than what users can quickly manage to do on our web interface. Learn more about how to set this up:

iOS

Android

Send Lists in Messages

Lists can be included in messages sent via Broadcast (email, SMS, Push, WhatsApp) or Flow (all channels). To show how this works, we will use an abandoned cart scenario where you want to remind a customer about the items awaiting them.

NOTE

Keep in mind that the prerequisite for sending a list inside a message is to have the cart information stored in Person Profiles and to have the communication channel enabled.

Lists in SMS

These instructions will help you create several scenarios where lists are a part of your messages. Steps 1-6 are the same for each scenario. But to get to that, remember to first set up the List of objects on our web interface and implement the Web SDK integration.

Scenario 1: Show the first two items from the cart and one field describing the items

1. Navigate to Moments > Create Broadcast, and select to send an SMS message.

2. Click the curly brackets icon, and from the drop-down menu select the list you created for this campaign – in this case, Cart B.

3. Next, type in the number of items you want to appear in the message. For this scenario, 2 items. 

4. Select the field(s) from the list you want to include. For example, the Product Name.

5. Add characters and/or whitespace to separate the fields on the list. Otherwise, they will be joined together.

6. Click Analyze. A preview of the message will be displayed. If you like what you see, Launch the message, or go back to the editor to make changes.


Summary:

Content Window 
Cart items in the message: 2 
Cart field to be displayed inside the message: Product Name 

Preview Screen
Name of item 1: 6 ingredients for an addictive app
Name of item 2: Mobile Authentication; The Future of Mobile Security and User Engagement 
 

sending cart items as list attributes


 


Scenario 2: Show only the first item with several fields describing it

This example is about what the final result will be when you select the first item from the list, including fields describing the item such as Product Name, Price, and URL.


Content Window
Cart items in the message: 1 
Cart fields to be displayed inside the message: Product Name, Product Price, URL 

Preview Screen
Item name: 6 ingredients for an addictive app
Item Price: $15
Item URL: shopnread.com/product/6-ingredients-for-an-addictive-app 
 

showing cart items in sms messages


 



Scenario 3: The cart has fewer items than the number set in the editor

Now we would want 20 items to be listed in the SMS message, so we type in the number in the editor. If the customer has a fewer number of items, they will see only those items together with the fields we selected – Product Name, Price, URL, Picture URL.


Content Window
Cart items in the message: 20
Cart fields to be displayed inside the message: Product Name, Product Price, URL, Picture URL

Preview Screen 
Item name (displaying fewer than expected 20): 6 ingredients for an addictive app, Mobile Authentication; The Future of Mobile Security and User Engagement 
Item Price: $15, $15
Item URL: shopnread.com/product/6-ingredients-for-an-addictive-app
Picture URL: https://shopnread.com/wp-content/uploads/2019/07/screenshot-2019-07-01-at-18.03.50.png...
 

sending products list in sms message
 

Lists in Email

In an email message, items from the cart are shown in the table view, so the HTML markup is needed to incorporate lists into the message.

But first, here are a couple of things important to remember when using lists with email:

•    You can incorporate a few items from the list from 1-100.

•    Table won’t be rendered at the end if the list is empty.
 

Scenario 1: Show 3 items in the email message, including their price

In the Email HTML editor, use this code to create the message. 
 

<table>
{{#each [dataCart] limit=3}}
<tr>
     <td>{{[ProductName]}}</td>
     <td>{{[Price]}}</td>
</tr>
{{/each}}
</table>

The final message will look similar to the one below.

items in the cart

 

Scenario 2: Place objects from the list into the image source and URL source

The steps are the same as in the previous scenario - inside the Email HTML editor use the following code: 

<table>
<tr>
      <td>ProductName</td>
      <td>Price</td>
      <td>Picture</td>
</tr>
{{#each [dataCart] limit=3}}
<tr>
      <td>{{[ProductName]}}</td>
      <td><a href="{{[URL]}}">{{[Price]}}</a></td>
      <td><img src="{{[PictureURL]}}"></td>
</tr>
{{/each}}

The email will include the table with images and URLs.

email with items left in the cart