RoutingApi.getRoutingQueueUsers - Expand not working correctly

Hi,

I am not able to expand 'presence' and 'routingStatus' when using the SDK, I can use one or the other, but not both. However, this works when using the API Explorer.

When using the API Explorer the query strings are structured as follows:

api/v2/routing/queues/{QUEUE_ID}/users?expand=presence%2CroutingStatus (comma-separated)

While the SDK uses this format:

/api/v2/routing/queues/{QUEUE_ID}/users?expand=presence&expand=routingStatus

This is the code I tested with:

const pureCloudPlatform = require("purecloud-platform-client-v2");

const { CLIENT_ID, CLIENT_SECRET, QUEUE_ID } = process.env;

const getUsers = async () => {
  const client = pureCloudPlatform.ApiClient.instance;
  client.setEnvironment("mypurecloud.ie");
  client.setDebugLog(console.log);
  client.setReturnExtendedResponses(true);

  await client.loginClientCredentialsGrant(CLIENT_ID, CLIENT_SECRET);

  const routingApi = new pureCloudPlatform.RoutingApi();
  const queueMembersResponse = await routingApi.getRoutingQueueUsers(QUEUE_ID, {
    expand: ["presence", "routingStatus"]
  });
};

getUsers();

This works fine when using the UsersApi:

const usersResponse = await usersApi.getUsers({
    expand: ["presence", "routingStatus"]
});

It's a bug with the API not accepting the parameters correctly. I've opened AS-1109 to have it supported correctly.

1 Like

Hi Tim,

I just noticed that the presence filter property has the same issue. Is there somewhere I can follow up on the progress of the issue or can you post here when the it's resolved?

I've made a note in the issue to be sure to consider all of the array query params on the resource.

There isn't a way for you to check the status of issues. This one is in progress. This forum post is linked, but it's up to the developer working on the issue to choose to report back to this thread when it's done.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.