SOSOptions

@interface SOSOptions : NSObject

The SOSOptions class allows you to configure the behavior of any SOSSessionManager session.

This object determines how an SOS session is routed, as well as the behavior of a session once established.

  • Instantiates an SOSOptions object for use with -[SOSSessionManager startSessionWithOptions:completion:].

    See

    liveAgentPod

    See

    orgId

    See

    deploymentId

    Declaration

    Objective-C

    + (instancetype)optionsWithLiveAgentPod:(NSString *)liveAgentPod
                                      orgId:(NSString *)orgId
                               deploymentId:(NSString *)deploymentId;

    Swift

    convenience init!(liveAgentPod: String!, orgId: String!, deploymentId: String!)

    Parameters

    liveAgentPod

    The hostname for the LiveAgent pod that your organization has been assigned. Also known as the Live Agent Endpoint.

    orgId

    The Salesforce organization ID.

    deploymentId

    The unique ID of the deployment for this session.

    Return Value

    An SOSOptions instance.

  • Validates the current values of the SOSOptions properties. The error parameter is nil on success. Otherwise, it contains a list of invalid properties.

    Declaration

    Objective-C

    - (BOOL)validate:(NSError *__autoreleasing *)error;

    Swift

    func validate() throws

    Parameters

    error

    An error object if there are invalid parameters.

    Return Value

    Whether the SOSOptions values are valid.

  • Sets the replacement viewControllers for a phase of the UI interaction.

    Declaration

    Objective-C

    - (void)setViewControllerClass:(Class)class for:(SOSUIPhase)phase;

    Swift

    func setViewControllerClass(_ class: AnyClass!, for phase: SOSUIPhase)

    Parameters

    class

    A ViewController class that will replace the default ViewController UI.

    phase

    The Phase of the SOS session UI that is being replaced.

  • The hostname for the LiveAgent pod that your organization has been assigned.

    To get this value, from Setup, search for Live Agent Settings and copy the hostname from the Live Agent API Endpoint.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic) NSString *liveAgentPod;

    Swift

    var liveAgentPod: String! { get set }
  • Salesforce organization ID.

    To get this value, from Setup, search for Company Information and copy the Salesforce Organization ID.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic) NSString *orgId;

    Swift

    var orgId: String! { get set }
  • The unique ID of the deployment for this session.

    A new deployment ID can be created in the Setup tab under SOS Deployments. The deployment ID is used to route specific types of support requests to any number of agents. You can set up any number of deployment IDs for your application to accommodate any routing model you choose. To get this value, from Setup, search for SOS Deployments, click the correct deployment and copy the Deployment ID.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic) NSString *deploymentId;

    Swift

    var deploymentId: String! { get set }
  • The length of time (in seconds) before SOS prompts the user to retry or cancel.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) NSTimeInterval sessionRetryTime;

    Swift

    var sessionRetryTime: TimeInterval { get set }
  • By default, we send along the bundle version with session requests. If you wish to override this explicitly, you can use this property.

    Warning

    Note that only 64 MAX character strings are supported.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic) NSString *applicationVersion;

    Swift

    var applicationVersion: String! { get set }
  • The initial SOSCameraType setting to be streamed upon starting a session.

    Default: SOSCameraTypeScreenSharing

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) SOSCameraType initialCameraType;

    Swift

    var initialCameraType: SOSCameraType { get set }
  • Determines whether session logs are sent for collection. Logs sent remotely do not collect personal information. Unique IDs are created for tying logs to sessions, and those IDs cannot be correlated back to specific users.

    Default: YES

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL remoteLoggingEnabled;

    Swift

    var remoteLoggingEnabled: Bool { get set }
  • Whether the agent video stream is active upon starting a session.

    Default: YES

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL initialAgentVideoStreamActive;

    Swift

    var initialAgentVideoStreamActive: Bool { get set }
  • Whether the agent video stream is enabled for the session.

    Default: YES

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL featureAgentVideoStreamEnabled;

    Swift

    var featureAgentVideoStreamEnabled: Bool { get set }
  • Whether screen sharing is enabled for the session.

    Default: YES

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL featureClientScreenSharingEnabled;

    Swift

    var featureClientScreenSharingEnabled: Bool { get set }
  • Whether the front-facing (selfie) camera is enabled for the session.

    Default: NO

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL featureClientFrontCameraEnabled;

    Swift

    var featureClientFrontCameraEnabled: Bool { get set }
  • Whether the back-facing camera is enabled for the session.

    Default: NO

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL featureClientBackCameraEnabled;

    Swift

    var featureClientBackCameraEnabled: Bool { get set }
  • Whether the agent stream is visible in the camera view.

    If this is disabled then only the device camera is visible in the camera view.

    Default: ‘YES’

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL agentSteamEnabledInCameraView;

    Swift

    var agentSteamEnabledInCameraView: Bool { get set }
  • Whether the network test is enabled before and during a session.

    Default: YES

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL featureNetworkTestEnabled;

    Swift

    var featureNetworkTestEnabled: Bool { get set }
  • NSMutableDictionary that can be used to send custom data.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic) NSMutableDictionary *customFieldData;

    Swift

    var customFieldData: NSMutableDictionary! { get set }
  • NSDictionary that contains the registered viewControllers that will override the internal user interfaces

    Declaration

    Objective-C

    @property (readwrite, retain, nonatomic) NSDictionary *viewControllerClasses;

    Swift

    var viewControllerClasses: [AnyHashable : Any]! { get set }
  • CGPoint that contains the starting center location of the session controls view. If using replacement UI, this functionality needs to be implemented in the replacement UI code.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CGPoint initialAgentStreamPosition;

    Swift

    var initialAgentStreamPosition: CGPoint { get set }