ChatActions.register()

This API allows you to register any custom action that you have created.

Note:
It is mandatory to register custom actions that are used in the bot script. If an action is not registered, it cannot be used.

Usage

Copiedlet bookTicketAction = SIQChatAction(name: "bookTicketAction") { (arguments, handler) in
    // your custom action code goes here
    //Example of an action being handled
    if userLoggedIn{
        handler.success(message: "Ticket Booked!")
    }else{
        handler.faliure(message: "Please login to continue")
    }
}
ZohoSalesIQ.ChatActions.register(action: bookTicketAction)