CXoneChatDelegate
public protocol CXoneChatDelegate : AnyObject
The handler for the chat events.
-
onUnexpectedDisconnect()Default implementationCallback to be called when the connection unexpectedly drops.
Default Implementation
Declaration
Swift
func onUnexpectedDisconnect() -
onChatUpdated(_:Default implementationmode: ) -
onThreadUpdated(_:Default implementation) Callback to be called when the thread has been updated.
It can reflect any updated property of the thread – messages, name, assigned agent etc.
Default Implementation
Declaration
Swift
func onThreadUpdated(_ chatThread: ChatThread)Parameters
chatThreadThe updated chat thread
-
onThreadsUpdated(_:Default implementation) Callback to be called when threads have been updated.
It can reflect any updated property of the thread – messages, name, assigned agent etc.
Default Implementation
Declaration
Swift
func onThreadsUpdated(_ chatThreads: [ChatThread])Parameters
chatThreadThe updated chat threads
-
onCustomEventMessage(_:Default implementation) Callback to be called when a custom message is received.
Default Implementation
Declaration
Swift
func onCustomEventMessage(_ messageData: Data)Parameters
messageDataThe data of the custom plugin message.
-
onAgentTyping(_:Default implementationthreadId: ) Callback to be called when the agent has stopped typing.
Default Implementation
Declaration
Swift
func onAgentTyping(_ isTyping: Bool, threadId: UUID)Parameters
isTypingAn agent has started or ended typing.
threadIdThe unique identifier of thread where typing state changed.
-
onContactCustomFieldsSet()Default implementationCallback to be called when the custom fields are set for a contact.
Default Implementation
Declaration
Swift
func onContactCustomFieldsSet() -
onCustomerCustomFieldsSet()Default implementationCallback to be called when the custom fields are set for a customer.
Default Implementation
Declaration
Swift
func onCustomerCustomFieldsSet() -
onError(_:Default implementation) Callback to be called when an error occurs.
Default Implementation
Declaration
Swift
func onError(_ error: Error)Parameters
errorThe error.
-
onTokenRefreshFailed()Default implementationCallback to be called when refreshing the token has failed.
Default Implementation
Declaration
Swift
func onTokenRefreshFailed() -
onProactivePopupAction(data:Default implementationactionId: ) Callback to be called when a custom popup proactive action is received.
Default Implementation
Declaration
Swift
func onProactivePopupAction(data: [String : Any], actionId: UUID)Parameters
dataThe proactive popup action data
actionIdThe unique identifier of the action.
View on GitHub