The session configuration parameters

Current version: 9.1

A session object stores the following session configuration parameters:

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();

Do you have some feedback for us?

If you have suggestions for improving this article,