.sendEvent()
This API is used to send events to the SDK for several returning callbacks.
Events
OPEN_URL
This event allows you to open a URL when invoked. When using this event followed by a URL, this will open the mentioned URL.
COMPLETE_CHAT_ACTION
This event will complete the chat action as a success or failure, with or without a message.
Syntax (OPEN_URL)
Copied
Example
The below example code opens the URL only when the the URL doesn't starts with "https://zylkerhomes.com".
Reference - EVENT_HANDLE_URL in addEventListener() url click callbacks.
Copied
Syntax (COMPLETE_CHAT_ACTION)
Copied
Example
Parameters:
- uuid - unique ID for the chat action
- success(Optional) - The default value is true
- message(Optional) - The message to be displayed on the chat action button
Reference - Implementation for Chat actions.
Note: completeChatAction() and completeChatActionWithMessage() were deprecated.
Copied