Add agent flows to a topic (AB-620 Exam Prep)

This post is a part of the AB-620: Designing and Building Integrated AI Agent Solutions in Copilot Studio Exam Prep Hub.
This topic falls under these sections:
Plan and configure agent solutions (30–35%)
   --> Configure topics
      --> Add agent flows to a topic


Note that there are 10 practice questions (with answers) at the end of each section to help you solidify your knowledge of the material. Also, there are 4 practice tests with 30 questions each available from the hub's main page below the exam topics section.

Introduction

One of the most powerful capabilities in Microsoft Copilot Studio is the ability to combine conversational topics with agent flows. While topics define how an agent interacts with users through conversation, agent flows enable the agent to perform business processes, automate tasks, integrate with enterprise systems, and orchestrate complex workflows.

For the AB-620 certification exam, you should understand how topics and agent flows work together, when to invoke an agent flow, how data is passed between topics and flows, and how to build resilient, reusable conversational experiences.


Understanding Topics and Agent Flows

Before discussing how to add agent flows to a topic, it is important to understand the role of each component.

Topics

A topic represents a conversational pathway that allows an agent to:

  • Respond to user requests
  • Ask questions
  • Collect information
  • Make decisions
  • Guide users through conversations
  • Call actions and tools
  • Invoke agent flows

Topics determine when something should happen.


Agent Flows

Agent flows define the business logic that performs actions such as:

  • Calling APIs
  • Running Power Automate flows
  • Accessing Dataverse
  • Updating CRM records
  • Sending emails
  • Creating support tickets
  • Querying databases
  • Calling AI models
  • Executing approval workflows

Agent flows determine how the work is completed.


Relationship Between Topics and Agent Flows

Think of the relationship like this:

Topic

  • Conducts the conversation
  • Collects user input
  • Determines intent
  • Decides what action is required

Agent Flow

  • Executes the requested business process
  • Returns results
  • Provides output back to the topic

Topic

  • Continues the conversation
  • Explains the outcome
  • Requests additional information if necessary

Why Use Agent Flows Instead of Placing All Logic in a Topic?

Separating conversational logic from business logic provides several advantages.

Benefits include:

  • Better maintainability
  • Reusable workflows
  • Easier testing
  • Simpler troubleshooting
  • Consistent business processes
  • Reduced duplication
  • Easier governance

Instead of rebuilding the same process in multiple topics, several topics can invoke the same agent flow.


When Should a Topic Invoke an Agent Flow?

Typical scenarios include:

  • Creating a support ticket
  • Looking up customer information
  • Checking inventory
  • Approving requests
  • Booking appointments
  • Updating CRM records
  • Searching enterprise knowledge
  • Calling external REST APIs
  • Sending notifications
  • Creating work items

Designing Topics Before Adding Flows

A well-designed topic should first determine:

  • What information is needed?
  • Which data must be collected?
  • What validation is required?
  • Which flow should execute?
  • What outputs are expected?
  • What should happen if the flow fails?

Planning these elements simplifies implementation.


Collecting Required Inputs

Topics typically gather user information before invoking an agent flow.

Examples include:

  • Customer ID
  • Product name
  • Order number
  • Email address
  • Department
  • Date
  • Priority
  • Approval comments

These values become the input parameters for the flow.

Example conversation:

Agent:
“What is your order number?”

User:
“100548”

Store value in variable.

Pass variable to the flow.


Input Parameters

Agent flows commonly accept parameters such as:

ParameterExample
Customer IDC10245
Emailnorm@company.com
Ticket PriorityHigh
Product NameSurface Laptop
Order NumberORD-14589
DepartmentHR

The topic passes these values to the flow when invoking it.


Output Parameters

Flows also return information.

Examples include:

  • Success status
  • Error message
  • Order status
  • Customer name
  • Case number
  • Appointment confirmation
  • Inventory quantity

The topic can use these outputs to continue the conversation.

Example:

Flow returns:

  • Success = True
  • TicketNumber = INC-45891

Topic responds:

“Your support ticket has been created successfully. Your ticket number is INC-45891.”


Passing Variables Between Topics and Flows

Copilot Studio variables enable communication between conversations and workflows.

Typical process:

  1. User provides input.
  2. Topic stores values in variables.
  3. Variables are passed into the flow.
  4. Flow executes.
  5. Flow returns output variables.
  6. Topic displays results.

This creates a seamless conversational experience.


Triggering an Agent Flow

Within a topic, an agent flow is typically invoked after:

  • Required inputs are collected
  • Validation succeeds
  • User confirms the request

Avoid invoking flows before all required information has been collected.


Validating Data Before Calling a Flow

Validation reduces failures.

Examples include validating:

  • Email addresses
  • Dates
  • Numeric values
  • Required fields
  • Customer IDs
  • Business rules

Example:

Incorrect:

Call flow first.

Receive error.

Correct:

Validate first.

Call flow only after validation succeeds.


Handling Flow Results

Every flow should return meaningful outputs.

Typical outcomes include:

Success

Continue conversation.

Example:

“Your vacation request has been submitted.”


Business Failure

Example:

“No customer exists with that ID.”

The topic can ask for a different ID.


System Failure

Example:

“The HR system is temporarily unavailable.”

The topic may:

  • Retry
  • Escalate
  • Ask the user to return later

Conditional Logic After Flow Execution

Topics frequently branch based on flow outputs.

Examples:

If Success = True

→ Confirm completion

If Success = False

→ Explain failure

If Approval Required

→ Route for approval

If Customer Not Found

→ Ask again


Reusing Agent Flows

One of the biggest advantages of agent flows is reuse.

Example:

Customer Lookup Flow

Used by:

  • Sales topic
  • Support topic
  • Billing topic
  • Warranty topic

Instead of maintaining four lookup implementations, only one flow requires maintenance.


Integrating Enterprise Systems

Topics frequently invoke flows that connect to:

  • Microsoft Dataverse
  • Dynamics 365
  • SharePoint
  • Microsoft Teams
  • SQL Server
  • Azure AI Search
  • SAP
  • ServiceNow
  • Salesforce
  • Custom REST APIs

The topic itself remains conversational while the flow manages integration.


Long-Running Operations

Some workflows require several minutes.

Examples:

  • Report generation
  • Data synchronization
  • Large database updates
  • AI document processing

Best practices include:

  • Inform users processing has begun.
  • Provide progress messages when possible.
  • Notify users when processing completes.
  • Continue asynchronously if supported.

Human-in-the-Loop Scenarios

Some flows require human approval.

Examples include:

  • Expense approvals
  • Vacation approvals
  • Purchase requests
  • Legal review
  • Financial authorization

The topic may:

  • Submit the request.
  • Inform the user approval is pending.
  • Resume once approval completes.

Error Handling

Topics should never assume a flow succeeds.

Always plan for:

  • Authentication failures
  • Connector failures
  • Missing inputs
  • Invalid responses
  • Timeout errors
  • API failures
  • Network outages

Provide friendly error messages rather than technical details.

Example:

“I couldn’t complete your request because the service is temporarily unavailable.”


Logging and Monitoring

Administrators should monitor:

  • Successful executions
  • Failed executions
  • Flow duration
  • Connector errors
  • API failures
  • User abandonment
  • Retry frequency

These metrics help improve reliability over time.


Security Considerations

Topics should only invoke flows users are authorized to execute.

Consider:

  • Microsoft Entra ID authentication
  • User permissions
  • Least privilege
  • Secure connectors
  • Data protection
  • Sensitive information masking

Never expose secrets or internal system information to users.


Best Practices

  • Keep conversational logic inside topics.
  • Keep business logic inside agent flows.
  • Validate inputs before invoking flows.
  • Use meaningful input and output parameters.
  • Handle failures gracefully.
  • Reuse flows whenever possible.
  • Log important events.
  • Protect sensitive information.
  • Use clear confirmation messages.
  • Test both successful and failure scenarios.

Common Mistakes

Avoid these common design errors:

  • Calling flows before collecting all required inputs
  • Ignoring returned output values
  • Exposing technical error messages
  • Duplicating identical business logic in multiple topics
  • Failing to validate user input
  • Hardcoding values instead of using variables
  • Not planning for connector failures
  • Building overly large topics instead of modular conversations

Exam Tips

For the AB-620 exam, remember the following:

  • Topics manage conversations, while agent flows perform business operations.
  • Topics should collect and validate data before invoking a flow.
  • Use variables to pass information between topics and flows.
  • Agent flows should return structured outputs that topics can evaluate.
  • Reuse agent flows whenever possible to reduce duplication.
  • Handle errors gracefully and provide meaningful user feedback.
  • Design topics to support enterprise integrations while maintaining a conversational experience.
  • Separate conversation design from business process implementation.
  • Secure flows with appropriate authentication and authorization.
  • Test both successful and unsuccessful execution paths.

Practice Exam Questions

Question 1

A Copilot Studio topic collects a user’s employee ID before invoking an agent flow. What is the primary purpose of collecting this information first?

A. To reduce the number of topics in the agent

B. To allow the flow to receive the required input parameter

C. To prevent authentication from occurring

D. To automatically create a Dataverse table

Answer: B

Explanation: Agent flows often require input parameters. The topic gathers the necessary information before invoking the flow.


Question 2

Which responsibility belongs primarily to a topic rather than an agent flow?

A. Updating a SQL database

B. Calling a REST API

C. Managing the conversation with the user

D. Executing a Power Automate workflow

Answer: C

Explanation: Topics handle conversational interactions, while agent flows perform business operations and integrations.


Question 3

Why is separating conversation logic from business logic considered a best practice?

A. It prevents users from accessing connectors.

B. It removes the need for authentication.

C. It allows topics to execute without variables.

D. It improves maintainability and enables workflow reuse.

Answer: D

Explanation: Separating responsibilities makes solutions easier to maintain, test, and reuse across multiple topics.


Question 4

An agent flow returns a value indicating that a customer record could not be found. What should the topic do next?

A. Ignore the response and continue.

B. Delete the conversation history.

C. Ask the user for a different customer identifier.

D. Disable the flow.

Answer: C

Explanation: The topic should respond appropriately to business outcomes by allowing the user to correct the information.


Question 5

Which of the following is the BEST example of an output parameter returned by an agent flow?

A. Ticket number generated after creating a support case

B. User’s spoken question

C. Conversation trigger phrase

D. Greeting message

Answer: A

Explanation: Output parameters communicate the results of a completed workflow back to the topic.


Question 6

Before invoking an agent flow, a topic should first:

A. Restart the conversation.

B. Validate required user inputs.

C. Disable error handling.

D. Create a new environment.

Answer: B

Explanation: Input validation prevents unnecessary failures and improves the user experience.


Question 7

Multiple topics need to retrieve customer information using identical business logic. What is the recommended design?

A. Copy the workflow into every topic.

B. Create separate connectors for each topic.

C. Build one reusable agent flow that all topics invoke.

D. Eliminate topics and use only flows.

Answer: C

Explanation: Reusable agent flows reduce maintenance and ensure consistent business logic across conversations.


Question 8

Which scenario is most appropriate for invoking an agent flow?

A. Displaying a welcome message

B. Asking for the user’s preferred language

C. Detecting user intent

D. Creating a purchase order in an ERP system

Answer: D

Explanation: Business operations involving enterprise systems are ideal candidates for agent flows.


Question 9

Why should a topic evaluate the outputs returned by an agent flow?

A. To determine how the conversation should continue

B. To reduce connector licensing costs

C. To automatically create new topics

D. To bypass authentication

Answer: A

Explanation: Output parameters allow the topic to make decisions based on the success, failure, or results of the workflow.


Question 10

An enterprise workflow may take several minutes to complete. What is the best user experience?

A. Close the conversation immediately.

B. Repeatedly invoke the flow until it finishes.

C. Inform the user that processing is underway and provide follow-up or asynchronous notification if appropriate.

D. Return a technical timeout message.

Answer: C

Explanation: Long-running operations should provide feedback to the user and, where appropriate, continue asynchronously rather than blocking the conversation or exposing technical errors.


Go to the AB-620 Exam Prep Hub main page

Leave a comment