SCSChatSession

@protocol SCSChatSession <NSObject>

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.

  • Property to access the actors (agents and iOS users) currently in the session.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic) NSArray<SCSChatActor *> *actors;

    Swift

    var actors: [SCSChatActor]! { get }
  • Property to access all events (messages, agent requests, transfers, etc) that have occurred in the session.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic) NSArray<id<SCSChatEvent>> *allEvents;
  • The current queue position the user has while waiting for an agent.

    Declaration

    Objective-C

    @property (readonly, assign, nonatomic) NSInteger queuePosition;

    Swift

    var queuePosition: Int { get }
  • Property to access and set the typing status of the iOS user

    Declaration

    Objective-C

    @property (getter=isUserTyping, assign, readwrite, nonatomic) BOOL userTyping;

    Swift

    var isUserTyping: Bool { get set }
  • The unique session id for the chat session.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic) NSString *sessionId;

    Swift

    var sessionId: String! { get }
  • The unique id representing the chat visitor.

    Declaration

    Objective-C

    @property (readonly, strong, nonatomic) NSString *visitorId;

    Swift

    var visitorId: String! { get }
  • Sends a sneak peek of the message to the agent. The sneak peek contains content that the user has not officially sent to the agent but has recently typed.

    Declaration

    Objective-C

    - (void)sendSneakPeek:(NSString *)message;

    Swift

    func sendSneakPeek(_ message: String!)
  • Sends a message to an agent.

    Declaration

    Objective-C

    - (void)sendMessage:(NSString *)message;

    Swift

    func sendMessage(_ message: String!)