Example configuration Microsoft Power Automate to automate routing based on Azure AD

Introduction

This example shows you how you can use Microsoft Power AutomatePreviously named Microsoft Flow. to automate your UCCUCC stands for Unified Contact Center and consists of a queue that can be handled by Agents Each Contact Center has its own settings, interactive voice response questions and Agent with specific skills. Agents can be member of, or sign up to, one or more Contact Centers. routing.

 

Prerequisites

For this scenario we will be using:

  • Power Automate

  • SharePoint Online

  • Azure AD

 

Configuration

  1. From your Office Portal, go to your Power Automate App:

  2. Click "My Flows":

  3. Click "New" and "Scheduled- from Blank":

  4. Set schedule, for example every day:

  5. Add action "Get group members", from Azure AD.

    1. Fill in the Group ID.

      Note Group ID can be found on Azure AD portal, https://aad.portal.azure.com

  6. Add action "Initialize variable".

    1. Name = UCC Routing ID

    2. Type = String

  7. Add action "Apply to each"

    1. Output = Group Members

  8. Add action "Get Items", from SharePoint

    1. Site Address = Your UCC's SharePoint Site

    2. List = Routing

    3. Filter Query:

      wsp_ucc_routing_match_from eq '@{items('Apply_to_each')?['mail']}'

  9. Add action "Set Variable"

    1. Name = UCC Routing ID

    2. Value:

      first(body('Get_items')?['value'])?['id']

  10. Add action "Condition"

    1. Value 1:

      @variables('UCC Routing ID')

    2. Match = is equal to

    3. Value 2 =

  11. Add action "Create Item" of SharePoint, in if Yes.

    1. Site Address = Your UCC's SharePoint Site

    2. List = Routing

    3. Title:

      AD Routing - @{items('Apply_to_each')?['userPrincipalName']}

    4. Match From: (can be any field in this example we use mail, to route on Microsoft Teams)

      @{items('Apply_to_each')?['mail']}

    5. Action Value = Skill (can be replaced with any other action)

    6. Skill id = Name of the Skill you want to route to.

    7. Action Value = Skill (can be replaced with any other action)

    8. MatchEndpoint = All