public static class

ChatUIConfiguration.Builder

extends Object
java.lang.Object
   ↳ com.salesforce.android.chat.ui.ChatUIConfiguration.Builder

Class Overview

Build a new ChatUIConfiguration instance.

Summary

Public Constructors
Builder()
Public Methods
ChatUIConfiguration.Builder allowBackgroundNotifications(boolean enabled)
*OPTIONAL** Determines whether the session will post local notifications on selected chat events.
ChatUIConfiguration build()
Build a ChatUIConfiguration instance using the provided parameters.
ChatUIConfiguration.Builder chatBotAvatar(int chatBotAvatarDrawableId)
**OPTIONAL** Sets a custom avatar for chat bots when messages from a bot are shown in the chat feed.
ChatUIConfiguration.Builder chatConfiguration(ChatConfiguration chatConfiguration)
Specify a ChatConfiguration instance that contains information used by ChatUI to manage Chat sessions.
ChatUIConfiguration.Builder chatEventListener(ChatEventListener chatEventListener)
**Optional** method that adds a ChatEventListener instance to notify you of chat events.
ChatUIConfiguration.Builder defaultToMinimized(boolean enabled)
Defines whether the user interface is presented in minimized mode following prechat submission.
ChatUIConfiguration.Builder disablePreChatView(boolean disablePreChatView)
**OPTIONAL** Flag that determines whether we will skip the prechat view when starting a new session.
ChatUIConfiguration.Builder enableChatBotBanner(int chatBotBannerLayoutId)
**OPTIONAL** Enables the display of a banner shown when starting a chat session with a chat bot.
ChatUIConfiguration.Builder enableHyperlinkPreview(boolean enabled)
**OPTIONAL** Flag that enables/disables the preview of hyperlinks within the chat-feed.
ChatUIConfiguration.Builder hideQueuePosition(boolean hideQueuePosition)
**OPTIONAL** Hides the display of the customer's queue position while waiting for an Agent to connect.
ChatUIConfiguration.Builder knowledgeArticlePreviewClickListener(ChatKnowledgeArticlePreviewClickListener listener)
**OPTIONAL** Sets a listener for performing an action when a knowledge article is selected in the chat feed.
ChatUIConfiguration.Builder knowledgeArticlePreviewDataProvider(ChatKnowledgeArticlePreviewDataProvider provider)
**OPTIONAL** Sets a provider for retrieving the article and title of a knowledge article when it's linked in the chat feed.
ChatUIConfiguration.Builder knowledgeCommunityUrl(String url)
**OPTIONAL** Sets the knowledge host for integrating knowledge articles into the chat-feed.
ChatUIConfiguration.Builder maximumWaitTime(int maximumWaitTime)
**OPTIONAL** Specifies the maximum estimated wait that should be displayed to the user in minutes.
ChatUIConfiguration.Builder minimumWaitTime(int minimumWaitTime)
**OPTIONAL** Specifies the minimum estimated wait that should be displayed to the user in minutes.
ChatUIConfiguration.Builder photoDirectoryName(String photoDirectoryName)
**OPTIONAL** Specify a directory name that will be used to store photos taken with the device camera during a Chat session.
ChatUIConfiguration.Builder queueStyle(QueueStyle queueStyle)
**OPTIONAL** Specifies the way queue updates are conveyed to the user while waiting in a queue.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Builder ()

Public Methods

public ChatUIConfiguration.Builder allowBackgroundNotifications (boolean enabled)

*OPTIONAL** Determines whether the session will post local notifications on selected chat events. Requires allowBackgroundExecution to be set to true. Defaults to true

Returns

public ChatUIConfiguration build ()

Build a ChatUIConfiguration instance using the provided parameters.

Returns

public ChatUIConfiguration.Builder chatBotAvatar (int chatBotAvatarDrawableId)

**OPTIONAL** Sets a custom avatar for chat bots when messages from a bot are shown in the chat feed.

public ChatUIConfiguration.Builder chatConfiguration (ChatConfiguration chatConfiguration)

Specify a ChatConfiguration instance that contains information used by ChatUI to manage Chat sessions.

Parameters
chatConfiguration A ChatConfiguration instance

public ChatUIConfiguration.Builder chatEventListener (ChatEventListener chatEventListener)

**Optional** method that adds a ChatEventListener instance to notify you of chat events.

Parameters
chatEventListener ChatEventListener instance
Returns

public ChatUIConfiguration.Builder defaultToMinimized (boolean enabled)

Defines whether the user interface is presented in minimized mode following prechat submission.

public ChatUIConfiguration.Builder disablePreChatView (boolean disablePreChatView)

**OPTIONAL** Flag that determines whether we will skip the prechat view when starting a new session. Set this to true if you wish to pass in a preconfigured list of fields without prompting the user to change their values.

If you wish to display your own UI to collect this information you would generally enable this flag to prevent the chat UI library from presenting it's own view.

public ChatUIConfiguration.Builder enableChatBotBanner (int chatBotBannerLayoutId)

**OPTIONAL** Enables the display of a banner shown when starting a chat session with a chat bot.

public ChatUIConfiguration.Builder enableHyperlinkPreview (boolean enabled)

**OPTIONAL** Flag that enables/disables the preview of hyperlinks within the chat-feed. Set this flag to disable hyperlink preview messages in the chat-feed.

public ChatUIConfiguration.Builder hideQueuePosition (boolean hideQueuePosition)

**OPTIONAL** Hides the display of the customer's queue position while waiting for an Agent to connect.

public ChatUIConfiguration.Builder knowledgeArticlePreviewClickListener (ChatKnowledgeArticlePreviewClickListener listener)

**OPTIONAL** Sets a listener for performing an action when a knowledge article is selected in the chat feed.

Returns

public ChatUIConfiguration.Builder knowledgeArticlePreviewDataProvider (ChatKnowledgeArticlePreviewDataProvider provider)

**OPTIONAL** Sets a provider for retrieving the article and title of a knowledge article when it's linked in the chat feed.

Returns

public ChatUIConfiguration.Builder knowledgeCommunityUrl (String url)

**OPTIONAL** Sets the knowledge host for integrating knowledge articles into the chat-feed.

Returns

public ChatUIConfiguration.Builder maximumWaitTime (int maximumWaitTime)

**OPTIONAL** Specifies the maximum estimated wait that should be displayed to the user in minutes.

Defaults to 10 minutes

Parameters
maximumWaitTime Maximum wait time in minutes. This parameter should be a value greater than 0.
Returns

public ChatUIConfiguration.Builder minimumWaitTime (int minimumWaitTime)

**OPTIONAL** Specifies the minimum estimated wait that should be displayed to the user in minutes.

Defaults to 1 minute

Parameters
minimumWaitTime Minimum wait time value in minutes.
Returns

public ChatUIConfiguration.Builder photoDirectoryName (String photoDirectoryName)

**OPTIONAL** Specify a directory name that will be used to store photos taken with the device camera during a Chat session. Do not specify the full path, as photos will be automatically written to external storage. If a photo directory name is not specified then images will be stored in the root External Storage directory.

Parameters
photoDirectoryName The name of the folder in external storage to write photos to.

public ChatUIConfiguration.Builder queueStyle (QueueStyle queueStyle)

**OPTIONAL** Specifies the way queue updates are conveyed to the user while waiting in a queue.

Defaults to Position

Returns