Proactive Class

Definition

Provides methods for storing, retrieving, and managing conversation references to enable proactive messaging scenarios. Supports sending activities and continuing conversations outside the standard request/response flow using stored conversation references.

public class Proactive
type Proactive = class
Public Class Proactive
Inheritance
Proactive

Remarks

Use the Proactive class to implement scenarios where an agent needs to initiate conversations or send messages to users without an incoming activity, such as notifications or scheduled alerts. Some operations require that Conversation references be stored using StoreConversationAsync before they can be used.

Fields

Name Description
ContinueConversationValueType

IAcitivty.ValueType that indicates additional key/values for the ContinueConversation Event.

Methods

Name Description
ContinueConversationAsync(IChannelAdapter, Conversation, RouteHandler, String[], IActivity, CancellationToken)

Continues an existing conversation by calling the specified route handler within the context of the provided conversation reference. This method will provide TurnContext and TurnState relative to the original conversation.

ContinueConversationAsync(IChannelAdapter, String, RouteHandler, String[], IActivity, CancellationToken)

Continues an existing conversation by resuming activity using the specified channel adapter and conversation ID. The conversation must have previously been stored using StoreConversationAsync(ITurnContext, CancellationToken).

See ContinueConversationAsync(IChannelAdapter, Conversation, RouteHandler, String[], IActivity, CancellationToken) for more details.

CreateConversationAsync(IChannelAdapter, CreateConversationOptions, RouteHandler, String[], Func<ConversationReference,IActivity>, CancellationToken)

Creates a new conversation using the specified channel adapter and conversation information.

DeleteConversationAsync(String, CancellationToken)

Deletes the conversation reference associated with the specified conversation ID from persistent storage asynchronously.

GetConversationAsync(String, CancellationToken)

Retrieves the conversation reference record associated with the specified conversation identifier asynchronously.

GetConversationWithThrowAsync(String, CancellationToken)

Retrieves the conversation with the specified identifier asynchronously, throwing an exception if the conversation does not exist.

SendActivityAsync(IChannelAdapter, Conversation, IActivity, CancellationToken)

Sends an activity to a conversation using the specified channel adapter and conversation reference.

SendActivityAsync(IChannelAdapter, String, IActivity, CancellationToken)

Sends an activity to an existing conversation using the specified channel adapter.

StoreConversationAsync(Conversation, CancellationToken)

Stores the current conversation reference in the proactive storage and returns the conversation identifier.

StoreConversationAsync(ITurnContext, CancellationToken)

Stores the current conversation reference in the proactive storage from the ITurnContext.

Applies to