---
title: "Contacts"
slug: "contacts"
abstract: ""
---
# Contacts

A contact represents an individual who interacts with or may potentially interact with your organization. Contacts are represented by the `Sitecore.XConnect.Contact` class, and are uniquely identified by ID (of type `Guid`) within the xDB. IDs are generated by the service layer when a contact is saved and should not be saved outside the xDB. Contacts also have one or more [identifiers](https://doc.sitecore.com/xp/en/developers/93/sitecore-experience-platform/contact-identifiers.html "Contact identifiers") that identifies the contact to systems outside the xDB.

> [!note]
> Allowing the service layer to generate time-based, sequential GUIDs which are physically closer together on disk improves the performance of inserts and relevancy queries in SQL context. The manner in which SQL allocates data pages means that randomly generated IDs creates a lot of un-used space, which has a detrimental effect on performance.

## Known and anonymous contacts

A contact is either known or anonymous. Known contacts have at least one known identifier. Anonymous contacts only have anonymous identifiers, which always includes the alias identifier.

## Extending the contact model

Use facets to extend the contact model with custom, organization-specific data. Several common facets are built in by default. Refer to the following topics for information about creating and using facets:

- [Creating custom facets](https://doc.sitecore.com/xp/en/developers/93/sitecore-experience-platform/facets.html "Facets")
- [Creating a custom model](https://doc.sitecore.com/xp/en/developers/93/sitecore-experience-platform/the-xconnect-model.html "The xConnect model")
- [Getting contact facets](https://doc.sitecore.com/xp/en/developers/93/sitecore-experience-platform/get-contact-with-facets.html "Get contact with facets")
- [Setting contact facets](https://doc.sitecore.com/xp/en/developers/93/sitecore-experience-platform/set-contact-facets.html "Set contact facets")
- [Loading facets into the tracker](https://doc.sitecore.com/xp/en/developers/93/sitecore-experience-platform/load-facets-into-session.html "Load facets into session")
- [Updating facets in the tracker](https://doc.sitecore.com/xp/en/developers/93/sitecore-experience-platform/set-contact-facets-in-session.html "Set contact facets in session")

> [!note]
> The [Contact Behavior Profile](https://doc.sitecore.com/xp/en/developers/93/sitecore-experience-platform/contact-behavior-profile.html "Contact Behavior Profile") and [Key Behavior Cache](https://doc.sitecore.com/xp/en/developers/93/sitecore-experience-platform/key-behavior-cache.html "Key behavior cache") are available as calculated facets.

## Tracking contacts

The web tracker is responsible for recording a contact’s activity during a web session, such as page views and goals triggered. On session end, this data is converted into an xConnect interaction and submitted to xConnect using the xConnect Client API. xConnect and the tracker are separate components with separate data models. For example, the tracker represents contacts using the `Sitecore.Analytics.Tracking.Contact` class. For more information about web tracking, refer to the following topics:

- [Tracking contacts](https://doc.sitecore.com/xp/en/developers/93/sitecore-experience-platform/tracking-contacts.html "Tracking contacts")
- [Identifying a contact in session](https://doc.sitecore.com/xp/en/developers/93/sitecore-experience-platform/identifying-contacts.html "Identifying contacts")

## Merging contacts

When two contacts are merged, the facets and identifiers of a source contact are moved to a target contact. When the merge is complete, the source contact is marked obsolete. A common use for contact merge is when an anonymous contact identifies as an existing known contact. Refer to the following topics for more information about merging contacts:

- [Merging contacts using the xConnect Client API](https://doc.sitecore.com/xp/en/developers/93/sitecore-experience-platform/create-a-facet-merge-handler.html "Create a facet merge handler")
- [Merging contacts in the tracker](https://doc.sitecore.com/xp/en/developers/93/sitecore-experience-platform/contact-merge.html "Contact merge")

## Anonymizing contacts

The [right to be forgotten](https://doc.sitecore.com/xp/en/developers/93/sitecore-experience-platform/execute-right-to-be-forgotten.html "Execute right to be forgotten") is a contact’s right to have all personally identifiable data removed from the xDB.

## Contacts and users

A contact and a Sitecore user are two entirely separate entities. A contact exists as a record in the xDB, whereas a Sitecore user is an ASP.NET Membership or Identity user. The xDB should not be used as an authorization system, and was not designed to store passwords or manage user sessions.

There is no automatic relationship between a user and a contact. You must explicitly create that relationship by adding an identifier to the contact that references a unique property of the user, such as the username. In the context of the tracker, you must [identify the contact](https://doc.sitecore.com/xp/en/developers/93/sitecore-experience-platform/identifying-contacts.html "Identifying contacts") at the point of login in order for subsequent activity to be tracked against that contact.

## Contact sharding

Contacts are sharded by ID. Contact identifiers are unique across all shards.