Introduction

Completed

Overview

In Modules 2 and 3, you built Order Automation, a cloud flow that routes new orders through approval and creates an invoice. In Module 4, you fed it orders from a legacy file. Eventually those orders ship, arrive, and close, and that's when customers start asking a new question: can I return this? Answering it means checking the order's status, weighing its shipping fee, and getting a manager's sign-off above certain values, which will be a slow, manual detour today. In this module, you build Validate Returns: a workflow that a customer-facing agent calls as a tool, mid-conversation, and gets a grounded answer back, built on the same Orders data every module in this series shares.

A workflow is Copilot Studio's new automation format: a visual designer with native AI actions, built in the new workflows experience (public preview) alongside the classic agent flows you'd recognize from Power Automate. It's the pattern that makes agents reliable: instead of leaving a decision to the model alone, the agent calls a workflow where deterministic If/Else and Classify branches decide what happens, generative AI only decides how it reads, and a person signs off when the value is high enough. This module authors in the new experience throughout, and signposts where it differs from the classic experience along the way.

Learning objectives

By the end of this module, you will:

  • Create a workflow in Copilot Studio's new workflow experience, triggered by an agent.
  • Read Dataverse data with List rows and OData filters.
  • Use Copilot's expression builder to generate flow expressions from plain English.
  • Branch logic with If/Else on a business rule (order status).

Prerequisites

The scenario continues the earlier modules, but the build stands alone; you can complete this module without them. You need:

  • A Microsoft Copilot Studio license or trial in your environment. No license yet? Go to https://copilotstudio.microsoft.com, sign in with your work or school account, and choose the free trial when prompted or ask a Microsoft 365 admin to assign a Copilot Studio trial license from the Microsoft 365 admin center.

    🔧 Setup check: If Copilot Studio prompts you about licensing at any point, select the option to start a free trial and continue with the lab.

  • The new workflows experience available in your environment. It's in public preview, so labels and layouts may shift slightly as it evolves. If a control is named differently on your screen, look for the closest match.

  • Access to Outlook email with the same account, so human-review approvals can be delivered to you.

  • Copilot Studio capacity is not a concern for this lab: test runs from the flow designer and the agent's test chat don't consume Copilot Studio capacity. Published workflows running for real users consume capacity per action.

Business use case

Scenario: Customers ask whether an order can be returned. Determining eligibility means checking the order status, evaluating the shipping fee, and (above certain thresholds) obtaining manager or senior-manager approval. Today that's a slow, manual process, and a returns agent has to leave the conversation to work it out.

Solution: An agent calls the Validate Returns workflow, which confirms the order is closed, classifies the shipping fee, generates the right customer or approver message, and requests human sign-off when needed, all from a single conversation turn. The agent relays the result back to the customer in plain language.

The return rule is grounded in the series' own data: a closed order (order status 3) has reached the end of its lifecycle (ordered, approved, invoiced, shipped, and received) and only then is it eligible for return. Its shipping fee decides whether a manager or senior manager must approve.

Names used in this lab

Rename the workflow and its actions as you create them, using the names below. Later steps and dynamic-content pickers refer to these names, so using them exactly keeps your screen matching the instructions.

A note on the screenshots throughout this module: they were captured on the completed workflow, so the canvas behind a panel may show nodes you haven't built yet. Match the highlighted control or panel, not the number of nodes on the canvas.

Component Name
Workflow Validate Returns
Trigger input Order Number
List rows action List Order Rows
Response variable response
Variable action Initialize Response
Not-eligible update action Update Not Eligible Response
Not-eligible message action Draft Not Eligible Message
Not-closed branch If not a closed Order
Agent Northwind Returns Agent