Since Sitecore 8, EXM uses List Manager to manage the recipient lists. The List Manager provides two kinds of lists, i.e. contact list and segmented List. A contact list contains a static numbers of contacts. A segmented list is a dynamic list, the number of the contacts changes due to the source of the contacts and the segment condition.
In EXM, we can choose either a contact list or a segmented list for the opt-in and opt-out recipient lists. Most clients choose the contact list since it looks straightforward. The normal workflow is that when a user signs up a newsletter, the contact representing the user will be added to a contact list. If you search for how to add a contact to a contact list, you will find several posts talking about it. Either you call some List manager APIs or you just add the contact list tag into the contact in MongoDB directly. However, my experience is that no matter which way you choose, you will end up list lock or inconsistent number of the contacts in the list. This is due to the lock mechanism in List manager. You don’t have the control and you shouldn’t try to customize it. Hopefully Sitecore will improve it in the future.
So what about segmented list? In my most recent project, I suggested the client to use segmented list and I think it works really well.
The segmented list uses segment condition to filter the contacts. It reads the contact information from analytics index and it doesn’t touch the MongoDB, which means you will not have the lock issue.
The way to achieve it is:
When a user signs up, create or find the contact for that user in the MongoDB, update the flag. Once the contact is flushed into MongoDB, the analytics index will be updated, you will be able to see the contact in the segmented list.
In the next post, I will demo this workflow.