ZohoSalesIQ.Chat.startWithTrigger()

The ZohoSalesIQ.Chat.startWithTrigger() API allows initiating a chatbot-triggered chat or using the specified chat ID.

Note: 

  • This API is supported from version 8.0.0
  • For this API to work, the bot should be proactive/trigger (Settings > Zobot > Select the bot > Bot Configuration > When the bot should initiate the chat and enable When visitors click the chat widget).

Parameters

  • customChatId (Optional) - Unique ID of the conversation to trigger a chat.
  • departmentName (Optional) - Department to which the chat should be routed.
  • callback (Optional) - The callback to get the result.

Syntax

CopiedZohoSalesIQ.Chat.startWithTrigger(String customChatId, String departmentName, ZohoSalesIQResultCallback<VisitorChat> callback)

Example

CopiedZohoSalesIQ.Chat.startWithTrigger("custom_chat_id", "department_name", result -> {
      if (result.isSuccess()) {
          // Handle success
      } else {
          // Handle error
      }
});
CopiedZohoSalesIQ.Chat.startWithTrigger("custom_chat_id", "department_name") { result ->
      if (result.isSuccess) {
          // Handle success
      } else {
          // Handle error
       }
}