submitPreChatData

abstract suspend fun submitPreChatData(preChatFields: List<PreChatField> = emptyList(), hiddenPreChatFields: List<PreChatField> = emptyList(), createConversationOnSubmit: Boolean = true): Result<Conversation>

Deprecated

Deprecated. Use submitRemoteConfiguration API instead.

Creates a conversation with a dictionary of pre-chat data for routing.

Return

The Result of the call to create conversation. Result.Success.data returns the sent message. If createConversationOnSubmit flag is set to false, returns Result.Empty.

Parameters

preChatFields

A List of PreChatField objects.

hiddenPreChatFields

A List of PreChatField objects that are not visible to the user.

createConversationOnSubmit

A Boolean flag to indicate whether the conversation should be created when the Pre-Chat data is submitted. When set to false the Pre-Chat data will be stored and sent when an initial message is sent by the user. Defaults to true.