简体   繁体   English

如何获得 RingCentral 呼叫队列成员可用性?

[英]How to get RingCentral Call Queue Members Availability?

How can I get the Call Queue availability for queue members per queue which is shown in the Online Account Portal?我如何获得在线帐户门户中显示的每个队列的队列成员的呼叫队列可用性? I specifically want the Available , Busy and Unavailable statuses shown in the UI under "Members Availability" per queue.我特别希望每个队列的“成员可用性”下的 UI 中显示AvailableBusyUnavailable状态。

I've found a few Call Queue APIs that can list queues and queue members but they provide member availability like the UI.我发现了一些可以列出队列和队列成员的呼叫队列 API,但它们提供了像 UI 一样的成员可用性。

Call Queue APIs:调用队列 API:

The image below is from the article on Call Queue - User Availability and Call Handling下图来自“ 呼叫队列 - 用户可用性和呼叫处理”一文

RingCentral 呼叫队列成员可用性

The above is on the right track.以上是正确的轨道。 Once the list of queue members is available, you can query each user for his or her queue availability.队列成员列表可用后,您可以查询每个用户的队列可用性。

Note: A user's queue availability as presented below is the same for all queues they are present on so to do a presentation by queue, this information needs to be combined with their queue membership list.注意:如下所示,用户的队列可用性对于他们所在的所有队列都是相同的,因此要按队列进行演示,此信息需要与他们的队列成员列表相结合。 This can be retrieved from the queue or user perspective:这可以从队列或用户角度检索:

To manage individual queue availability, add/remove the user from the queues of interest which can be done using the Edit Call Queue Members API .要管理单个队列的可用性,可以使用Edit Call Queue Members API从感兴趣的队列中添加/删除用户。

For both steps query the Get User Status API.对于这两个步骤,请查询获取用户状态 API。 An example is provided below.下面提供了一个示例。

Get User Status API:获取用户状态 API:

An example request and response looks like the following:示例请求和响应如下所示:

Request:要求:

GET /restapi/v1.0/account/{accountId}/extension/{extensionId}/presence

Response:回复:

HTTP 200 OK

{
  "uri": "https://platform.ringcentral.com/restapi/v1.0/account/403228676008/extension/403228676008/presence",
   "extension":    {
      "uri": "https://platform.ringcentral.com/restapi/v1.0/account/403228676008/extension/403228676008",
      "id": 403228676008,
      "extensionNumber": "101"
   },
   "presenceStatus": "Available",
   "telephonyStatus": "NoCall",
   "userStatus": "Available",
   "dndStatus": "TakeAllCalls",
   "allowSeeMyPresence": true,
   "ringOnMonitoredCall": false,
   "pickUpCallsOnHold": true
}

Use the following to get the user's queue availability:使用以下命令获取用户的队列可用性:

1) User Queue Setting 1) 用户队列设置

The user's Do Not Disturb dndStatus property is used for indicating whether the user is accepting or not accepting calls, including for call queues.用户的请勿打扰dndStatus属性用于指示用户是否接受呼叫,包括呼叫队列。 The user can set their dndStatus to be one of the four following values where "Department" is another name for Call Queue:用户可以将他们的dndStatus设置为以下四个值之一,其中“部门”是呼叫队列的另一个名称:

  • DoNotAcceptAnyCalls
  • DoNotAcceptDepartmentCalls
  • TakeAllCalls
  • TakeDepartmentCallsOnly

This can roughly be mapped to:这可以大致映射为:

  • Unavailable for Queue Calls: DoNotAcceptAnyCalls or DoNotAcceptDepartmentCalls DoNotAcceptAnyCalls用于队列呼叫: DoNotAcceptAnyCallsDoNotAcceptDepartmentCalls
  • Available for Queue Calls: TakeAllCalls or TakeDepartmentCallsOnly可用于队列呼叫: TakeAllCallsTakeDepartmentCallsOnly

2) User Overall Availability 2) 用户总体可用性

The next step is to check the presenceStatus property which is an enumerated string with the following values: Offline , Busy , Available .下一步是检查presenceStatus属性,它是一个枚举字符串,具有以下值: OfflineBusyAvailable Offline maps to Unavailable in the UI. Offline映射到 UI 中的Unavailable用。 This is an overall availability for both personal calls and queue calls.这是个人呼叫和队列呼叫的整体可用性。

3) Queue Member Availability 3) 队列成员可用性

To create the queue member availability, combine the two properties above like the following pseudocode.要创建队列成员可用性,请像以下伪代码一样组合上述两个属性。

I added an extra "Available" condition below which is strictly not needed, but useful for explanation:我在下面添加了一个额外的“可用”条件,这是绝对不需要的,但对解释很有用:

member_availability = 
  user.dndStatus == "DoNotAcceptAnyCalls"        ? "Unavailable" :
  user.dndStatus == "DoNotAcceptDepartmentCalls" ? "Unavailable" :
  user.presenceStatus == "Offline"               ? "Unavailable" :
  user.presenceStatus == "Busy"                  ? "Busy" :
  user.presenceStatus == "Available"             ? "Available" : "Available"

This gives the user's availability for all queues they are on so this needs to be mapped to either a queue members list or the user's list of queues.这为用户提供了他们所在的所有队列的可用性,因此需要将其映射到队列成员列表或用户的队列列表。

Example Code示例代码

Here's some Ruby wrapper code I wrote to make it easier to update the user's queue status here:这是我编写的一些 Ruby 包装器代码,以便更轻松地在此处更新用户的队列状态:

RingCentral Ruby SDK extension_presence.rb RingCentral Ruby SDK extension_presence.rb

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM