Lync Server Admin Guide: Managing Response Groups


 

 

Managing Agent Groups

 

Create an Agent Group

 

  • To create an agent group

 

To create a new Response Group agent group, use the New-CsRgsAgentGroup cmdlet. This command uses the AgentsByUri parameter to add individual users to the agent group:

 

New-CsRgsAgentGroup -Parent service:ApplicationServer:atl-cs-001.litwareinc.com -Name “Help Desk Group” -AgentsByUri “sip:kenmyer@litwareinc.com”,”sip:pilarackerman@litwareinc.com”

 

By comparison, this command uses the DistributionGroupAddress parameter to add all the members of the helpdesk@litwareinc.com distribution group to the agent group:

 

New-CsRgsAgentGroup -Parent service:ApplicationServer:atl-cs-001.litwareinc.com -Name “Help Desk Group” -DistributionGroupAddress “helpdesk@litwareinc.com”

 

 

Change Agent Group Settings or Members

 

  • To change agent group settings or membership

 

To change a Response Group agent group you must first use the Get-CsRgsAgentGroup cmdlet to retrieve an object reference to the agent group to be changed. After making your changes in memory, use the Set-CsRgsAgentGroup cmdlet to write those changes to Lync Server.

 

These commands change the routing method for an agent group:

 

$x = Get-CsRgsAgentGroup -Identity service:ApplicationServer:atl-cs-001.litwareinc.com -Name “Help Desk”

$x.RoutingMethod = “RoundRobin”

Set-CsRgsAgentGroup -Instance $x

 

This set of commands changes the distribution address for an agent group:

 

$x = Get-CsRgsAgentGroup -Identity service:ApplicationServer:atl-cs-001.litwareinc.com -Name “Help Desk”

$x.DistributionGroupAddress = “helpdesk@litwareinc.com”

Set-CsRgsAgentGroup -Instance $x

 

The following commands add a new agent to an agent group:

 

$x = Get-CsRgsAgentGroup -Identity service:ApplicationServer:atl-cs-001.litwareinc.com -Name “Help Desk”

$x.AgentsByUri.Add(“sip:kenmyer@litwareinc.com”)

Set-CsRgsAgentGroup -Instance $x

 

And these commands remove an agent from an agent group:

 

$x = Get-CsRgsAgentGroup -Identity service:ApplicationServer:atl-cs-001.litwareinc.com -Name “Help Desk”

$x.AgentsByUri.Remove(“sip:kenmyer@litwareinc.com”)

Set-CsRgsAgentGroup -Instance $x

 

 

Delete an Agent Group

 

  • To delete an agent group

 

To remove a Response Group agent group, use the Remove-CsRgsAgentGroup cmdlet:

 

Get-CsRgsAgentGroup -Identity service:ApplicationServer:atl-cs-001.litwareinc.com -Name “Help Desk” | Remove-CsRgsAgentGroup

 

This command deletes all the agent groups currently configured for use in your organization:

 

Get-CsRgsAgentGroup | Remove-CsRgsAgentGroup

 

 

For more information

 

 

 

 

 

Managing Response Group Queues

 

Create a Response Group Queue

 

  • To create a queue

 

To create a new Response Group queue, use the New-CsRgsQueue cmdlet. The following set of commands creates a new queue, and uses the New-CsRgsCallAction cmdlet to specify what should happen if the queue receives too many calls at the same time:

 

$x = New-CsRgsCallAction -Action TransferToVoicemailUri -Uri “sip:+14255551298@litwareinc.com”

 

New-CsRgsQueue -Parent service:ApplicationServer:atl-cs-001.litwareinc.com -Name “Help Desk” -OverflowCandidate “OldestCall” -OverflowAction $x -OverflowThreshold 2

 

 

Change a Response Group Queue

 

  • To change a queue

 

To modify a Response Group queue, you must first use the Get-CsRgsQueue cmdlet to retrieve an object reference to the queue to be changed. After making your changes in memory, use the Set-CsRgsQueue cmdlet to write those changes to Lync Server:

 

$x = Get-CsRgsQueue -Identity Service:ApplicationServer:atl-cs-001.litwareinc.com -Name “Help Desk”

$x.OverflowCandidate = “NewestCall”

 

Set-CsRgsQueue -Instance $x

 

 

Delete a Response Group Queue

 

  • To delete a queue

 

To delete a Response Group queue, use the Remove-CsRgsQueue cmdlet:

 

Get-CsRgsQueue -Identity service:ApplicationServer:atl-cs-001.litwareinc.com -Name “Help Desk Queue” | Remove-CsRgsQueue

 

The following command removes all the Response Group queues configured for use in your organization:

 

Get-CsRgsQueue | Remove-CsRgsQueue

 

 

For more information

 

 

 

 

 

Managing Response Group Workflows

 

Create a Response Group Workflow

 

Create a Hunt Group Workflow

 

  • To create a hunt group workflow

 

To create a hunt group workflow, use the New-CsRgsWorkflow cmdlet:

 

$prompt = New-CsRgsPrompt -TextToSpeechPrompt “Welcome to the help desk.”

 

$queue = (Get-CsRgsQueue -Identity service:ApplicationServer:atl-cs-001.litwareinc.com -Name “Help Desk”).Identity

 

$callAction = New-CsRgsCallAction -Prompt $prompt -Action TransferToQueue -QueueId $queue

 

New-CsRgsWorkflow -Parent service:ApplicationServer:atl-cs-001.litwareinc.com -Name “Help Desk” -PrimaryUri “sip:helpdesk@litwareinc.com” -DefaultAction $callAction

 

Create an Interactive Workflow

 

  • To create an Interactive workflow

 

To create an interactive workflow, use the New-CsRgsWorkflow cmdlet:

 

$ServiceId = “service:ApplicationServer:rtc.contoso.com”

 

$Group_Sales = New-CsRgsAgentGroup -Parent $ServiceId -Name “Contoso Sales” -AgentAlertTime 20 -ParticipationPolicy Informal -RoutingMethod LongestIdle -AgentsByUri(“sip:franz@contoso.com”,”sip:marco@contoso.com”)

 

$Group_Support = New-CsRgsAgentGroup -Parent $ServiceId -Name “Contoso Support” -AgentAlertTime 20 -ParticipationPolicy Informal -RoutingMethod LongestIdle -AgentsByUri(“sip:david@contoso.com”,”sip:john@contoso.com”)

 

$Queue_Sales = New-CsRgsQueue -Parent $ServiceId -Name “Contoso Sales”

-AgentGroupIDList($Group_Sales.Identity)

 

$Queue_Support = New-CsRgsQueue -Parent $ServiceId -Name “Contoso Support” -AgentGroupIDList($Group_Support.Identity)

 

$PromptA1 = New-CsRgsPrompt -TextToSpeechPrompt “Please wait while we’re connecting you with the Contoso Sales department.”

 

$ActionA1 = New-CsRgsCallAction -Prompt $PromptA1 -Action TransferToQueue -QueueID $Queue_Sales.Identity

 

$Answer1 = New-CsRgsAnswer -Action $ActionA1 -DtmfResponse 1

 

$PromptA2 = New-CsRgsPrompt -TextToSpeechPrompt “Please wait while we’re connecting you with the Contoso Support department.”

 

$ActionA2 = New-CsRgsCallAction -Prompt $PromptA2 -Action TransferToQueue -QueueID $Queue_Support.Identity

Comments (4)
  1. Remove users from multiple response groups using user variable says:

    $cred = Get-Credential “Domain/User”

    $session = New-PSSession -ConnectionURI “https://Lync Server FQDN/OcsPowershell” -Credential $cred

    Import-PsSession $session

    # Set $total to 0

    $total = 0

    # Set New User Variable

    $newuser = "sip:lync.test1@test.com"

    $newuser

    # Identify Response Groups containing the user specified in $newuser

    $FindGroups = Get-CsRgsAgentGroup | Where-Object {$_.AgentsByUri -eq $newuser}

    $Findgroups

    # Count Number Of Response Groups Agent Is A Member Of

    $total = $FindGroups.count

    # Start Loop

    Do {

    $current = $total-1

    $currentgroup = $FindGroups[$current]

    $CurrentGroup.AgentsByUri.Remove("$newuser")

    Set-CsRgsAgentGroup -Instance $Currentgroup

    $total = $total-1

    }

    While ($total -gt 0)

  2. LyncAdmin says:

    One important question, how to manage group members in cases:

    – user gets new SIP address (seems to be not updated).

    – user object is removed, …it is not remove from the RGS???

  3. abdul says:

    I am having error while creating the queue. Issue is with the “AgentGroupIDList” parameter. Issue is “Timeout Expired”. Please see the powershell script below and suggest how to assign AgentGroupIDList to the command:
    New-CsRgsQueue -Name ‘QueueName’ -Parent ‘parent1’ -AgentGroupIDList service:applicationserver:pool1/8aa77d84-0529-4501-8ecb-414ac12669d9,service:applicationserver:pool1/6a8b8a4e-03df-44b4-b368-baa2a6e80b88,service:applicationserver:pool1/62150804-c588-44a0-952e-f8e0dc3e32a1
    Thanks in advance.

  4. abdul says:

    Resolved the issue by restarting Lync server. But still wanted to know why it was behaving like that when it was working fine without using “AgentGroupIDList” parameter while creating a queue…

Comments are closed.

Skip to main content