V3 sdk behaves differently when unregistering/disconnecting a user

Hi,

We have recently upgraded to using v3 of the purecloud WebRTC sdk.

We're have been having trouble when attempting to disconnect using the sdk. With v1 we would call disconnect() and the agent would be logged out of Genesys and marked as Offline. In the new version they are taken off any queue, but their status is still Available.

Is this intended behaviour? If so how can we set them to offline?

Thanks

Yes. I apologize the documentation doesn't mention that. We will get that updated. In v1, the users "presence" was implicit. It now needs to be set explicitly. You can do that by sending and api request to update the user's presence to Offline. You can find more information in the purecloud api documentation, but you'd be looking for an api that looks like this:

PATCH /api/v2/users/{userId}/presences/{sourceId}

The sourceId can be anything you want, but in most cases you'd probably just want to use PURECLOUD for the sourceId. The body for the request would look something like this:

{
   "primary": true,
   "presenceDefinition": {
      "id": "<presence definition id for offline>"
   }
}

This topic was automatically closed after 30 days. New replies are no longer allowed.