What is the meaning
Of life? Please say "French" to hear
The answer in French.
Today's haiku is all about the big questions in life. You know, questions like, "Why are we here?" "Is there life after death?" "What is the air-speed velocity of an unladen swallow?" Those big questions that have perplexed men and women for centuries.
Note. Well, except for the swallow question, which is taken from Monty Python and the Holy Grail, and seems to be more a guy thing; women don't quite get as caught up in that movie as guys do. Need proof? Then do this: walk up to a group of guys and say (using the proper tone of voice, of course) "We want … a shrubbery!" Those guys are guaranteed to crack up laughing. Now do the same thing with a group of women. Most likely they'll just stare at you and say, "What? Is that supposed to be funny? Is that from some movie or something?"
Women just don't get it.
By the way the correct answer to the swallow question is, "What do you mean? An African or a European swallow?" And, really, how can you not find that hilarious?
Of course, by now you're probably thinking to yourself, "Wow, how can I learn to write questions that will perplex men and women for centuries?" To be honest, we don't know. After many, many years of trying, we've only been able to come up with one:
"If someone was trying to tell people about Lync Server PowerShell, why in the world would they do so by writing haikus?"
Perplexing, yes, but perhaps not quite on the same level as "What is the meaning of life?"
However, while we can't help you come up with one of those big questions, we can do the next best thing: we can tell you how to use the New-CsRgsQuestion cmdlet to write new questions for use with Lync Server's Response Group application.
In yesterday's haiku, we showed you how to write Response Group answers; today we'll show you to associate those answers with a question. (Yeah, just like Jeopardy: first the answer, then the question.) If you missed yesterday's haiku (for shame!), let's recap. When someone calls a phone number associated with the Response Group application, you have the option of posing a question; for example, "Would you like English or Spanish? Say English or Spanish, or press 1 for English or 2 for Spanish." Yesterday we showed you how to write answers to that question; that is, how to tell the Response Group application what action to take if the user says English (or presses 1), and what action to take if the user says Spanish (or presses 2). The answers (which we won't bother to explain today; see yesterday's haiku for more information) will look something like this:
$w = New-CsRgsPrompt -TextToSpeechPrompt "Please hold while we transfer your call."
$englishQueue = Get-CsRgsQueue -Identity service:ApplicationServer:atl-cs-001.litwareinc.com -Name "English Help Desk"
$spanishQueue = Get-CsRgsQueue -Identity service:ApplicationServer:atl-cs-001.litwareinc.com -Name "Spanish Help Desk"
$englishCallAction = New-CsRgsCallAction -Prompt $w -Action TransferToQueue -QueueID $englishQueue.Identity
$englishAnswer = New-CsRgsAnswer -Action $englishCallAction -DtmfResponse 1 -VoiceResponseList English -Name "English Caller"
$spanishCallAction = New-CsRgsCallAction -Prompt $w -Action TransferToQueue -QueueID $spanishQueue.Identity
$spanishAnswer = New-CsRgsAnswer -Action $spanishCallAction -DtmfResponse 2 -VoiceResponseList English -Name "Spanish Caller"
Basically all we've done here is create object references to two different Response Group queues (English Help Desk and Spanish Help Desk); we've also created a pair of answers and call actions that will direct callers to the appropriate queue based on their response to the queue question. The only thing missing? The question itself.
Note. Which reminds us of the classic book The Hitchhiker's Guide to the Galaxy, in which – after 7.5 million years of thinking – the computer Deep Thought spits out the Ultimate Answer: 42. The only problem with that? No one has any idea what the Ultimate Question is.
In fact, for all we know this might be the Ultimate Question. (And, if not, it can still be used with the Response Group application. Waste not, want not!)
Here's the question:
$prompt = New-CsRgsPrompt -TextToSpeechPrompt "Would you like English or Spanish? Say English or Spanish, or press 1 for English or 2 for Spanish."
$question = New-CsRgsQuestion -Prompt $prompt -AnswerList $englishAnswer, $spanishAnswer
Writing a question is actually fairly straightforward. In the first line of code, we use the New-CsRgsPrompt cmdlet to compose the actual question that the caller will hear. In this case, we've defined the question using the TextToSpeechPrompt parameter; that means that the Response Group application (using its best computer voice) will read the question out loud to the user. Alternatively, we could record that question as a .WAV or .WMA file and have the computer play that recording to the caller. See the help topic for the New-CsRgsPrompt cmdlet for more information.
After we've created the prompt we then use New-CsRgsQuestion to create the actual question. We need to include two parameters here: Prompt, which specifies the prompt to be played to the callers; and AnswerList, which includes all the allowed answers to the question. Note that we include two answers here, separating the two using commas. Why two answers? You got it: because we need to have one answer (and one set of actions) if the caller picks English, and a second answer (and a second set of actions) if the caller picks Spanish.
So now, two haikus later, do we finally have a question? You bet we do. But there is one thing: that question won't actually get used until we assign it to a call action and then assign that call action to a workflow and a queue and, well, we think we mentioned yesterday that the Response Group application can get a bit complicated at times. But that's OK: while it might be complicated, it's definitely not impossible, and we'll keep working our way through it, bit-by-bit, until you're finally ready to put it all together.
And if that isn't good enough for you, well, then all we can say is this: "Your mother was a hamster, and your father smelt of elderberries!"
Note. Don't worry about it. It's a guy thing.