Support.com Cloud SDK
Instance Methods | Class Methods | Properties | List of all members
SupportcomCloudSDK Class Reference

SupportcomCloudSDK class is the main entry point to Support.com cloud SDK and is responsible for exposing APIs for external usage. More...

#import <SupportcomCloudSDK.h>

Inherits <NSObject>.

Instance Methods

(void) - initializeWithToken:
 
(void) - resumeHelp
 
(void) - connectToAgent
 
(void) - connectToAgent:
 
(void) - showLiveHelp
 
(BOOL) - isLiveHelpActive
 
(void) - exitHelp
 
(void) - setFirstName:
 
(void) - setLastName:
 
(void) - setEmail:
 
(void) - setExternalId:
 
(void) - setPhone:
 
(void) - setEmail:withFirstName:lastName:
 
(void) - setFirstName:andLastName:
 
(void) - logAction:
 
(void) - logAction:withData:
 
(void) - logDevice:
 
(void) - logDevice:withData:
 
(void) - logContent:
 
(void) - logContent:withData:
 
(void) - preserveContext:
 
(void) - showSelfHelp
 
(void) - showSelfHelpForId:
 
(void) - showSelfHelpForTags:
 
(void) - showSelfHelpForTags:withDisplayOrder:onViewController:
 
(void) - showSelfHelpForId:withDisplayOrder:onViewController:
 
(void) - clearIdentity
 
(void) - clearContext
 

Class Methods

(id) + sharedInstance
 

Properties

id< SupportcomCloudDelegate > delegate
 

Detailed Description

SupportcomCloudSDK class is the main entry point to Support.com cloud SDK and is responsible for exposing APIs for external usage.

This is a singleton class, that means at any given time only one instance of the class can be created and access.

Developer should always call API initializeWithToken with valid JWT token before making call to any other API from the class. Once initialized developer can start self-help (showSelfHelpForId, showSelfHelpForTags) and live support (showLiveHelp) session. API isLiveHelpActive can be used to check the status of currently running session.

Class also expose APIs to log various types of data while running support session (like logAction, logDevice, etc) which helps agent to assist the user in much better way. To stop everything and exit from current running session call API exitHelp.

Method Documentation

§ clearContext()

- (void) clearContext

This will clear all the log data

§ clearIdentity()

- (void) clearIdentity

This will clear the user information from the Supportcom Cloud SDK context

§ connectToAgent()

- (void) connectToAgent

This will launch the live help service with connection code screen over the current view

§ connectToAgent:()

- (void) connectToAgent: (NSString *)  connectionCode

This will launch the live help service with connection code screen over the current view

Parameters
connectionCode: Six digit valid connection code received from agent

§ exitHelp()

- (void) exitHelp

This will exit the current support session.

§ initializeWithToken:()

- (void) initializeWithToken: (NSString *)  token

This method takes the token created from http://developer.support.com/nexusconnectsdkios.html#ApplicationToken to initialize the SDK.

Parameters
token: authentication key genrated from the portal. Note: This method is expected be called from didFinishLaunchingWithOptions method of your applications AppDelegate

§ isLiveHelpActive()

- (BOOL) isLiveHelpActive

Check if assisted support session is active

Returns
: TRUE is returned is any active session exists

§ logAction:()

- (void) logAction: (NSString *)  name

This is the functions for logging the events to the Supportcom Cloud SDK context Logged data will be shown under session breadcrumb history.

Parameters
name: event name as string

§ logAction:withData:()

- (void) logAction: (NSString *)  name
withData: (NSDictionary *)  data 

This is the functions for logging the events to the Supportcom Cloud SDK context Logged data will be shown under session breadcrumb history.

Parameters
data: the event description as dictionary
name: event name as string

Note: the dictionary is simple dictonary which only accepts value for each key as <NSString/NSNumber>

§ logContent:()

- (void) logContent: (NSString *)  name

This is the functions for logging device events to the Supportcom Cloud SDK context

Parameters
name: event name as string

§ logContent:withData:()

- (void) logContent: (NSString *)  name
withData: (NSDictionary *)  data 

This is the functions for logging the events to the Supportcom Cloud SDK context

Parameters
data: the event description as dictionary
name: event name as string

Note: the dictionary is simple dictonary which only accepts value for each key as <NSString/NSNumber>

§ logDevice:()

- (void) logDevice: (NSString *)  name

This is the functions for logging device events to the Supportcom Cloud SDK context Logged data will be shown under device detail section on agent side.

Parameters
name: event name as string

§ logDevice:withData:()

- (void) logDevice: (NSString *)  name
withData: (NSDictionary *)  data 

This is the functions for logging the events to the Supportcom Cloud SDK context Logged data will be shown under device detail section on agent side.

Parameters
data: the event description as dictionary
name: event name as string

Note: the dictionary is simple dictonary which only accepts value for each key as <NSString/NSNumber>

§ preserveContext:()

- (void) preserveContext: (bool)  flag

Enabling this flag will preserve all the local log data even after starting of any support session. This flag is enabled by default

Parameters
flag: boolean value to enable/disable this flag

§ resumeHelp()

- (void) resumeHelp

This will relaunch the self service help over the current view. This will behave similar to the press of chat head.

§ setEmail:()

- (void) setEmail: (NSString *)  email

Set the e-mail for the context

Parameters
email: e-mail as string

§ setEmail:withFirstName:lastName:()

- (void) setEmail: (NSString *)  email
withFirstName: (NSString *)  firstName
lastName: (NSString *)  lName 

Setting user information for the context

Parameters
email: e-mail as string
firstName: first name as string
lName: last name as string

§ setExternalId:()

- (void) setExternalId: (NSString *)  externalId

Set the CRM user id for the context

Parameters
externalId: CRM id as string

§ setFirstName:()

- (void) setFirstName: (NSString *)  firstName

Set the first name for the context

Parameters
firstName: first name as string

§ setFirstName:andLastName:()

- (void) setFirstName: (NSString *)  firstName
andLastName: (NSString *)  lastName 

Setting user name for the context

Parameters
firstName: first name as string
lastName: last name as string

§ setLastName:()

- (void) setLastName: (NSString *)  lName

Set the last name for the context

Parameters
lName: last name as string

§ setPhone:()

- (void) setPhone: (NSString *)  phone

Set the phone number in the context

Parameters
phone: phone number as string

§ sharedInstance()

+ (id) sharedInstance

This method is used to get the singleton instance for the SupportcomCloudSDK

Returns
:Supportcom Cloud Instance

§ showLiveHelp()

- (void) showLiveHelp

Call this method to display Live support user interface.

§ showSelfHelp()

- (void) showSelfHelp

This will launch the self service help over the current view

§ showSelfHelpForId:()

- (void) showSelfHelpForId: ((deprecated))  __attribute__

This will launch the self service help over the current view

Parameters
helpId: external help ID as string

§ showSelfHelpForId:withDisplayOrder:onViewController:()

- (void) showSelfHelpForId: (NSString *)  helpId
withDisplayOrder: (NSArray *)  displayOrder
onViewController: (SDCWebViewController *)  viewController 

This will launch the self service help over the current view

Parameters
helpId: external help ID as string
displayOrder: Array of display order strings specified at http://developer.support.com/nexusconnectsdkjavascript.html#self-help if array is empty then the display order is "paths"
onViewController: Pass you viewcontroller inherited from SDCWebViewController if you want to display self service content in your view, if you pass nil then self support UI from SDK will be used

§ showSelfHelpForTags:()

- (void) showSelfHelpForTags: ((deprecated))  __attribute__

This will launch the self service help over the current view

Parameters
tags: External tags as array of strings

§ showSelfHelpForTags:withDisplayOrder:onViewController:()

- (void) showSelfHelpForTags: (NSArray *)  tags
withDisplayOrder: (NSArray *)  displayOrder
onViewController: (SDCWebViewController *)  viewController 

This will launch the self service help over the current view

Parameters
tags: External tags as array of strings
displayOrder: Array of display order strings specified at http://developer.support.com/nexusconnectsdkjavascript.html#self-help if array is empty then the display order is "paths"
onViewController: Pass you viewcontroller inherited from SDCWebViewController if you want to display self service content in your view, if you pass nil then self support UI from SDK will be used

Property Documentation

§ delegate

- (id<SupportcomCloudDelegate>) delegate
readwritenonatomicweak

Delegate object to be registered to hear SDK initialization errors