In this topic:
A facet is piece of information that enriches a contact or an interaction. For contacts, this might include their name and address. For interactions, this might include the location of the interaction. Each facet is made up of:
- A facet model, which is a class that inherits
- A facet definition, which associates a facet model with a key and assigns it to an entity (either contacts or interactions). Facets are defined in code, in a collection model.
A facet model can be re-used with a different key, or defined with the same key for contacts and then interactions.
Facet keys are case sensitive.
Contact facets should describe the qualities of a contact, not their behavior. For example:
- Frequent flyer status
- Supermarket loyalty card number
Interaction facets should describe the entire interaction, not events that occur within an interaction such as a purchase. For example, if a contact visits a particular shoe store, interaction facets might include:
- Means of transportation to store
- Active store offers at time of visit
- Weather during visit
- ID of manager on duty during visit
There are two categories of facets - value facets and calculated facets. The only difference between the two categories of facets is that calculated facets are associated with a handler in the xConnect service layer.
Value facets can be applied to contacts or interactions, and can be set by any client using the xConnect Client API. Most contact facts and all interaction facets fall into this category.
Calculated facets are exclusive to contacts. A calculated facet represents data that is inferred from a contact’s interaction history - for example, a contact’s average engagement value per visit. Calculated facets are updated by the xConnect service layer each time an interaction with relevant data is submitted, and can be retrieved using the xConnect Client API in the same way as value facets.
The key behavior cache and contact behavior profile are examples of built-in calculated facets.
Facets or individual facet properties can be decorated with the following attributes.
Facets or facet properties decorated with this attribute are not indexed and are therefore not searchable. Use this for data that you are not interested in searching - such as binary data.
Contact facets or contact facet properties decorated with this attribute are not indexed (and is therefore not searchable). Data marked with this attribute should not be written to disk, sent to an external system, or exposed in any way.
Your model will not pass validation if you try to decorate an interaction facet with the
[PIISensitiveAttribute] attribute. You should not be saving PII sensitive information into an interaction facet.
Please submit documentation feedback to email@example.com.