Load facets into session

Current version: 9.2

Facets are loaded into session by the XConnectDataAdapterProvider at the start of a session or when a contact identifies themselves as an existing contact.

Important

Facets that are loaded into session can be edited but are not saved to xConnect on session end. You must use the xConnect Client API to update facets.

Configuration controls which facets are loaded into session. The default list of facet keys is defined in the App_Config\Sitecore\Marketing.Tracking\Sitecore.Analytics.Tracking.config file.

Important

Do not remove any of the pre-configured facet keys. Other components rely on these facets being loaded into session.

The following example demonstrates how to patch in an additional facet key:

RequestResponse
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
    <dataAdapterManager defaultProvider="xconnect">
        <providers>
            <add name="xconnect" type="Sitecore.Analytics.XConnect.DataAccess.XConnectDataAdapterProvider, Sitecore.Analytics.XConnect">
                <facets hint="raw:AddFacet">
                    <facet facetKey="Addresses"/> <!-- NOTE: Taken from AddressList.DefaultFacetKey -->
                </facets>
            </add>
        </providers>
    </dataAdapterManager>
</sitecore>
</configuration>
Tip

All built-in facets define a DefaultFacetKey - inspect this property to get the default key for a particular facet. For example, the AddressList facet key is Addresses.

Do you have some feedback for us?

If you have suggestions for improving this article,