---
title: "セッション構成パラメータ"
slug: "the-session-configuration-parameters"
abstract: "セッション構成パラメータの概要と例を示します。"
---
# セッション構成パラメータ

セッションオブジェクトは以下のセッション設定パラメータを保存します:

-   [接続エンドポイントのパラメータ](https://doc.sitecore.com/xp/ja/developers/100/sitecore-experience-platform/the-connection-endpoint-parameters.html "The connection endpoint parameters"):
    -   インスタンスURL
-   [デフォルトのインタラクションパラメータ](https://doc.sitecore.com/xp/ja/developers/100/sitecore-experience-platform/the-defaultinteraction-parameter.html "The defaultInteraction parameter"):
    -   IUTInteraction インターフェースインスタンス
-   デバイス識別子:
    -   デバイス固有のID

パラメータは任意の順序で渡すことができます。例えば:

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

パラメータを一つずつ渡すことも可能です。例えば:

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