Live Agent Chat

This is a list of classes related to Live Agent Chat. The entry point into this feature is through the SCSChat class. Refer to that class to get started.

  • The SCSChat class is the core interface to the chat SDK. This object manages the flow of chat sessions throughout the lifetime of the app. For UI-related chat functionality, see SCSChatInterface.

    To get an instance of this class, use the SCServiceCloud.chatCore property on +[SCServiceCloud sharedInstance].

    SCSChat conforms to a multicast delegate model for messaging. Any class that implements the SCSChatSessionDelegate protocol can be added to a list of delegates to receive session-related messages asynchronously using -addDelegate: Any class that implements the SCSChatEventDelegate protocol can be added to a list of delegates to receive general event messages asynchronously using -addEventDelegate:

    See more

    Declaration

    Objective-C

    @interface SCSChat : NSObject

    Swift

    class SCSChat : NSObject
  • SCSChatAvailabilityHandler block definition

    Declaration

    Objective-C

    typedef void (^SCSChatAvailabilityHandler)(NSError *__strong, BOOL)

    Swift

    typealias SCSChatAvailabilityHandler = (Error?, Bool) -> Void

    Parameters

    error

    NSError instance describing the error. Error codes can be referenced from SCSChatErrorCode.

    available

    BOOL representing the availability of an agent to accept a chat session.

  • SCSChatCompletionHandler block definition

    Declaration

    Objective-C

    typedef void (^SCSChatCompletionHandler)(NSError *__strong, SCSChat *__weak)

    Swift

    typealias SCSChatCompletionHandler = (Error?, SCSChat?) -> Void

    Parameters

    error

    NSError instance describing the error. Error codes can be referenced from SCSChatErrorCode.

    scsc

    The instance of SCSChat the block is acting on.

  • The SCSChatInterface class is the main UI interface to the chat SDK. This object provides functionality to show a pre-chat form, display the chat session UI, and handle notifications.

    To get an instance of this class, use the SCServiceCloud.chatUI property on +[SCServiceCloud sharedInstance].

    For core chat behavior unrelated to the UI (such as subscribing to session events), see SCSChat.

    See

    SCSChat
    See more

    Declaration

    Objective-C

    @interface SCSChatInterface : NSObject

    Swift

    class SCSChatInterface : NSObject
  • Indicates whether the pre-chat process has completed.

    Declaration

    Objective-C

    typedef void (^SCSPrechatCompletion)(
        NSArray<SCSPrechatObject *> *_Nullable __strong, BOOL)

    Swift

    typealias SCSPrechatCompletion = ([SCSPrechatObject]?, Bool) -> Void
  • Delegate that sends information related to a specific chatbot menu.

    See more

    Declaration

    Objective-C

    @protocol SCSChatBotMenuDelegate <NSObject>

    Swift

    protocol SCSChatBotMenuDelegate : NSObjectProtocol
  • A SCSChatConfiguration object contains configuration information for a Live Agent Chat session.

    See more

    Declaration

    Objective-C

    @interface SCSChatConfiguration : NSObject <NSCopying>

    Swift

    class SCSChatConfiguration : NSObject, NSCopying
  • Description of the actor chatting in a session.

    See more

    Declaration

    Objective-C

    @interface SCSChatActor : NSObject

    Swift

    class SCSChatActor : NSObject
  • Defines the type of actors involved in a chat conversation.

    See more

    Declaration

    Objective-C

    enum SCSChatActorType {}

    Swift

    enum SCSChatActorType : UInt
  • Live Agent Chat ErrorCode definitions.

    Errors fall into one of several groups (or series) of errors.

    If there is an error thrown by a library dependency it will be included as metadata in the userInfo of the error which is returned to the application code.

    See

    -[SCSChatSessionDelegate session:didEndWithReason:]
    See more

    Declaration

    Objective-C

    enum SCSChatErrorCode {}

    Swift

    enum SCSChatErrorCode : Int
  • Information related to a chat event. Other chat event classes implement this protocol.

    See more

    Declaration

    Objective-C

    @protocol SCSChatEvent <NSObject>

    Swift

    protocol SCSChatEventProtocol : NSObjectProtocol
  • Information related to all events that are sent or received.

    See more

    Declaration

    Objective-C

    @interface SCSChatEvent : NSObject <SCSChatEvent>

    Swift

    class SCSChatEvent : NSObject, SCSChatEventProtocol
  • Defines the type of actors associated with a chat event.

    See more

    Declaration

    Objective-C

    enum SCSChatEventType {}

    Swift

    enum SCSChatEventType : UInt
  • Information about an event related to something that can be sent to an agent.

    See more

    Declaration

    Objective-C

    @protocol SCSChatSendableEvent <SCSChatEvent>

    Swift

    protocol SCSChatSendableEvent : SCSChatEventProtocol
  • Information related to a chat session. Use this object to inspect the details of a chat session, and to send user messages to the agent.

    See more

    Declaration

    Objective-C

    @protocol SCSChatSession <NSObject>

    Swift

    protocol SCSChatSession : NSObjectProtocol
  • Undocumented

    See more

    Declaration

    Objective-C

    @protocol SCSChatSessionInfo <NSObject>
    
    // Needs doc input from Yuvi
    @property (nonatomic, copy, readonly) NSArray<SCSPrechatObject*> *prechatDetails;
    @property (nonatomic, copy, readonly) NSArray<SCSPrechatEntity*> *prechatEntities;
    
    @end

    Swift

    protocol SCSChatSessionInfo : NSObjectProtocol
  • Information about a file transfer request.

    See more

    Declaration

    Objective-C

    @interface SCSFileTransferRequest : NSObject

    Swift

    class SCSFileTransferRequest : NSObject
  • A SCSPrechatEntity specifies a salesforce entity related to this chat session that will be found or created on session start.

    This object must be added to your chat configuration using SCSChatConfiguration.prechatEntities.

    See more

    Declaration

    Objective-C

    @interface SCSPrechatEntity : NSObject <NSCopying>

    Swift

    class SCSPrechatEntity : NSObject, NSCopying
  • A SCSPrechatEntityField specifies a field of a salesforce object and its relation to a specific pre-chat object defined on session creation.

    This object must be added to a pre-chat entity using SCSPrechatEntity.entityFieldsMaps.

    See more

    Declaration

    Objective-C

    @interface SCSPrechatEntityField : NSObject

    Swift

    class SCSPrechatEntityField : NSObject
  • A SCSPrechatObject specifies a pre-chat field that you can send directly to the agent. This object contains a label and a value.

    This object does not prompt the user for information. To create a field that the user can fill in, refer to SCSPrechatTextInputObject.

    This object must be added to your chat configuration using SCSChatConfiguration.prechatFields.

    See more

    Declaration

    Objective-C

    @interface SCSPrechatObject : NSObject <NSCopying>

    Swift

    class SCSPrechatObject : NSObject, NSCopying
  • An SCSPrechatPickerOption specifies an option inside a pre-chat picker field that is displayed before a chat session is initiated.

    This object must be added to the options array on an SCSPrechatPickerObject.

    See more

    Declaration

    Objective-C

    @interface SCSPrechatPickerOption : NSObject <NSCopying>

    Swift

    class SCSPrechatPickerOption : NSObject, NSCopying