.sendEvent()
This API is used to send events to the SDK for several returning callbacks.
Events:
openUrl
This event allows you to open a URL when invoked. When using this event followed by a URL, this will open the mentioned URL.
values: [url]
completeChatAction
This event will complete the chat action as a success or failure with or without a message.
values: [String actionUUID, bool success, String message]
Syntax (openUrl)
Copied
Parameters:
- eventName: the event name of the action to be done.
- Values: It's a dynamic number of parameter values that need to be passed with respect to the event.
Example (openUrl)
Copied
The above example code opens the url only when the url doesn't starts with "https://zylkerhomes.com".
Refer - SIQEvent.handleURL in eventChannel() url click callbacks.
Example (completeChatAction)
Copied
Parameters:
- actionuuid - 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
Refer - Implementation for Chat actions.
Note: completeChatAction() and completeChatActionWithMessage() were deprecated.