---
title: "Contact Behavior Profile"
slug: "contact-behavior-profile"
abstract: "Overview of the Contact Behavior Profile (CBP) calculated facet and calculation using the most recent profile scores."
---
# Contact Behavior Profile

The Contact Behavior Profile (CBP) calculated facet stores the matched profiles and patterns for a contact. The facet is represented by the `Sitecore.XConnect.Collection.Model.ContactBehaviorProfile` class.

<details>
<summary><h2>Calculation logic</h2></summary>

The following table describes the calculation logic applied to each property when a new interaction is saved to xConnect:

| Property | Type | Description |
| --- | --- | --- |
| `SourceInteractionStartDateTime` | `DateTime` | The `StartDateTime` of the interaction that the profile scores came from. |
| `Scores` | `Dictionary<Guid,Sitecore.XConnect.Collection.Model.ProfileScore>` | The contact’s most recently matched profiles. The **key** is the `Guid` of the profile definition item. copied from the `Scores` property of the incoming interaction’s `Sitecore.XConnect.Collection.Model.ProfileScores` facet. |

The `Scores` property in the Contact Behavior Profile is replaced each time an interaction with a `ProfileScores` facet is submitted. The dictionaries are not merged. This ensures that the behavior profile does not go stale. For example, if a contact matches the ‘Christmas Shopping’ or ‘Getting Married’ profiles, these profiles are only stored until the contact starts to exhibit different behavior.

Each `ProfileScores` entry has the following properties:

| Property | Description |
| --- | --- |
| `MatchedPatternId` | The definition ID of the pattern in the Marketing Control Panel. Set by external component, such as tracking. |
| `ProfileDefinitionId` | The definition ID of the profile in the Marketing Control Panel. |
| `Score` | The total score of all values for this profile. |
| `ScoreCount` | The number of times the profile was scored during a session. |
| `Values` | The scored values for the profile keys. The key represents the profile key ID, and the value represents the score. |

</details>

<details>
<summary><h2>Extend the Contact Behavior Profile</h2></summary>

You cannot extend the Contact Behavior Profile. You must [create your own calculated facet](https://doc.sitecore.com/xp/en/developers/93/sitecore-experience-platform/facets.html "Facets").

</details>