Amazon Connect 聊天小工具的其他自訂 - Amazon Connect

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

Amazon Connect 聊天小工具的其他自訂

您可以將下列選用的自訂新增至聊天使用者介面:

  • 在標頭下拉式功能表,顯示結束聊天按鈕,而不是在頁腳中。

  • 遮蓋或隱藏顯示名稱。

  • 新增訊息圖示。

  • 覆寫事件訊息。

  • 設定會在客戶選擇結束聊天按鈕時顯示的確認對話方塊。此對話方塊會確認客戶是否真的要結束聊天工作階段。您可以自訂確認對話方塊、標題、訊息和按鈕文字。

  • 覆寫附件拒絕訊息。

設定自訂物件

此範例說明如何實作部分選用的自訂。如需所有可能自訂的清單,請參閱 支援的選項和限制。由於這些自訂是選用的,您可以實作下列範例中顯示的部分或所有欄位。視需要取代 eventNames.customereventNames.agenteventNames.supervisoreventMessages.participantJoinedeventMessages.participantDisconnecteventMessages.participantLefteventMessages.participantIdleeventMessages.participantReturnedeventMessages.chatEnded 字串。圖示必須在公共 URL 上受管。

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, alwaysHideToolbar: true, }, footer: { disabled:true, skipCloseChatButton: true, }, endChat: { enableConfirmationDialog: true, confirmationDialogText: { title: "End Chat", message: "Are you sure you want to end this chat?", confirmButtonText: "End Chat", cancelButtonText: "Cancel", }, }, attachment: { // Default rejectedErrorMessage: Attachment was rejected. rejectedErrorMessage: "Custom Error Message: Files cannot exceed 15 MB." //this is customizable attribute } });

下圖顯示如果您使用此範例,自訂的外觀:

顯示可自訂的顯示名稱、功能表位置、圖示和結束聊天確認對話方塊的圖表。

支援的選項和限制

下表會列出支援的自訂欄位和建議的數值條件限制。

自訂配置選項 Type 描述

header.dropdown

Boolean

呈現標頭下拉式功能表,而不是預設的頁腳

注意

當您將此選項設定為 true 時,文字記錄下載按鈕會出現並可見,直到您將選項設定為 false,或直到您移除該選項為止。

header.dynamicHeader

Boolean 將標頭標題動態設定為「與 Bot/AgentName 聊天」。

header.hideTranscriptDownloadButton

Boolean 隱藏標頭下拉式功能表中的下載文字記錄按鈕。預設值為 false

transcript.hideDisplayNames

Boolean

隱藏所有顯示名稱,如果 eventNames 未提供,將套用預設名稱遮罩。

transcript.eventNames.customer

String

遮蓋客戶的顯示名稱。

transcript.eventNames.agent

String

遮蓋客服人員的顯示名稱。

transcript.eventNames.supervisor

String

遮蓋主管的顯示名稱。

transcript.eventMessages.participantJoined

String

覆寫文字記錄中關於參與者加入聊天時的事件訊息。如果指定空白字串,則會在文字記錄中省略事件訊息。{name} 可以傳入訊息中,且將取代為對應參與者的顯示名稱。預設訊息為 {name} has joined the chat

transcript.eventMessages.participantDisconnect

String

覆寫文字記錄中關於參與者聊天連線中斷時的事件訊息。如果指定空白字串,則會在文字記錄中省略事件訊息。{name} 可以傳入訊息中,且將取代為對應參與者的顯示名稱。預設訊息為 {name} has been idle too long, disconnecting

transcript.eventMessages.participantLeft

String

覆寫文字記錄中關於參與者退出聊天時的事件訊息。如果指定空白字串,則會在文字記錄中省略事件訊息。{name} 可以傳入訊息中,且將取代為對應參與者的顯示名稱。預設訊息為 {name} has left the chat

transcript.eventMessages.participantIdle

String

覆寫文字記錄中關於參與者閒置時的事件訊息。如果指定空白字串,則會在文字記錄中省略事件訊息。{name} 可以傳入訊息中,且將取代為對應參與者的顯示名稱。預設訊息為 {name} has become idle

transcript.eventMessages.participantReturned

String

覆寫文字記錄中關於參與者返回聊天時的事件訊息。如果指定空白字串,則會在文字記錄中省略事件訊息。{name} 可以傳入訊息中,且將取代為對應參與者的顯示名稱。預設訊息為 {name} has returned

transcript.eventMessages.chatEnded

String

覆寫文字記錄中關於聊天結束時的事件訊息。如果指定空白字串,則會在文字記錄中省略事件訊息。{name} 可以傳入訊息中,且將取代為對應參與者的顯示名稱。預設訊息為 Chat has ended!

transcript.displayIcons

Boolean

啟用訊息顯示圖示。

transcript.iconSources.botMessage

String

為機器人訊息顯示的圖示必須託管於公開 URL 上。

transcript.iconSources.systemMessage

String

為系統訊息顯示的圖示必須託管於公開 URL 上。

transcript.iconSources.agentMessage

String

為客服人員訊息顯示的圖示必須託管於公開 URL 上。

transcript.iconSources.customerMessage

String

為客戶訊息顯示的圖示必須託管於公開 URL 上。

composer.alwaysHideToolbar

Boolean

隱藏包含文字樣式功能的格式工具列,例如粗體、斜體,以及項目符號和編號清單選項。

composer.disableEmojiPicker

Boolean

使用 RTF 文字編輯器時停用表情符號選擇器。

composer.disableCustomerAttachments

Boolean

防止客戶傳送或上傳附件。

footer.disabled

Boolean

隱藏結束聊天按鈕的預設頁腳。

footer.skipCloseChatButton

Boolean

按一下結束聊天按鈕即可直接關閉小工具,而不顯示關閉按鈕。

endChat.enableConfirmationDialog

Boolean 啟用結束聊天確認對話方塊。若未提供 confirmationDialogText,則使用預設文字。

endChat.confirmationDialogText.title

String 覆寫結束聊天確認對話方塊的標題。

endChat.confirmationDialogText.message

String 覆寫結束聊天確認對話方塊的訊息。

endChat.confirmationDialogText.confirmButtonText

String 覆寫結束聊天確認對話方塊中的確認按鈕文字。

endChat.confirmationDialogText.cancelButtonText

String 覆寫結束聊天確認對話方塊中的取消按鈕文字。

attachment.rejectedErrorMessage

String 覆寫聊天小工具附件拒絕的錯誤訊息。