Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Copilot Studio provides two node types that you can use for activities that aren't messages: the Event activity node, and the Invoke activity node. These node types are discussed in the following sections.
Sending events
The Send an Event node is designed for sending Event activities. Event activities are sent from the agent and can be intercepted and used by the channel, which decides if and how to use the activities. When you send an event, you give it a name and then you can set a value on the event. This value can be in any format: a primitive literal value, a variable reference, or a Power Fx formula. The value gets serialized as JSON and added to the outgoing activity.
Uses of this node include:
- You can configure a custom web chat control to handle events sent from the agent. For example, you could look for an event coming back from the agent and take an action on the page. The
04.api/c.incoming-activity-event
sample in the Microsoft Bot Framework Web Chat samples repository on GitHub demonstrates how event handling could work. - AudioCodes use event activities to let you control the service. For example, starting or stopping call recording. For more information, see Recording calls.
Sending other activity types
In addition to event activities, you can send activities of other types using the Invoke activity node. The types of activities you can send are a subset of the ones offered in the Bot Framework Schema - ActivityTypes Class. When using this node, you choose the type of the activity and then optionally set a name or value.
Common types are:
- Typing sends a typing activity, which the channel can choose to pick up and show a typing indicator on the client.
- Delay can set a delay between messages. For example: sending a message, then sending a delay activity, followed by another message. For the customer, they see the first message, followed by a pause, then the second message. In such cases, the value is set to the number of milliseconds for the desired delay. For more information, see ActivityTypes.Delay Field.
- Invoke/Invoke response are generally used for Microsoft Teams. You create a topic with an invoke trigger to intercept an incoming Invoke from Teams, and use an Invoke response activity node to send an appropriate response back to Teams.
- Handoff sends a handoff activity with explicit control over the value. A handoff is used for some external channels, such as AudioCodes.