SOSOptions Class Reference

Inherits from NSObject
Declared in SOSOptions.h

Overview

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.

Initialization

+ optionsWithLiveAgentPod:orgId:deploymentId:

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

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

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.

Declared In

SOSOptions.h

– validate:

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

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

Parameters

error

An error object if there are invalid parameters.

Return Value

Whether the SOSOptions values are valid.

Declared In

SOSOptions.h

– setViewControllerClass:for:

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

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

Parameters

class

A ViewController class that will replace the default ViewController UI.

phase

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

Declared In

SOSOptions.h

SFDC Service Cloud / Live Agent Configuration

  liveAgentPod

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

@property (nonatomic) NSString *liveAgentPod

Discussion

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

Declared In

SOSOptions.h

  orgId

Salesforce organization ID.

@property (nonatomic) NSString *orgId

Discussion

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

Declared In

SOSOptions.h

  deploymentId

The unique ID of the deployment for this session.

@property (nonatomic) NSString *deploymentId

Discussion

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.

Declared In

SOSOptions.h

Session Management

  sessionRetryTime

The length of time (in seconds) before SOS prompts the user to retry or cancel.

@property (nonatomic) NSTimeInterval sessionRetryTime

Declared In

SOSOptions.h

  applicationVersion

By default, we send along the bundle version with session requests. If you wish to override this explicitly, you can use this property.

@property (nonatomic) NSString *applicationVersion

Discussion

Warning: Note that only 64 MAX character strings are supported.

Declared In

SOSOptions.h

  initialCameraType

The initial SOSCameraType setting to be streamed upon starting a session.

@property (nonatomic) SOSCameraType initialCameraType

Discussion

Default: SOSCameraTypeScreenSharing

Declared In

SOSOptions.h

  remoteLoggingEnabled

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.

@property (nonatomic) BOOL remoteLoggingEnabled

Discussion

Default: YES

Declared In

SOSOptions.h

  initialAgentVideoStreamActive

Whether the agent video stream is active upon starting a session.

@property (nonatomic) BOOL initialAgentVideoStreamActive

Discussion

Default: YES

Declared In

SOSOptions.h

  featureAgentVideoStreamEnabled

Whether the agent video stream is enabled for the session.

@property (nonatomic) BOOL featureAgentVideoStreamEnabled

Discussion

Default: YES

Declared In

SOSOptions.h

  featureClientScreenSharingEnabled

Whether screen sharing is enabled for the session.

@property (nonatomic) BOOL featureClientScreenSharingEnabled

Discussion

Default: YES

Declared In

SOSOptions.h

  featureClientFrontCameraEnabled

Whether the front-facing (selfie) camera is enabled for the session.

@property (nonatomic) BOOL featureClientFrontCameraEnabled

Discussion

Default: NO

Declared In

SOSOptions.h

  featureClientBackCameraEnabled

Whether the back-facing camera is enabled for the session.

@property (nonatomic) BOOL featureClientBackCameraEnabled

Discussion

Default: NO

Declared In

SOSOptions.h

  agentSteamEnabledInCameraView

Whether the agent stream is visible in the camera view.

@property (nonatomic) BOOL agentSteamEnabledInCameraView

Discussion

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

Default: ‘YES’

Declared In

SOSOptions.h

  featureNetworkTestEnabled

Whether the network test is enabled before and during a session.

@property (nonatomic) BOOL featureNetworkTestEnabled

Discussion

Default: YES

Declared In

SOSOptions.h

  customFieldData

NSMutableDictionary that can be used to send custom data.

@property (nonatomic) NSMutableDictionary *customFieldData

Declared In

SOSOptions.h

  viewControllerClasses

NSDictionary that contains the registered viewControllers that will override the internal user interfaces

@property (retain, nonatomic) NSDictionary *viewControllerClasses

Declared In

SOSOptions.h

  initialAgentStreamPosition

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.

@property (assign, nonatomic) CGPoint initialAgentStreamPosition

Declared In

SOSOptions.h