Example configuration Microsoft Power Automate to schedule callback when a dialogue is missed

Introduction

This example shows on how to automatically create a when a dialogue has been missed.

In addition it will also remove pending callback when the customer successfully

Configuration

  1. Navigate to Microsoft Power Automate.

  2. Click "My Flows"

  3. Click "New" and "Create from Blank"

  4. Use "When an item is created" (SharePoint) as Trigger:

    1. Site = SharePoint url where the dialogues are handled

    2. List Name = CallSummary

    Explanation

    This trigger will check for new entries in the Call Summary list every few minutes. If a new entry is found, Power Automate will trigger.

  5. Add action "Get Items" (SharePoint) and rename to "Get Skill id":

    1. Site = SharePoint UCC url where the dialogues are handled

    2. List = Skills

    3. Filter Query =

      Expression
      Title eq '@{triggerBody()?['wsp_ucc_SkillChosen']}'

    Explanation

    This action will attempt to retrieve the matching Skill ID from the SkillChosen field in the Call Summary list.

  6. Add action "Initialize variable" and rename to "Store Skill id":

    1. Name = SkillId

    2. Type = Integer

    3. Value =

      Expression
      @first(body('Get_Skill_Id')?['value'])?['id']

    Explanation

    Because the previous action could potentially return multiple values, these need to be captured and stored in a variable for later use in the Power Automate flow.

  7. Add action "Get Items" (SharePoint) and rename to "Get active Outbound Dialers":

    1. Site = SharePoint UCC url where the callbacks are handled

    2. List = OutboundDialerCalls

    3. Filter Query =

      Expression
      Title eq '@{triggerBody()?['wsp_ucc_Customer']}' and wsp_ucc_odc_processed eq 'No'

    Explanation

    With this action, we want to retrieve any potential records to see if the customer already has a pending callback scheduled.

  8. Add action "Initialize variable" and rename to "Active Outbound Dialer Id":

    1. Name = Dialer

    2. Type = String

    3. Value =

      Expression
      if(equals(length(body('Get_active_Outbound_Dialers')?['value']), 0), '', string(first(body('Get_active_Outbound_Dialers')?['value'])?['id']))

    Explanation

    Because the previous action could potentially return multiple values, these need to be captured and stored in a variable for later use in the Power Automate flow.

  9. Add action "Condition", with the following two checks (keep drop down on AND):

    Explanation

    This condition checks if the entry in the call summary was not accepted and contains a SkillChosen. If true, it’s a missed call. If false, it’s an accepted call or an drop.

    1. Condition expression 1:

      1. Value 1 =

        Expression
        @triggerBody()?['wsp_ucc_Accepted']
      2. Check = Is equal to

      3. Value 2 =

        Expression
        @false
    2. Condition expression 2:

      1. Value 1 =

        Expression
        @triggerBody()?['wsp_ucc_SkillChosen']
      2. Check = Is not equal to

      3. Value 2 =

        Expression
        @null
  10. If True:

    1. Add action "Condition", with the following check:

      Explanation

      This condition checks if the customer has a pending entry in the callback schedule. If true, the customer had a pending callback; if false, the customer did not.

      1. Value 1 =

        Expression
        @variables('Dialer')
      2. Check = Is equal to

      3. Value 2 =

    2. If True:

      1. Add "Create Item" (SharePoint):

        1. Site = SharePoint URL where the callback should be created on

        2. List = OutboundDialerCalls

        3. Invite =

          Expression
          @{triggerBody()?['wsp_ucc_Customer']}
        4. Processed = No

        5. Skill Id =

          Note

          First select "Enter custom value", which is the last option in the drop down.

          Expression
          @variables('SkillId')

        Explanation

        This action creates an entry on the callback list, ensuring that the customer will be called by an agent with the same skill as the missed call.

    3. If False, do nothing

      Explanation

      Because the customer already has a pending callback scheduled, no further actions are needed.

  11. If False:

    1. Add action "Condition", with the following two checks (keep drop down on AND):

      Explanation

      This condition checks if the customer has a pending entry in the callback schedule and if the call summary entry was accepted. If true, the customer had a pending callback but has already spoken to an agent.

      1. Condition expression 1:

        1. Value 1 =

          Expression
          @variables('Dialer')
        2. Check = Is not equal to

        3. Value 2 =

      2. Condition expression 2:

        1. Value 1 =

          Expression
          @triggerBody()?['wsp_ucc_Accepted']
        2. Check = is equal to

        3. Value 2 =

          Expression
          @true
    2. If True:

      1. Add action "Update Item" (SharePoint):

        1. Site = SharePoint UCC Site, where callbacks are handled

        2. List = OutboundDialerCalls

        3. Id =

          Expression
          @{variables('Dialer')}
        4. Invite =

          Expression
          @{triggerBody()?['wsp_ucc_Customer']}
        5. Processed = Yes

        Explanation

        This action will update the scheduled callback to be processed, as the customer has already spoken to an agent in the call summary entry.

    3. If False, no nothing.

Example: