Share via


Advanced approvals in agent flows (preview)

[This article is prerelease documentation and is subject to change.]

This article describes how to use advanced approvals in agent flows.

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.

What are advanced approvals?

An advanced approval is a capability that caters to more complex approval processes. It offers a rich set of capabilities that allow organizations to build robust approval workflows for their business processes.

Advanced approvals build upon basic approvals found in cloud flows. Before getting into advanced approvals, you should familiarize yourself with basic approvals first. Here are some resources to get you started:

Advanced approvals offer the following key functionalities that set them apart from basic approvals:

  1. Multi-stage approvals (preview): Create workflows that let you request approvals from different stakeholders at various stages of the process.

  2. Conditions/conditional approvals (preview): Approve, reject, move to another stage, or skip a stage based on specific conditions for flexible decision-making.

Note

Microsoft is building out this feature and expects to add other functionality over time such as reminders, delegation, custom fields, and notification preferences.

Access advanced approvals

Advanced approvals are available exclusively in agent flows. Agent flows are automations or flows built in Copilot Studio and used standalone or with Copilot Studio agents. Learn more about agent flows in agent flows overview.

Setting up your advanced approval

There are a few steps to set up an advanced approval.

Add the advanced approval action

In your agent flow, you can add an advanced approval as an action via the new Human in the loop connector.

  1. Open the designer of the agent flow into which you want to add an advanced approval.

  2. Select the + button in the location between nodes where you want to add the advanced approval.

  3. From the Add an action left pane, select the Human in the loop connector from the list. If you don’t see the connector, search for it.

    Human in loop connector

  4. Select the Start and wait for advanced approval action. This action starts an approval, sends it to the required assignees, and waits for the approval requests to be completed, before the rest of the flow continues.

  5. Select Set up the approval.

  6. A dialog opens. Rename your approval as you choose.

Add and configure a stage

Approvals are configured in stages. Stages represent different gate points in the approval process where the flow pauses and waits for a designated approver to review and approve before continuing. You can configure each stage independently, customizing to meet the needs of each group of stakeholders.

  1. In the dialog, select Add a stage. A single tile appears in the approval viewer.

  2. Select the text in the tile and rename the stage.

  3. On the right-hand side of the dialog, select the approval type you want. Check out approval types and their behaviors to learn about the different types of approvals and how they work.

  4. Other configuration options appear. Configure these fields as you would configure a basic approval.

    Configure approval stage

Repeat the same steps to add more stages as needed.

Add an input

If you have tokens or variables created in your agent flow that you wish to use in your advanced approval, you need to create inputs. You can't directly use tokens or variables inside the approval without creating inputs first.

Create an input

To create an input, follow these steps:

  1. In the right pane, select the inputs icon.

    Inputs icon

  2. Select Add input.

  3. Select an input type. Choose from String, Number, and Boolean.

  4. Give the input a name. For this example, we give the name Claim_ID.

  5. Select Add input.

You should now see the input appear in the input list.

Shows an input in the list of inputs

Use the input in the approval

To use the input in the approval, follow these steps:

  1. Go to the text field where you want to use an input. For example, in the details field of an approval stage.

  2. Enter ${input_name} where you want to use the input. input_name is the name of the input you created in the previous section.

    For example, in the details for the first stage, we add the Claim_ID input we created, by typing ${Claim_ID}.

    Use input parameter

  3. Select Done to save and close the dialog. You should see the input you created in the left pane within the flow designer. You can now map a token or variable from the flow to this input.

    Input parameter added

Add and configure a condition

Conditions are essential for routing approvals and automatically approving or rejecting based on specific criteria. If no conditions are set between stages, the default behavior is:

  • If a stage is approved, the process moves to the next stage.
  • If the stage is rejected, the approval process ends.
  1. To add a condition, select + in the multi-stage viewer between the two stages.

  2. Select Add condition.

  3. On the right-hand, select the condition type (note that the switch condition type isn't currently supported).

  4. Add condition statements as you wish.

    Configure condition

    Note

    On the left side of the condition statement, you can only use an input. If you don't see any inputs, create one first.

  5. Configure where the approval goes based on whether the condition is met:

    • If yes, you can continue to the next stage, approve/reject, or route to another stage.
    • If not, you can continue to the next stage, approve/reject, or route to another stage.

Bringing it all together

Let's look at an example of how this approval process works with conditions. The following image shows a complete approval process with two stages and a condition check.

Example of a complete approval

  1. The approval request reaches the Customer service approval stage first when the approval runs.

    1. If approved, the request moves to the condition check.
    2. If rejected, the approval process ends without reaching the condition check.
  2. At the condition check:

    1. If the conditions are met, the approval goes through another approval stage, which is the Adjuster approval stage.
    2. If the conditions aren't met, the approval ends as Approved.

This demonstrates how you can build complex approval workflows tailored to your business processes.

Responding to approvals

Responding to approvals remains consistent between basic and advanced approvals. Users assigned to approvals can respond through:

  • Microsoft Teams approvals app
  • Outlook
  • Power Automate portal

Known limitations

The following are known limitations:

  • If a user in a different environment from which an approval was sent responds to the approvals, the approval may fail. To prevent the failure, identify the user you want to send the approval to, go to the Power Platform Admin Center, and add the user to that environment.
  • Inputs limitations:
    • To add inputs to stages or conditions, you need to enter ${input_name}, where input_name is the name of the input. We expect to add a token picker with a clearer interface for adding inputs in future updates.
    • Special characters are not supported in input names.
    • Input names must be unique. You can't use duplicate names.
  • You can't assign the same approver to different stages. For example, if you assign John Doe to stage 1, you can’t assign him to stage 2 as well.
  • The switch condition type isn't currently supported.
  • Approval stages with custom response aren't currently supported.
  • File attachments aren't currently supported.
  • The actions Create an advanced approval and Wait for an advanced approval aren't currently supported.
  • Application lifecycle management (ALM) is currently not supported for advanced approvals, meaning that if you import a flow with an advanced approval, you will need to recreate the multi-stage approval in the flow.
  • Sharing is currently not supported, meaning that if you share a flow which has the human in the loop connector, the recipient will need to recreate the multi-stage approval in the flow.