ChatProvider
public protocol ChatProvider : AnyObject
The interface for interacting with chat features of the CXone platform.
-
The version of the CXone chat SDK.
Declaration
Swift
static var version: String { get }
-
The singleton instance of the CXone chat SDK.
Declaration
Swift
static var shared: ChatProvider { get set }
-
Current chat state of the SDK
The state defines whether it is necessary to set up the SDK, connect to the CXone services or start communication with an agent.
Declaration
Swift
var state: ChatState { get }
-
Chat mode based on the channel configuration
Declaration
Swift
var mode: ChatMode { get }
-
The handler for the logs occured in CXone chat.
Declaration
Swift
var logDelegate: LogDelegate? { get set }
-
The handler for the chat events.
Declaration
Swift
@available(*, deprecated, message: "Deprecated with 2.2.0 Please use add(delegate:﹚") var delegate: CXoneChatDelegate? { get set }
-
The provider for connection related properties and methods.
Declaration
Swift
var connection: ConnectionProvider { get }
-
The provider for customer related properties and methods.
Declaration
Swift
var customer: CustomerProvider { get }
-
The provider for customer chat fields related properties and methods.
Declaration
Swift
var customerCustomFields: CustomerCustomFieldsProvider { get }
-
The provider for thread related properties and methods.
Declaration
Swift
var threads: ChatThreadsProvider { get }
-
The provider for report related properties and methods.
Declaration
Swift
var analytics: AnalyticsProvider { get }
-
Add a
CXoneChatDelegate
Future delegate messages will be routed to the newly added delegate.
Note: No strong reference to the delegate is maintained so the caller is responsible for its lifecycle.
Declaration
Swift
func add(delegate: CXoneChatDelegate)
-
Remove a
CXoneChatDelegate
`No future delegate messages will be routed to the removed delegate.
Declaration
Swift
func remove(delegate: CXoneChatDelegate)
-
Configures internal logger to be able to detect errors, warnings or even trace chat flow.
Declaration
Swift
static func configureLogger(level: LogManager.Level, verbosity: LogManager.Verbosity)
Parameters
level
Specifies level of records to be presented in the console. Lower levels are ignored.
verbository
Specifies verbosity of information in the log record.
-
Signs the customer out and disconnects from the CXone service.
Declaration
Swift
static func signOut()