Open conversation by id

Opens a conversation based on the conversationId.

You can open a conversation directly by the conversationId identifier.

The conversationId is unique to a chat conversation, and this identifier is auto-generated on the Kustomer backend when a new chat gets created.

See Listen for chat events or Open new conversation to learn how to get conversation objects and IDs for newly created conversations.

To open a conversation by the conversationId, the ID must be valid and available in Kustomer. If the conversation ID is not valid, then Kustomer returns a KusResult.Error response. If the conversation ID is valid and the result is successful, then Kustomer returns a KusResult.Success<KusConversation> response.

Kustomer.getInstance()
  .openConversationWithId(conversationId) { result: KusResult<KusConversation> ->
                when (result) {
                    is KusResult.Success -> //success
                    is KusResult.Error -> //error
                }
            }

👍

Tip: Store conversation IDs in your app

Store conversation IDs in your app or backend if you'd like to reference and open conversations by their conversationId identifier in the future.