amazon-connect / amazon-connect-chat-ui-examples

Examples of how to create and customize the customer side chat for Amazon Connect
Other
150 stars 214 forks source link

Changing the Agent display name #243

Open seanhufnagel opened 1 week ago

seanhufnagel commented 1 week ago

I am initiating a chat to a contact flow where I ask the customer what they need help with via Lex bot and then the call is routed to an agent. The Lex bot prompts appear with the display name of "Agent" and I am not seeing anywhere in the code where that is defined. When the call is routed to an agent the agent's display name appears correctly. Is it possible to modify the display name of "Agent" anywhere in the configurations?

haomingli2020 commented 3 days ago

Hi @seanhufnagel,

Are you using a custom solution or the hosted widget? For hosted widgets, the default bot display name can be overriden by passing a customDisplayNames object in the widget snippet. See the steps here - https://docs.aws.amazon.com/connect/latest/adminguide/pass-custom-styles.html#pass-override-system. For custom widgets, the rendering logic is in our chat-interface package. You can update the code here and change itemDetails.displayName ifitemDetails.participantRole is "SYSTEM".

seanhufnagel commented 3 days ago

I am using a custom solution. I was able to find the participant role and update that accordingly. Thanks for your guidance. Do you also know where it is configured that it displays the Agent's first name? I am wanting to update that to include their last name.

haomingli2020 commented 2 days ago

Agent's first name and last name are configured in the Connect admin console, under user management. You can follow the guides here to edit existing users https://docs.aws.amazon.com/connect/latest/adminguide/user-management.html.

seanhufnagel commented 2 days ago

Correct. I meant in the chat widget. When you are chatting with an agent it displays their first name in the chat widget. Do you know where that is configured?

haomingli2020 commented 2 days ago

I see. This is not controlled by the chat widget. The websocket payload that's sent by the Connect chat backend only includes the first name of the agent and that's by design. Currently there's no way to update that behavior from customer end. As a workaround, you can put full name as the first name in the user management page. Let me know if that won't work for your use case. We can create a backlog task and bring it up with the backend team if this is high priority.