diff --git a/src/img/20220204-134305-axntyw9ix9.png b/src/img/20220204-134305-axntyw9ix9.png new file mode 100644 index 00000000..313fdd2a Binary files /dev/null and b/src/img/20220204-134305-axntyw9ix9.png differ diff --git a/src/img/20220204-134647-r5p68s9p2h.png b/src/img/20220204-134647-r5p68s9p2h.png new file mode 100644 index 00000000..587cbd48 Binary files /dev/null and b/src/img/20220204-134647-r5p68s9p2h.png differ diff --git a/src/pages/blog/2022-01-31-manage-call-queue-and-auto-attendant.mdx b/src/pages/blog/2022-01-31-manage-call-queue-and-auto-attendant.mdx index 59e3ece2..7c621dee 100644 --- a/src/pages/blog/2022-01-31-manage-call-queue-and-auto-attendant.mdx +++ b/src/pages/blog/2022-01-31-manage-call-queue-and-auto-attendant.mdx @@ -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). + + +The script below assumes there's no holiday workflow. If there's one defined, it'll be overwritten! + + +```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