---
updatedAt: 2026-02-25T13:00:23.000Z
---

# 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](https://kustomer.kustomer.help/introduction-conversational-assistants-BkgBYEbLw#conversational-assistants-page).

[block:code]
{
  "codes": [
    {
      "code": "//Reccomended:\nKustomer.openChatAssistant(id: \"newID\", startDialog: nil) { result in\n  switch result {\n    case .success():\n      print(\"Success\")\n    case .failure(let error):\n      print(\"Error: \\(error)\")   \n  }\n}\n\n\n//Also valid:\nKustomer.options.activeAssistant = .withId(\"newID\")\nKustomer.startNewConversation { convo in\n  print(convo.id!)\n}",
      "language": "swift",
      "name": "Swift code sample: open a conversational assistant based on assistant id."
    }
  ]
}
[/block]

[block:callout]
{
  "type": "success",
  "title": "Default Assistant",
  "body": "If you wish to use the default Conversational Assistant for your org there is no need to set the activeAssistant option.\n\nYou can also switch back to the default Assistant by setting:\nKustomer.options.activeAssistant = .orgDefault"
}
[/block]

[block:callout]
{
  "type": "info",
  "title": "Open chat with a specific conversational assistant",
  "body": "To learn more, see [Open the Chat UI with a conversational assistant](https://developer.kustomer.com/chat-sdk/docs/open-chat-ui#open-the-chat-ui-with-a-conversational-assistant)."
}
[/block]