.addEventListener()
The Mobilisten React-Native SDK provides various events that developers can use to perform customized actions.
Supported events:
Event | Invoked when |
EVENT_SUPPORT_OPENED | the user opens the SDK |
EVENT_SUPPORT_CLOSED | the user closes the SDK |
EVENT_CHATVIEW_OPENED | a chat window is opened |
EVENT_CHATVIEW_CLOSED | a chat window is closed |
EVENT_CHAT_OPENED | a chat is initiated |
EVENT_CHAT_CLOSED | a chat is ended |
EVENT_CHAT_MISSED | a chat is missed |
EVENT_CHAT_ATTENDED | a chat is picked up |
EVENT_CHAT_REOPENED | a chat is reopened |
EVENT.CHAT_QUEUE_POSITION_CHANGED | the position in the queue of a queued chat changes |
EVENT_ARTICLE_OPENED (Deprecated) | an article is opened |
EVENT_ARTICLE_CLOSED (Deprecated) | an article is closed |
EVENT_ARTICLE_LIKED (Deprecated) | an article is liked |
EVENT_ARTICLE_DISLIKED (Deprecated) | an article is disliked |
EVENT_RESOURCE_OPENED | a resource is opened |
EVENT_RESOURCE_CLOSED | a resource is closed |
EVENT_RESOURCE_LIKED | a resource is liked |
EVENT_RESOURCE_DISLIKED | a resource is disliked |
EVENT_OPERATORS_ONLINE | any of the operators are online. |
EVENT_OPERATORS_OFFLINE | all the operators are offline. |
EVENT_VISITOR_IPBLOCKED | the visitor's IP is blocked. |
EVENT_FEEDBACK_RECEIVED | feedback is given by the visitor |
EVENT_RATING_RECEIVED | a chat is rated by the visitor |
EVENT_PERFORM_CHATACTION | a chat action is to be executed. Learn More |
EVENT_CUSTOMTRIGGER | a custom trigger is executed. Learn More |
EVENT_CHAT_UNREAD_COUNT_CHANGED | the unread count is changed |
EVENT_HANDLE_URL | a URL in the chat is clicked |
EVENT_HANDLE_CUSTOM_LAUNCHER_VISIBILITY | Show/hide your custom launcher with the triggered boolean value |
Example:
Copied