I want to change user seconday presence via Java API call

Hi Team,

I want to know or confirm patchUserPresence(userId, sourceId, body) can change specific user secondaly presence.
userId: target user that I want to change secondaly presence
sourceId: secondary presence source ID
body: contains secondaly presence ID that I want to set.

Above my understanding is correct?

Hello,

Yes, you would use patchUserPresence(userId, sourceId, body).

The request would have to use the following parameters:

String userId = "target user that you want to change secondary presence"; // String | user Id

String sourceId = "PURECLOUD"; // String | Presence source ID for Genesys Cloud presence

UserPresence body = new UserPresence(); // UserPresence | User presence
body.presenceDefinition = new PresenceDefinition(); // I don't have a java environment and I haven't practiced it for a while so I don't know for sure if the new is necessary for the PresenceDefinition object
body.presenceDefinition.id = "presence id that you want to set"

You can obtain the available presenceDefinition.id using getPresenceDefinitions and use the id of the one you want to set.
This request returns primary and secondary statuses.

Regards,

Hello Jerome,

Many thanks detail information. I understood how to use patchUserPresence().

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