Personalized Agent Information in Customer widget
Introduction
We've recently introduced a new feature to enhance the personalization of the customer widget. This feature allows for a dynamic display of the agent's name in the active chat view based on the configuration settings of the customer widget.
Configuration Variable
USERNAME_ENABLED
: A boolean configuration variable was added in theConfigMaps/ef-customer-widget-configmap.yaml
file and is used to control the display of the agent's name in the customer widget.
Add
USERNAME_ENABLED
in theenv
section ofDeployments/ef-customer-widget-deployment.yaml
CODE- name: USERNAME_ENABLED valueFrom: configMapKeyRef: key: USERNAME_ENABLED name: ef-customer-widget-cm
Delete and Apply the
ConfigMaps/ef-customer-widget-configmap.yaml
andDeployments/ef-customer-widget-deployment.yaml
files with the following commands to update the pods.kubectl delete -f ConfigMaps/ef-customer-widget-configmap.yaml -n expertflow
kubectl apply -f ConfigMaps/ef-customer-widget-configmap.yaml -n expertflow
kubectl delete -f Deployments/ef-customer-widget-deployment.yaml -n expertflow
kubectl apply -f Deployments/ef-customer-widget-deployment.yaml -n expertflow
Behavior-Based on Configuration
When
USERNAME_ENABLED
istrue
only the agent's username will be shown.Notification: The username will appear in the customer widget notifications.
Message Header: The username will also be displayed in the message header of the active chat view.
When
USERNAME_ENABLED
isfalse
the widget will display the agent's full name if available. If both the first and last names are empty, a default string of"AGENT"
will be shown.Notification: The full name (or "AGENT" if the name parts are missing) will be displayed in the notification section.
Message Header: The first name and last name as full name (or
"AGENT"
) will appear in the message header of the active chat view.
Detailed Display Logic
Active Chat View - Notifications
If
USERNAME_ENABLED
istrue
:Display:
Username
If
USERNAME_ENABLED
isfalse
:If
firstName
andlastName
are available:Display:
FirstName LastName
If
firstName
orlastName
is empty:Display: available name like
firstName
If
firstName
andlastName
both are empty:Display:
"AGENT"
Active Chat View - Message Header
If
USERNAME_ENABLED
istrue
:Display:
Username
If
USERNAME_ENABLED
isfalse
:If
firstName
andlastName
are available:Display:
FirstName LastName
If
firstName
orlastName
is empty:Display: available string like
firstName
orlastName
.
If
firstName
andlastName
are empty:Display:
"AGENT"
Example Scenarios
Scenario 1:
USERNAME_ENABLED
istrue
,username
is"john_doe"
,firstName
is"John"
,lastName
is"Doe"
Notification:
"john_doe"
Message Header:
"john_doe"
Scenario 2:
USERNAME_ENABLED
isfalse
,username
is"john_doe"
,firstName
is"John"
,lastName
is"Doe"
Notification:
"John Doe"
Message Header:
"John Doe"
Scenario 3:
USERNAME_ENABLED
isfalse
,username
is"john_doe"
,firstName
is"John"
,lastName
is""
Notification:
"John"
Message Header:
"John"
Scenario 3:
USERNAME_ENABLED
isfalse
,username
is"john_doe"
,firstName
is""
,lastName
is"Doe"
Notification:
"Doe"
Message Header:
"Doe"
Scenario 4:
USERNAME_ENABLED
isfalse
,username
is"john_doe"
,firstName
is""
,lastName
is""
Notification:
"AGENT"
Message Header:
"AGENT"
This feature allows for a customizable and personalized experience for users interacting with the customer widget, based on the configMaps of the Customer Widget.