Triggers are the secret sauce behind how Microsoft Copilot Studio manages conversational flows and responses. By configuring topic triggers, you can decide exactly when and how your copilot responds to users. Whether it’s based on specific phrases, events, or inactivity, triggers allow you to create more dynamic and context-aware conversations.
In this blog post, we’ll dive into the different types of triggers, how to change them, and how you can optimize trigger conditions to create a seamless user experience.
Prerequisites
Before getting into triggers, make sure you’re familiar with creating and editing topics in Copilot Studio. Topics are the foundation of your copilot’s conversations, and understanding them will make working with triggers much easier. For more on this, check out our guide on Creating and Editing Topics.
Types of Triggers
Triggers in Copilot Studio determine when a particular topic should be executed based on specific conditions. Here’s an overview of the most common trigger types:
1. Phrases
This is the default trigger type. It activates when the copilot receives an incoming message that matches one or more predefined trigger phrases. For example, if you have a topic with the phrase “store hours,” your copilot will trigger that topic when a user says, “What are the store hours?”
2. Activity Received
This trigger activates when the copilot receives any type of activity. Activities are essentially user inputs or system events. Microsoft Teams, for example, can send hidden activities like an “invoke” when users interact with extensions.
3. Message Received
This trigger activates when the copilot receives a message activity, the most common type of input from users. For example, when a user types or speaks to the copilot, the copilot identifies this as a “message received” activity.
4. Event Received
This trigger activates when an event activity is received. It’s often used for system-level or custom event handling.
5. Conversation Update Received
This trigger activates when an update occurs in the conversation, such as when a user joins a chat in Microsoft Teams.
6. Invoke Received
This trigger is particularly useful in Microsoft Teams when a user interacts with Message or Search extensions.
7. Inactivity
The inactivity trigger is fired when a user hasn’t interacted with the copilot for a specific duration. This can be configured to send reminders or prompt a user for action after a set amount of time.
Changing the Trigger for a Topic
You can easily change a topic’s trigger type to suit your use case. Here’s how:
- Open your copilot in Copilot Studio and navigate to the Topics page.
- Open the topic you wish to edit.
- Hover over the Phrases trigger and select the Change trigger icon.
- Choose a new trigger type from the list provided.
Important
If you change the trigger type, any existing content tied to the current trigger will be deleted. You’ll be asked to confirm the change before proceeding.
Once you’ve selected a trigger type, you can further customize its behavior by editing its properties.
Setting Trigger Conditions
Trigger conditions allow you to add logic to your copilot. For instance, you can set a condition where a trigger only fires if the conversation takes place in Microsoft Teams or if certain variables are met.
To set a trigger condition:
- Select the Condition node on your trigger.
- Define the conditions that must be met for the trigger to fire. For example, you can create a condition that only fires if a user interacts with the copilot on a specific channel.
- For more complex conditions, you can use Power Fx by selecting the … Node Menu and switching to Change to formula.
Trigger Priority
When multiple triggers can fire for a single activity, Copilot Studio uses a specific order of execution:
- Activity Received
- Message / Event / Conversation Update / Invoke Received
- Phrases
If multiple triggers of the same type exist, they execute in the order of creation (oldest first). However, you can manually set the priority for triggers using the Priority property in the node’s properties pane. This ensures that critical triggers are executed before others.
Other Trigger Properties
Some triggers, like Inactivity, come with additional properties such as the duration of inactivity before the trigger fires. This lets you fine-tune the behavior of your copilot to suit your users’ needs.
Understanding and leveraging topic triggers in Copilot Studio allows you to build more dynamic and intelligent conversational flows. From basic phrase triggers to complex event and activity handling, mastering triggers will take your copilots to the next level of user engagement. Whether you’re creating topics from scratch or customizing system topics, triggers give you the control needed to optimize user experiences.
For more advanced configurations, including trigger conditions and Power Fx formulas, dive deeper into the Copilot Studio documentation and explore the full potential of conversational AI.
