Where do get api/java SDK to update user's preferred nane

We noticed that there is no api to update user's agent preferred name from any api documentation and Java SDK package, however, after seeking help from Genesys support, we noticed that there is a hidden api which can do the trick behind the scene, which is using

put action on
https://api.mypurecloud.com/api/v2/users/baddc38f-4d51-478d-90f2-4a03987776e3/profile

and the html body could be like
{"agent":{"name":[{"labelKey":"name","value":"John Doe","_id":"3OTpZJM6pZ2ZTwyQtwoy9I","tempId":"ember1504"}]},"version":31}

1 Like

You can use the PATCH operation on the /api/v2/users/{userId} endpoint. Provide version and name in the body and you can update the name in a fully supported way.

I haven't tried it but it looks like the java sdk supports that as well. https://developer.genesys.cloud/api/rest/client-libraries/java/UsersApi#patchUser

Hi Richard, thank you for your message. I have logged a ticket with the team that owns that API to expose the PUT endpoint to the public API. Until that time, I would not recommend that you use it, as undocumented endpoints can change any time without warning. Please use instead the PATCH endpoint that Shane referenced above.

Additionally, would you mind sharing with me the case number from your Care interaction? I would like to follow up.

Have a great day!

-Becky Powell, Director, Product Management

1 Like

there are a few case created for this manner,
0003020946
0002978762
0002990800

but they are all talking about one same thing, we need to have a public method to update agent preferred name from Java SDK. right now, there is no way we can achieve this.

Hello @anon28168572 , the solution you provide is not working for us, please verify from your end, please be noted, we are asking for "Agent name" update inside "Agent" section from people tab

Apologies, I didn't realize you were trying to update the Agent section. You can update the top level name field on the user record or event the name field within the HR section or "employerInfo" with the API. However, it doesn't appear that the agent section name can be updated with the same mechanism.

Correct. that is all what this topic talking about, we need to have a method to update this fields inside Java SDK. Thanks for your clarification on this.