Skip to content

Commit

Permalink
Update Blog “2022-01-31-manage-call-queue-and-auto-attendant”
Browse files Browse the repository at this point in the history
  • Loading branch information
robdy committed Feb 4, 2022
1 parent 88fab96 commit 85cc12f
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 2 deletions.
Binary file added src/img/20220204-134305-axntyw9ix9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/img/20220204-134647-r5p68s9p2h.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 56 additions & 2 deletions src/pages/blog/2022-01-31-manage-call-queue-and-auto-attendant.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,67 @@ $aa.DefaultCallFlow.Greetings = @($audioFilePrompt)
Set-CsAutoAttendant -Instance $aa
```

## Adding out of hours workflow
## Adding out-of-hours workflow

When we create an auto attendant we don't need to specify an out-of-hours workflow. If we hit **Submit** in the **Call flow** window (as in the image below), it won't be created:

![](../../img/20220204-134305-axntyw9ix9.png "Call flow window in auto attendant creator")

## Changing out of hours greeting
We can check if that's the case by inspecting the value of the *Call flows* property in the `$aa` variable. If it's empty, as in the image below, the out-of-hours workflow is not defined:



![](../../img/20220204-134647-r5p68s9p2h.png "Inspecting Call Flows value via PowerShell")

If there's no out-of-hours workflow, we won't be able to modify it. Modifying is described in the later stages. Let's now take care of the workflow.

To create a workflow, we'll use [`New-CsAutoAttendantCallFlow` cmdlet](https://docs.microsoft.com/en-us/powershell/module/skype/new-csautoattendantcallflow?view=skype-ps).

<Warning>

The script below assumes there's no holiday workflow. If there's one defined, it'll be overwritten!

</Warning>

```powershell
# First, menu option
$newAAMenuOptionParams = @{
Action = "DisconnectCall"
DtmfResponse = "Automatic"
}
$AAOOHMenuOption = New-CsAutoAttendantMenuOption @newAAMenuOptionParams
# Then, menu
$newAAMenuParams = @{
Name = "Default Menu"
MenuOptions = @($AAOOHMenuOption)
}
$AAOOHMenu = New-CsAutoAttendantMenu @newAAMenuParams
# Optional greeting
$newAAOOHGreetingParams = @{
TextToSpeechPrompt = "The office is closed now"
}
$AAOOHGreeting = New-CsAutoAttendantPrompt @newAAOOHGreetingParams
# And then, the workflow
$newAAOOHFlowParams = @{
Name = "$attendantName After hours call flow"
Menu = $AAOOHMenu
Greetings = $AAOOHGreeting
}
$AAOOHFlow = New-CsAutoAttendantCallFlow @newAAOOHFlowParams
# Now, assigning the workflow
$aa.CallFlows = @($AAOOHFlow)
### TODO: Assign schedules and call handling association
# And saving
Set-CsAutoAttendant -Instance $aa
```

## Changing out of hours greeting

## Changing holidays greeting

Expand Down

0 comments on commit 85cc12f

Please sign in to comment.