---
title: "The defaultInteraction parameter"
slug: "the-defaultinteraction-parameter"
abstract: "Overview of the defaultInteraction parameter that enables you to construct a session that will automatically create an interaction on a TrackEvent request if needed."
---
# The defaultInteraction parameter

The `defaultInteraction` parameter enables you to construct a session that will automatically create interaction on a `TrackEvent` request if needed. The Interaction ID will be automatically saved and used for future event requests.

For example, to create a `defaultInteraction` object and pass it to a session:

```csharp
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)
                                      .BuildSession();
```

You can reset the current Interaction ID by sending the new interaction request manually. For example:

```csharp
var interactionRequest = UTRequestBuilder.Interaction(UTEvent.GetEmptyEvent())
                                         .ChannelId("27b4e611-a73d-4a95-b20a-811d295bdf65")
                                         .Initiator(InteractionInitiator.Contact)
                                         .Contact("jsdemo", "demo")
                                         .Build();

var interactionResponse = await session.TrackInteractionAsync(interactionRequest);
```
> [!note]
> You can start the Interaction manually by [constructing and sending an `Interaction` request](https://doc.sitecore.com/xp/en/developers/104/sitecore-experience-platform/configuring-the-interaction-requests.html "Configuring the interaction requests").

| Property | Details |
| --- | --- |
| Session builder API | `DefaultInteraction(IUTInteraction)` |
| Sample value | `IUTInteraction` object |
| Parameter position | Any position after the `Instance URL` |
| Required\optional | Optional |
| Multiple invocations | Multiple invocations cause *InvalidOperationException* |
| Value validation | Must be a properly built `IUTInteraction` object |