Open conversational assistant by id

Opens a conversational assistant based on the assistant id.

You can open a conversational assistant based on the assistant id. If the assistant id is invalid, an error is returned.

Copy the conversational assistant id from the Conversational Assistants page in Kustomer (go to Settings > Kustomer IQ > Conversational Assistants).

To learn more, see Introduction to Conversational Assistants.

//Reccomended:
Kustomer.openChatAssistant(id: "newID", startDialog: nil) { result in
  switch result {
    case .success():
      print("Success")
    case .failure(let error):
      print("Error: \(error)")   
  }
}


//Also valid:
Kustomer.options.activeAssistant = .withId("newID")
Kustomer.startNewConversation { convo in
  print(convo.id!)
}

👍

Default Assistant

If you wish to use the default Conversational Assistant for your org there is no need to set the activeAssistant option.

You can also switch back to the default Assistant by setting:
Kustomer.options.activeAssistant = .orgDefault

📘

Open chat with a specific conversational assistant

To learn more, see Open the Chat UI with a conversational assistant.