Create a Call Queue

Licensing

Overview

To create a Call Queue, you need to

  1. Create a Resource Account
  2. License the Resource Account (Optional)
  3. Create the Call Queue

Steps

  1. Create a Resource Account
  2. Assign the Resource account a license
  3. [Optional] If wanting to forward an unanswered call to a Voice Mail, then you’ll need to:
    • Need a service account with a Microsoft Flow license
    • Create an Office 365 Group to receive the Voice Mails (recommend to start the name of the account with VM. IE: VM Finance)
    • Assign the service account as an owner and member of the new Microsoft 365 group
    • Create a flow to get the email and pass it to a destination email address (See Jay for template)
  4. Create the Call Queue

PowerShell

The script will prompt for a name to use for the new Call Queue and will auto-format the name as required

⚠ These scripts assume that you’ve already connected to the Skype for Business Online PowerShell Module. See Here to connect

Create the Resource Account

#Get the name of the new Call Queue from the user
Write-Host "This script will create a new Resource Account and create the Call Queue" -BackgroundColor Yellow -ForegroundColor Black
Write-Host "The only allowed symbols are - and _"
$CqName = Read-Host "Please enter the name for the new Call Queue"

#Create the username for the Resource Account by removing all spaces and adding RACQ_ to the start
$CqDisplayName = $CqName -replace '[`~!@#$%^&\*()+={}|\[\]\;:\''",/<>?]',''
$RaCqUserName = $CqName -replace '\s','' -replace '[`~!@#$%^&\*()+={}|\[\]\;:\''",/<>?]',''
$RaCqUserName = "RACQ_$RaCqUserName{DOMAIN_NAME}"
$RaCqDisplayName = $CqName -replace '[`~!@#$%^&\*()+={}|\[\]\;:\''",/<>?]',''
$RaCqDisplayName = "RACQ_$RaCqDisplayName"

#Create a new Call Queue
New-CsOnlineApplicationInstance -UserPrincipalName $RaCqUserName -DisplayName $RaCqDisplayName -ApplicationId “11cd3e2e-fccb-42ad-ad00-878b93575e07”

Assign a PSTN phone number to the Resource Account

Raw PowerShell Code

$RaUPN = Read-Host "Please enter UPN for the Resource Account"
Write-Host "The PSTN number must be in E.164 format - IE: +61299995555" -BackgroundColor Yellow -ForegroundColor Black
$RaPSTN = Read-Host "Please enter PSTN number to assign to the Resource Account"

Set-CsOnlineApplicationInstance -Identity $RaUPN -OnpremPhoneNumber $RaPSTN

SBC-Easy PowerShell Code

The full script has now been included in the User Onboarding script here