registerHiddenPreChatValuesProvider
Registers a provider for supplying hidden pre-chat field values.
The provider is invoked before conversation creation to populate hidden pre-chat fields configured in the deployment. These values are not visible to the end user and are used for routing the conversation. Whether they are surfaced to the agent depends on the Salesforce flow configuration.
Parameters
provider
Your PreChatValuesProvider implementation.
See also
Samples
coreClient.registerHiddenPreChatValuesProvider { fields ->
fields.onEach { field ->
field.userInput = when (field.name) {
"CustomerId" -> "customer-123"
"AccountNumber" -> "account-456"
else -> ""
}
}
}Content copied to clipboard