简体   繁体   中英

How to add and remove a user from multiple Call Queues at a time using RingCentral?

I have multiple RingCentral Call Queues and I want to build an app that allows users add and remove themselves from a set of pre-configured queues. This is a mobile app that users will use and set their queue availability based on their physical location in a store, with each queue corresponding to a department so users can change the queues themselves as they move between departments.

Given a list of Call Queues, I can update each queue at a time using the following API:

Assign Multiple Call Queue Members API

POST /restapi/v1.0/account/{accountId}/call-queues/{groupId}/bulk-assign

However, this can be a bit inefficient as updating each user may result in one API call per queue.

Is there a way to add/remove a user from multiple queues with one API call?

The following API can be used. This adds and removes the user as a queue member.

Join/Leave Call Queue API

The following API will set a full use queue membership for all queues. The user will be a member of all queues listed and not a member for any queue not listed.

PUT /restapi/v1.0/account/{accountId}/extension/{extensionId}/call-queues

{
  "records": [
    {"id":"11111111"},
    {"id":"22222222"}
  ]
}

The response will look something like the following:

{
  "records": [ {
    "id": "12345678",
    "name": "Bakery"
  }, {
    "id": "87654321",
    "name": "Cafe"
  } ]
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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