Using topic triggers

By default, topics use the Phrases trigger, which activates when one or more of their trigger phrases match closely with an incoming message from a user. There are other trigger types available that determine when a topic should be executed.

Prerequisites

  • You might want to be familiar with creating and editing topics before understanding topic triggers. For more information, see Create and edit topics.

Important

This article contains Microsoft Copilot Studio preview documentation and is subject to change.

Preview features aren't meant for production use and may have restricted functionality. These features are available before an official release so that you can get early access and provide feedback.

If you're building a production-ready agent, see Microsoft Copilot Studio Overview.

Trigger types

Triggers allow you to intercept and handle activities of different types. The following trigger types determine when a topic should trigger.

Tip

When a user sends a message to an agent, the payload is a message type of Activity. Agents can receive activities of other types with new changes in the chat.

For example, Microsoft Teams sends hidden activities of type invoke, which signifies a user action, such as interacting with a Message Extension.

Type Description
Phrases When one or more of the trigger phrases match with the incoming message from a user
Activity received When an Activity of any type is received
Message received When an Activity of type message is received
The most common type of Activity.
Received when a user types or says something to the agent.
Event received When an Activity of type event is received
Conversation update received When an Activity of type conversationUpdate is received
For example, Teams sends an activity of this type when a user joins a conversation.
Invoke received When an Activity of type invoke is received
Most commonly received from the Teams channel. For example, when the user interacts with a Message or Search extension in the Teams app.
Inactivity When a user hasn't interacted with the agent over time. The time period can be configured.

Changing the trigger for a topic

  1. Open your agent in Copilot Studio and go to the Topics page.

  2. Open any topic.

  3. Hover over Phrases of the Trigger node and select the Change trigger icon. You see a list of triggers to choose from.

    Screenshot of the Change trigger selections.

  4. Select the type of trigger for your topic.

    Important

    Your current trigger type content, if any, gets deleted when the trigger type is changed. You're asked to confirm before changing the type.

    Screenshot of a warning that you'll lose trigger phrases by changing the trigger type.

  5. Select Edit on the trigger to open the properties for that trigger type.

Trigger condition

The Condition node allows you to specify condition(s) that must be met in order for the trigger to fire. For example, a condition fires only if the channel used by an employee is Microsoft Teams.

Screenshot of the trigger condition property.

Optionally, you can switch to the full Power Fx editor, to author more complex conditions, by selecting the ... Node Menu and choosing Change to formula.

For more information, see Add conditions to topics.

Trigger priority

More than one trigger can fire for a single incoming Activity, such as a message. The trigger type determines the order the triggers fire.

Order of execution:

  1. Activity Received
  2. Message / Event / Conversation Update / Invoke Received
  3. Phrases

If there's more than one qualifying trigger of the same type, the triggers get executed in the order of creation (oldest first).

You can use the Priority property on a node's Properties pane to explicitly determine the order of execution.

Screenshot of the priority property from a node's properties pane.

Other trigger properties

Some trigger types have more properties, beyond Condition and Priority. For example, the Inactivity trigger type lets you set the inactivity duration.

Screenshot of the duration property for the inactivity trigger.

Default trigger types

These properties are empty by default.

However, if you choose an activity or event type, only matching incoming types are fired. For example, if you select the Hand off activity type when a conversation needs to escalate to an agent, only incoming messages that trigger Hand off fire.

Activity Received Event Received
Activity types Event types

For more information, see Sending event activities.