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
chatThread
The 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
chatThread
The 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
messageData
The 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
isTyping
An agent has started or ended typing.
threadId
The 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
error
The 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
data
The proactive popup action data
actionId
The unique identifier of the action.