ConversationBuilder Class

Definition

Provides a builder for constructing instances of the Conversation class with configurable reference and claims information.

public class ConversationBuilder
type ConversationBuilder = class
Public Class ConversationBuilder
Inheritance
ConversationBuilder

Remarks

Use RecordBuilder to incrementally specify details of a conversation reference record, such as the user, agent, service URL, activity ID, and locale. This class is intended to simplify the creation of Conversation instances for use in Proactive scenarios. The builder ensures required fields are set and applies sensible defaults for optional properties if not specified.

Constructors

Name Description
ConversationBuilder()

Methods

Name Description
Build()

Builds and returns the configured conversation reference record.

Create(ClaimsIdentity, String, String)

Creates a new instance of the ConversationBuilder class initialized with the specified identity, channel ID, and optional service URL.

Create(String, String, String, String)

Creates a new instance of the ConversationBuilder class with the specified agent client ID, channel ID, and optional service URL.

WithActivityId(String)

Sets the activity identifier for the reference being built.

WithConversation(ConversationAccount)

Sets the conversation context for the builder using the specified conversation account.

WithConversation(String)

Sets the conversation identifier for the builder and associates it with the conversation reference.

WithUser(ChannelAccount)

Associates the specified user with the conversation being built.

WithUser(String, String)

Associates a user with the conversation using the specified user ID and optional user name.

Applies to