Additional customizations for your Amazon Connect
chat widget
You can add the following optional customizations to your chat user interface:
-
Display the End chat button in the header dropdown menu instead of in the footer.
-
Mask or hide display names.
-
Add message icons.
-
Override event messages.
Configure the customization
object
This example shows how to implement some of the optional customizations. For a
list of all possible customizations, see Supported options and
constraints. Because these
customizations are optional, you can implement some or all of the fields shown in
the following example. Replace the eventNames.customer
,
eventNames.agent
, eventNames.supervisor
,
eventMessages.participantJoined
,
eventMessages.participantDisconnect
,
eventMessages.participantLeft
,
eventMessages.participantIdle
,
eventMessages.participantReturned
, and
eventMessages.chatEnded
strings as needed. Icons must be hosted on
public URLs.
amazon_connect('customizationObject', {
header: {
dropdown: true,
dynamicHeader: true,
},
transcript: {
hideDisplayNames: false,
eventNames: {
customer: "User
",
agent: "Webchat Agent
",
supervisor: "Webchat Supervisor
"
},
eventMessages: {
participantJoined: "{name} has joined the chat",
participantDisconnect: "",
participantLeft: "{name} has dropped",
participantIdle: "{name}, are you still there?",
participantReturned: "",
chatEnded: "Chat ended",
},
displayIcons: true,
iconSources: {
botMessage: "imageURL
",
systemMessage: "imageURL
",
agentMessage: "imageURL
",
customerMessage: "imageURL
",
},
},
composer: {
disableEmojiPicker: true,
disableCustomerAttachments: true,
},
footer: {
disabled:true,
skipCloseChatButton: true,
}
});
The following image shows how the customizations look if you use the example:

Supported options and
constraints
The following table lists the supported customization fields and recommended value constraints.
Custom layout option | Type | Description |
---|---|---|
|
Boolean |
Renders the header dropdown menu instead of the default footer NoteWhen you set this option to |
|
Boolean | Dynamically sets the header title to "Chatting with Bot/AgentName" |
|
Boolean | Hide the download
transcript button in the header dropdown menu. The
default value is false . |
|
Boolean |
Hides all display names, will apply default name masks if
|
|
String |
Masks the display name of customer |
|
String |
Masks the display name of agent |
|
String |
Masks the display name of supervisor |
|
String |
Overrides event message in the transcript for when a
participant has joined the chat. If an empty string is
specified, the event message will be omitted from the
transcript. |
|
String |
Overrides event message in the transcript for when a
participant is disconnected from the chat. If an empty string is
specified, the event message will be omitted from the
transcript. |
|
String |
Overrides event message in the transcript for when a
participant has left the chat. If an empty string is specified,
the event message will be omitted from the transcript.
|
|
String |
Overrides event message in the transcript for when a
participant is idle. If an empty string is specified, the event
message will be omitted from the transcript. |
|
String |
Overrides event message in the transcript for when a
participant has returned to the chat. If an empty string is
specified, the event message will be omitted from the
transcript. |
|
String |
Overrides event message in the transcript for when the chat
has ended. If an empty string is specified, the event message
will be omitted from the transcript. |
|
Boolean |
Enables message display icons |
|
String |
Icon displayed for bot messages, must be hosted on a public URL |
|
String |
Icon displayed for system message, must be hosted on a public URL |
|
String |
Icon displayed for agent message, must be hosted on a public URL |
|
String |
Icon displayed for customer message, must be hosted on a public URL |
|
Boolean |
Disables the emoji picker when using the rich text editor |
|
Boolean |
Prevents customers from sending or uploading attachments |
|
Boolean |
Hides the default footer and End chat button |
|
Boolean |
Directly closes the widget on click of End chat button instead of showing Close button |