Expand options overview
Expand options allow you to control the amount of related data that is returned with each contact or interaction. For example, contacts are only returned with related facets and interactions if these are requested. You can use expand options when getting or search experience data, and when using the data extraction feature. Refer to the following pages for more information about how to use expand options:
-
Get contact and load related facets and related interactions
-
Get interaction and load related facets and related contact
-
Search contacts and load related facets and interactions
-
Search interactions and load related facets and contact
-
Define which facets should be retrieved by an interaction aggregation processor
All expand options inherit Sitecore.XConnect.Model.ExpandOptions
, and can both be passed into .GetAsync<TEntity>
. If you use an expand options type that is not supported by the entity (for example, using ContactExpandOptions
instead of InteractionExpandOptions
when retrieving an interaction), you will get an ArgumentOutOfRange
.
When an interaction is returned, you can inspect the ExpandOptions
property on that interaction to see what expand options was used when it was retrieved. This will help you determine if a facet is null because it was not set, or because it was not requested.