Agent's first name

Looking at the scripter documentation (Built-in script variables - Genesys Cloud Resource Center), it appears that only the agent's full name is available, {{Scripter.Agent Name}}. Has anyone found a way to extract only the agent's first name?

Hello,

The first name and last name of a user are not saved in a Genesys Cloud user object.
Only the full name is available.
You can the schema of a user object in the Responses - 200 successful operation - Schema of the Get User API endpoint.

If there is a fixed/known separator between first name and last name, some logic to distinguish the first name from the rest of the full name, or if the first name is always a single word (I mean string without spaces), you could use a Dynamic variable in your Script. There are functions to manipulate a string.
Otherwise, I don't think it is possible.

If first name is always the first word (no space in the first name), you could use something like this: slice({{Scripter.Agent Name}},0,indexOf({{Scripter.Agent Name}}, " "))

Regards,

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