EventFactory class
Contains utility methods for creating various event types.
Methods
create |
Create handoff initiation event. |
create |
Create handoff status event. |
Method Details
createHandoffInitiation<T>(TurnContext, T, Transcript)
Create handoff initiation event.
static function createHandoffInitiation<T>(context: TurnContext, handoffContext: T, transcript?: Transcript): Activity
Parameters
- context
-
TurnContext
The context object for the turn.
- handoffContext
-
T
Agent hub-specific context.
- transcript
-
Transcript
Transcript of the conversation.
Returns
Activity
The handoff event activity.
createHandoffStatus(ConversationAccount, string, string)
Create handoff status event.
static function createHandoffStatus(conversation: ConversationAccount, state: string, message?: string): Activity
Parameters
- conversation
-
ConversationAccount
Conversation being handed over.
- state
-
string
State, possible values are: "accepted", "failed", "completed".
- message
-
string
Additional message for failed handoff.
Returns
Activity
The handoff event activity.