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 9.1.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.
- completion (Optional) - The callback to get the result.
Syntax
Copied@objc static public func startWithTrigger(chatID: String? = nil, department: String? = nil, completion: ZSIQResultCompletionBlock? = nil)
Example
CopiedZohoSalesIQ.Chat.startWithTrigger(chatID: "001",department: "salesiqdepartmentname") { error, success in
}