Load facets into sessionΒΆ

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.

Facets are loaded into session by the XConnectDataAdapterProvider at the start of a session or when a contact identifies themselves as an existing contact. Configuration controls which facets are loaded into session. The default list of facet keys is defined in App_Config\Sitecore\Marketing.Tracking\Sitecore.Analytics.Tracking.config.

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:

<?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" fallbackProvider="mongo">
                <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.