Skip to content

Commit 4f69578

Browse files
authored
Merge pull request MicrosoftDocs#3574 from dariomws306/patch-20
Patch 20
2 parents 8bd2f2a + 49427af commit 4f69578

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

skype/skype-ps/skype/New-CsAutoAttendant.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,54 @@ We can see when we ran the Get-CsOnlineSchedule cmdlet at the end, to get the _C
203203

204204
Removing an association between an AA and a schedule is as simple as deleting the CallHandlingAssociation of that schedule in the AA you want to modify. Please refer to [Set-CsAutoAttendant](Set-CsAutoAttendant.md) cmdlet documentation for examples on how to do that.
205205

206+
### -------------------------- Example 4 --------------------------
207+
```powershell
208+
$aaName = "Main Auto Attendant"
209+
$language = "en-US"
210+
$greetingText = "Welcome to Contoso"
211+
$mainMenuText = "To reach your party by name, say it now. To talk to Sales, please press 1. To talk to User2 press 2. Please press 0 for operator"
212+
$afterHoursText = "Sorry Contoso is closed. Please call back during week days from 7AM to 8PM. Goodbye!"
213+
$tz = "Romance Standard Time"
214+
$operatorId = (Get-CsOnlineUser -Identity "sip:[email protected]").ObjectId
215+
$user1Id = (Get-CsOnlineUser -Identity "sip:[email protected]").ObjectId
216+
$salesCQappinstance = (Get-CsOnlineUser -Identity "[email protected]").ObjectId # one of the application instances associated to the Call Queue
217+
$tr1 = New-CsOnlineTimeRange -Start 07:00 -End 20:00
218+
219+
# After hours
220+
$afterHoursSchedule = New-CsOnlineSchedule -Name "After Hours" -WeeklyRecurrentSchedule -MondayHours @($tr1) -TuesdayHours @($tr1) -WednesdayHours @($tr1) -ThursdayHours @($tr1) -FridayHours @($tr1) -Complement
221+
$afterHoursGreetingPrompt = New-CsAutoAttendantPrompt -TextToSpeechPrompt $afterHoursText
222+
$afterHoursMenuOption = New-CsAutoAttendantMenuOption -Action DisconnectCall -DtmfResponse Automatic
223+
$afterHoursMenu = New-CsAutoAttendantMenu -Name "AA menu1" -MenuOptions @($afterHoursMenuOption)
224+
$afterHoursCallFlow = New-CsAutoAttendantCallFlow -Name "After Hours" -Menu $afterHoursMenu -Greetings @($afterHoursGreetingPrompt)
225+
$afterHoursCallHandlingAssociation = New-CsAutoAttendantCallHandlingAssociation -Type AfterHours -ScheduleId $afterHoursSchedule.Id -CallFlowId $afterHoursCallFlow.Id
226+
227+
# Business hours menu options
228+
$operator = New-CsAutoAttendantCallableEntity -Identity $operatorId -Type User
229+
$sales = New-CsAutoAttendantCallableEntity -Identity $salesCQappinstance -Type applicationendpoint
230+
$user1 = New-CsAutoAttendantCallableEntity -Identity $user1Id -Type User
231+
$menuOption0 = New-CsAutoAttendantMenuOption -Action TransferCallToOperator -DtmfResponse Tone0 -CallTarget $operator
232+
$menuOption1 = New-CsAutoAttendantMenuOption -Action TransferCallToTarget -DtmfResponse Tone1 -CallTarget $sales
233+
$menuOption2 = New-CsAutoAttendantMenuOption -Action TransferCallToTarget -DtmfResponse Tone2 -CallTarget $user1
234+
235+
# Business hours menu
236+
$greetingPrompt = New-CsAutoAttendantPrompt -TextToSpeechPrompt $greetingText
237+
$menuPrompt = New-CsAutoAttendantPrompt -TextToSpeechPrompt $mainMenuText
238+
$menu = New-CsAutoAttendantMenu -Name "AA menu2" -Prompts @($menuPrompt) -EnableDialByName -MenuOptions @($menuOption0,$menuOption1,$menuOption2)
239+
$callFlow = New-CsAutoAttendantCallFlow -Name "Default" -Menu $menu -Greetings $greetingPrompt
240+
```
241+
242+
This example creates a new AA named _Main auto attendant_ that has the following properties:
243+
244+
- It sets a default call flow.
245+
- It sets an after-hours call flow.
246+
- It sets a business hours options.
247+
- It references a call queue as a menu option.
248+
- The default language is en-US.
249+
- The time zone is set to Romance Standard.
250+
- It sets user1 as operator.
251+
- It has user2 also as a menu option.
252+
- The Auto Attendant is voice enabled.
253+
206254
## PARAMETERS
207255

208256
### -Name

0 commit comments

Comments
 (0)