Programmatically unlock contact list.

Hi All,


How can i programmatically "unlock" a contact list?

Please let me know if any one face issue and it's fix.



Muthukrishnan G


  • I don't think you can do this successfully. There is an unlock method in the Contact List Manager, but it is hard to understand the purpose of most methods (this also depends of your version of Sitecore).

    Th best thing is to avoid the list to getting locked. This may be happening because of a bad handling of the contact. Whenever you unlock the list, anything could happen to both, the list and the contact (I even lost contacts by unlocking a list manually).

    Let me know more about what you are trying to do.
  • Lets start with understanding why the List Manager has a concept of the lock?

    List is formed from Analytics contacts that are assosiated with it.

    In order to add contact into the list we must modify contact information, thereby we must:
    1. Load it from xDB
    2. Update info
    3. Push modified version into the xDB

    How can we verify that all contacts were successfully added into the list, and nobody is lost ?!

    The default implementation relies on Analytics Contact Aggregation mechanism - aggregation takes place whenever contact is flushed to xDB.
    Analytics index is updated during aggregation.

    Thereby we track how many contacts we attempted to add into the list, and compare the count of contacts that are known to be successfully aggregated - present in analytics index.

    Once numbers match list will be unlocked automatically.

    In other words - list is locked as long as we do not have proves all contacts have been added into the list successfully.

    Since List Manager is mostly used by ExM, sending emails to 'locked' list could result in not all addresses will recieve emails :(

    Why this can happen:

    A) Unexpected application restarts - analytics index changes are flushed every minute, so some changes might never get into the index =\
    B) More than one server that performs aggregation & Lucene used => each server will have own index copy, thus nobody will have the full index. That is why Lucene not supported in multisetup environment
    C) Restarting process in the middle of contact updates - all 'in-memory' jobs would be lost breaking the statistics

    After long discussions it was agreed to provide the possibilitiy to remove contact locking mechanism: Notes

    There is also a set of hotfixes for older version that allow to disable contact locking:

    To your initial question:

    Do not do that, as manually unlocking list is in 99% is a bad idea.
    Use latest version instead.