The session configuration parameters
Version: 10.4
A session object stores the following session configuration parameters:
-
The connection endpoint parameters:
-
Instance URL
-
-
The default Interaction parameters:
-
IUTInteractioninterface instance
-
-
Device Identifier:
-
Device unique ID
-
You can pass the parameters in any order. For example:
RequestResponse
var defaultInteraction = UTEntitiesBuilder.Interaction()
.ChannelId("27b4e611-a73d-4a95-b20a-811d295bdf65")
.Initiator(InteractionInitiator.Contact)
.Contact("jsdemo", "demo")
.Build();
var session = SitecoreUTSessionBuilder.SessionWithHost("https://mysite.com")
.DefaultInteraction(defaultInteraction)
.DeviceIdentifier(UIDevice.CurrentDevice.IdentifierForVendor.ToString())
.BuildSession();
You can also pass the parameters one by one. For example:
RequestResponse
var defaultInteractionBuilder = UTEntitiesBuilder.Interaction();
// ... other code...
defaultInteractionBuilder.ChannelId("27b4e611-a73d-4a95-b20a-811d295bdf65");
// ... other code...
defaultInteractionBuilder.Initiator(InteractionInitiator.Contact);
// ... other code...
defaultInteractionBuilder.Contact("jsdemo", "demo");
// ... other code...
var defaultInteraction = defaultInteractionBuilder.Build();
var session = SitecoreUTSessionBuilder.SessionWithHost("https://mysite.com")
.DefaultInteraction(defaultInteraction)
.DeviceIdentifier(UIDevice.CurrentDevice.IdentifierForVendor.ToString())
.BuildSession();