Override Conversational Assistant id

Overrides the Conversational Assistant id in the SDK.

Initialize the Chat Android SDK with options to override the Conversational Assistant id. To learn more see Initialize Chat Android SDK with options.

You can copy the Conversational Assistant id from the Conversational Assistant page in Kustomer by going to Settings > Kustomer IQ > Conversational Assistant.

To learn more, see Introduction to Conversational Assistants in the Kustomer Help Center.

The Conversational Assistant id appears next to the conversational assistant name.The Conversational Assistant id appears next to the conversational assistant name.

The Conversational Assistant id appears next to the conversational assistant name.

👍

Recommendation: Override the Conversational Assistant id when you initialize

We recommend that you override the Conversational Assistant when you initialize with options. If you try to fetch the id later, you may experience issues with chat features.

You can also override the Conversational Assistant id after you initialize the SDK.

You only need to set the ID once to use the id for the entire active session for the app.

//This is a suspend function
suspend Kustomer.getInstance().overrideAssistant(assistantId: String) : KusResult<KusAssistant>

or

Kustomer.getInstance().overrideAssistant(assistantId) {
    when (it) {
        is KusResult.Success -> it.data
        is KusResult.Error -> it.exception.localizedMessage
    }
}

Did this page help you?