SCSChatDelegate
@protocol SCSChatDelegate <NSObject>
The SCSChatDelegate
protocol provides information about the Live Agent Chat
session.
See
SCSChat
-
Delegate method invoked when the Live Agent Chat session state changes.
See
SCSChat
Declaration
Objective-C
- (void)chat:(SCSChat *)chat stateDidChange:(SCSChatSessionState)current previous:(SCSChatSessionState)previous;
Swift
optional func chat(_ chat: SCSChat!, stateDidChange current: SCSChatSessionState, previous: SCSChatSessionState)
Parameters
chat
SCSChat
instance which invoked the method.current
The new
SCSChatSessionState
which has been set on the for the Live Agent Chat session.previous
The previous
SCSChatSessionState
. -
Declaration
Objective-C
- (void)chat:(SCSChat *)chat didEndWithReason:(SCSChatEndReason)reason error:(NSError *)error;
Swift
optional func chat(_ chat: SCSChat!, didEndWith reason: SCSChatEndReason, error: Error!)
Parameters
chat
SCSChat
instance which invoked the method.reason
SCSChatEndReason
describing why the session has ended.error
NSError
instance describing the error. Error codes can be referenced fromSCSChatErrorCode
. -
Delegate method invoked if an error is raised during a Live Agent Chat session.
See
SCSChat
Declaration
Objective-C
- (void)chat:(SCSChat *)chat didError:(NSError *)error;
Swift
optional func chat(_ chat: SCSChat!, didError error: Error!)
Parameters
chat
SCSChat
instance which invoked the error.error
NSError
instance describing the error. Error codes can be referenced fromSCSChatErrorCode
. -
Delegate method invoked when the Live Agent Session moves in the agent queue.
See
Declaration
Objective-C
- (void)chat:(SCSChat *)chat didUpdateQueuePosition:(NSNumber *)position;
Swift
optional func chat(_ chat: SCSChat!, didUpdateQueuePosition position: NSNumber!)
Parameters
chat
SCSChat
instance which invoked the method.position
NSNumber
instance representing position in the queue.