SOSAgentAvailability
@interface SOSAgentAvailability : NSObject
The SOSAgentAvailability
class allows you to configure periodic polling against a single SOS deployment for your organization.
When the availability changes, an -[SOSAgentAvailabilityDelegate agentAvailability:didChange:]
event is fired.
-
Initializes the agent polling. With the given credentials this will begin polling to determine agent availability. This can be leveraged to provide context to modify application UI depending on agent availability.
Note
Currently we can only support polling a single deployment at a time.
Declaration
Objective-C
- (void)startPollingWithOrganizationId:(NSString *)organizationId deploymentId:(NSString *)deploymentID liveAgentPod:(NSString *)liveAgentPod;
Swift
func startPolling(withOrganizationId organizationId: String!, deploymentId deploymentID: String!, liveAgentPod: String!)
Parameters
organizationId
The Salesforce organization id.
deploymentID
The unique id of the deployment for this session.
liveAgentPod
The hostname for the LiveAgent pod that your organization has been assigned.
-
Discontinues polling operations. It is recommended that you stop polling in situations or views where no SOS functionality is appropriate/implemented.
Declaration
Objective-C
- (void)stopPolling;
Swift
func stopPolling()
-
The current availability status.
Declaration
Objective-C
@property (assign, readwrite, nonatomic) SOSAgentAvailabilityStatusType availabilityStatus;
Swift
var availabilityStatus: SOSAgentAvailabilityStatusType { get set }
-
Adds an instance of an NSObject implementing the
SOSAgentAvailabilityDelegate
protocol to the list of delegates to notify.Declaration
Objective-C
- (void)addDelegate:(id<SOSAgentAvailabilityDelegate>)delegate;
Swift
func add(_ delegate: SOSAgentAvailabilityDelegate!)
Parameters
delegate
NSObject
instance to add. -
Removes an instance of an NSObject implementing the
SOSAgentAvailabilityDelegate
protocol to the list of delegates to notify.Declaration
Objective-C
- (void)removeDelegate:(id<SOSAgentAvailabilityDelegate>)delegate;
Swift
func remove(_ delegate: SOSAgentAvailabilityDelegate!)
Parameters
delegate
NSObject instance to remove.