There are 4 sets of Contact APIs in Sitecore xDB:

  • ContactRepository
  • ContactManager
  • SharedSessionStateManager
  • Tracker.Current.Contact

Each of them, apart from the ContactManager, has a clear purpose of working with a specific Contact storage. The ContactManager actually works with both the shared session and the Collection database via the underlying APIs, as you can see on the following diagram:

Image for post
Image for post

It’s relatively easy to update contact data via each of these API, provided that you know which one to use.

But what if you just want to update the contact, no matter where it’s currently located? Here’s a method I recently created that will help you:

And here’s how you can use it:


Dmytro Shevchenko

Sitecore MVP / Solution Architect

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store