Skip to content

3. Configuration

Srinivas Varukala edited this page Mar 29, 2023 · 9 revisions

Ensure Call Queues

Ensure a couple of Call Queues are created via Teams Admin Center. Follow the [https://learn.microsoft.com/en-us/microsoftteams/create-a-phone-system-call-queue?tabs=general-info](step-by-step guide) to learn how to do that.

Assign Call Queue Delegated Owner

The purpose of this app is to faciliate a person who is not a Teams administrator to be able to manage a selected Call Queue, add and remove agents to it and even upload schedules for future so that the automation script can take care of adding/removing the agents without human interference.

Follow below steps to delegate a person as the owner for a selected call queues. You will need to add this person access to both the SPO site and the Power App.

Power Platform Licensing

There are 3 types of licensing.

  • Power Apps per app plan which allows individual users to run applications (one app or one portal) for a specific business scenario based on the full capabilities of Power Apps for $5/user/app/month. This plan provides an easy way for customers to get started with the platform before broader scale adoption.

  • Power Apps per user plan which equips a user to run unlimited applications (within service limits) based on the full capabilities of Power Apps for $20/user/month.

  • Power Apps pay-as-you-go plan which allows individual users to run applications (1 app or 1 portal) without any licenses via Azure subscription. You only pay for the number of users who used the app in a month. See Preview: Pay-as-you-go plan.

Here is the reference used: https://learn.microsoft.com/en-us/power-platform/admin/powerapps-flow-licensing-faq

Based on the functionality and use case of this app, we recommend assigning a per app plan on the Power App. You will need to purchase one per app license per user that will be using this app. Please follow the steps here: https://learn.microsoft.com/en-us/power-platform/admin/about-powerapps-perapp

Access to Power App

  1. Log into PowerApps portal using https://maker.powerapps.com
  2. Ensure the correct Environment is selected in the top right corner
  3. Click on Solutions in the left nav
  4. Open CQS-PowerPlat-Solution
  5. Use the ellipses (...) beside the Call Scheduler App and select Share. This opens a popup.
  6. Search for the user and select the user.
  7. Under the Data permissions section, please select Basic User security role in the dropdown that is against environmentvariabledefinitions,... CQS Power App Share

Access to SharePoint Online Site

  1. Open the SharePoint Site that was created during deployment.
  2. Click on Members in the top right corner.
  3. Click Add members button to search for the user, select the user with member permissions and Save.

Populate CallQueueOwners SharePoint List

  1. As an admin you must map the Call Queue's and ther persons who will manage them. This can be configured in the CallQueueOwners list in the SharePoint site that was created as part of the deployment process.
  2. To configure this list you need to know the Call Queue Id's of the call queues. See FAQ page heading How to get the Call Queue Id for help with that.
  3. You must enter the users email and the call queue id in this list. Below is an example configuration:
    • User (admin) is configured to manage two call queues.
    • User (Bianca) is configured to manage another two call queues.
    • User (Alex) is configured to manage one call queue.

Test access

  1. Let the user access the PowerApp via the link in the email that was sent when the PowerApp was shared.
  2. The first time they access, they will be prompted to Allow certain connections. The user may have to use the Signin button against the Custom Connector to create the connection.

If the creation of the connection fails, you might have to do some additional work. Please refer to FAQ page and look for the section heading Power Platform environment user access

  1. The PowerApp loads and the user should be able to use the app to manage the assigned Call Queues.

Scheduling Agents

The PowerApp lets the Call Queue owner upload CSV file that contains the schedules for the agents. These schedules are parsed and saved to the SharePoint site to the ShiftsManifest list. Configure Azure function to run as a cron job (timer job) that will process the schedules by adding/removing the agents as per the SharePoint list.

How to format the CSV file

You can find a sample CSV file in the https://github.com/OfficeDev/microsoft-teams-apps-call-queue-scheduler/tree/main/Pkgs folder within this repository. Here is the sample:

"Assignment","01/18/2023","01/19/2023"
"08:00AM-10:30AM","JoniS@Contoso.OnMicrosoft.com",
"08:00AM-10:00AM",,"AllanD@Contoso.OnMicrosoft.com"
"10:00AM-11:00AM","MeganB@Contoso.OnMicrosoft.com","MeganB@Contoso.OnMicrosoft.com"
"09:00AM-12:30PM",,"BiancaP@Contoso.OnMicrosoft.com"
"12:00PM-16:00PM","AlexW@Contoso.OnMicrosoft.com","AlexW@Contoso.OnMicrosoft.com"
"15:00PM-20:30PM","JoniS@Contoso.OnMicrosoft.com",
"19:00PM-23:00PM",,"DarbyG@Contoso.OnMicrosoft.com"
"22:00PM-05:00AM","NelsonW@Contoso.OnMicrosoft.com","DarbyG@Contoso.OnMicrosoft.com"

The first column signifies the start and end time in 24HR format. The second and third columns are the dates which has the UPN for the agents who are on schedule for their selected time slot. Note that its not limited to two days. The app was tested with a schedule up to 30 days included in a single CSV file.

Upload the CSV file

  1. Using the PowerApp, the call queue owner can navigate to Upload Schedules screen.
  2. In this screen make sure you select the correct Call Queue. Attach the csv file after ensuring the format is good without any issues.

Note: The uploaded file is saved to ShiftsCSVDocuments library in the SharePoint site. The file is processed by an Azure Function called CSVInputParser, which is invoked using the Upload-ShiftsCSVFile flow. You can verify that the schedules are good by checking the ShiftsManifest list. Once the agents are added to the list, another flow named UpdateCallQueueAgents will take care of populating few additional columns (like UserId).

  1. Navigate back and select View schedules to check if you can see the uploaded schedules. Again make sure the correct call queue is selected.
  2. User can edit the schedules within the PowerApp and those changes will be written back to the SharePoint list.

Configure Azure Function as cron job

The purpose of this Azure Function is to wake up every few minutes and look for schedules in the SharePoint site. If there are any agents that either must be added or removed, it will take those actions appropriately. The script also logs those actions to ShiftsChangeLog list within the same site. Please look at FAQ page section Consolidate ShiftsManifest SharePoint List which explains how a Flow can be used to cleanup the lists periodically. This helps to mitigate storing large number of items in the list.

  1. Navigate to Azure Portal. Open the Azure Function App.
  2. Select Functions, Select ProcessShifts function.
  3. Click Code + Test to open the code editor for this function.
  4. Make below changes
    • Line# 11, change the time zone as appropriately
    • Line# 24, you can hard code the call queue id for the call queue this script must process the schedules
  5. Click Save
  6. Click on Integration. Then click on Timer
  7. Change the schedule as per your needs. The script is configured to execute every 55 minutes. You can change this to run every 15 minutes if needed.
  8. If everything is configured correctly, the schedules will be processed successfully.
  9. You also must make a copy of the ProcessShifts Azure Function and configure it to run against the call queue that you want to manage.