Support.com Cloud SDK
|
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 |
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.
- (void) clearContext |
This will clear all the log data
- (void) clearIdentity |
This will clear the user information from the Supportcom Cloud SDK context
- (void) connectToAgent |
This will launch the live help service with connection code screen over the current view
- (void) connectToAgent: | (NSString *) | connectionCode |
This will launch the live help service with connection code screen over the current view
connectionCode | : Six digit valid connection code received from agent |
- (void) exitHelp |
This will exit the current support session.
- (void) initializeWithToken: | (NSString *) | token |
This method takes the token created from http://developer.support.com/nexusconnectsdkios.html#ApplicationToken to initialize the SDK.
token | : authentication key genrated from the portal. Note: This method is expected be called from didFinishLaunchingWithOptions method of your applications AppDelegate |
- (BOOL) isLiveHelpActive |
Check if assisted support session is active
- (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.
name | : event name as string |
- (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.
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>
- (void) logContent: | (NSString *) | name |
This is the functions for logging device events to the Supportcom Cloud SDK context
name | : event name as string |
- (void) logContent: | (NSString *) | name | |
withData: | (NSDictionary *) | data | |
This is the functions for logging the events to the Supportcom Cloud SDK context
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>
- (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.
name | : event name as string |
- (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.
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>
- (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
flag | : boolean value to enable/disable this flag |
- (void) resumeHelp |
This will relaunch the self service help over the current view. This will behave similar to the press of chat head.
- (void) setEmail: | (NSString *) |
Set the e-mail for the context
: e-mail as string |
- (void) setEmail: | (NSString *) | ||
withFirstName: | (NSString *) | firstName | |
lastName: | (NSString *) | lName | |
Setting user information for the context
: e-mail as string | |
firstName | : first name as string |
lName | : last name as string |
- (void) setExternalId: | (NSString *) | externalId |
Set the CRM user id for the context
externalId | : CRM id as string |
- (void) setFirstName: | (NSString *) | firstName |
Set the first name for the context
firstName | : first name as string |
- (void) setFirstName: | (NSString *) | firstName | |
andLastName: | (NSString *) | lastName | |
Setting user name for the context
firstName | : first name as string |
lastName | : last name as string |
- (void) setLastName: | (NSString *) | lName |
Set the last name for the context
lName | : last name as string |
- (void) setPhone: | (NSString *) | phone |
Set the phone number in the context
phone | : phone number as string |
+ (id) sharedInstance |
This method is used to get the singleton instance for the SupportcomCloudSDK
- (void) showLiveHelp |
Call this method to display Live support user interface.
- (void) showSelfHelp |
This will launch the self service help over the current view
- (void) showSelfHelpForId: | ((deprecated)) | __attribute__ |
This will launch the self service help over the current view
helpId | : external help ID as string |
- (void) showSelfHelpForId: | (NSString *) | helpId | |
withDisplayOrder: | (NSArray *) | displayOrder | |
onViewController: | (SDCWebViewController *) | viewController | |
This will launch the self service help over the current view
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 |
- (void) showSelfHelpForTags: | ((deprecated)) | __attribute__ |
This will launch the self service help over the current view
tags | : External tags as array of strings |
- (void) showSelfHelpForTags: | (NSArray *) | tags | |
withDisplayOrder: | (NSArray *) | displayOrder | |
onViewController: | (SDCWebViewController *) | viewController | |
This will launch the self service help over the current view
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 |
|
readwritenonatomicweak |
Delegate object to be registered to hear SDK initialization errors