Service Core
This is a list of common classes used throughout the SDK. The entry point into this SDK is through the SCServiceCloud class. Refer to that class to get started.
-
Shared singleton class used as the primary access point for the Snap-ins SDK.
Overview
This class gives you access to all the features of the SDK and allows you to configure or customize the SDK. Use the
+[SCServiceCloud sharedInstance]class method to access the singleton for this class.You can access each of the SDK features with properties on this singleton:
SCServiceCloud.knowledge,SCServiceCloud.cases,SCServiceCloud.chatUI,SCServiceCloud.sos.Specify your
SCServiceCloudDelegateimplementation using theSCServiceCloud.delegateproperty. With this delegate, you can respond to events and make decisions on behalf of the SDK.Configuration & Customization
Specify the Knowledge and Case Management configuration settings using the
SCServiceCloud.serviceConfigurationproperty.Customize the appearance of the interface (such as the colors, fonts, images, and strings) using the
SCServiceCloud.appearanceConfigurationproperty. To learn more about SDK customizations, see Color Branding and SDK Customizations in the Developer Guide.Authentication & Notifications
Knowledge and Case Management both have an option to authenticate users so that users can access information related to their user account or their user profile. To learn more about authentication, see Authentication.
SCServiceCloudallows you to explicitly set the authentication settings using-setAuthenticationSettings:forServiceType:completion:. You can also check the authentication for a particular service using-authenticationSettingsForServiceType:. Refer toSCSAuthenticationSettingsfor the core class associated with authentication.Authenticated users can be notified using push notifications when there is activity on their cases. To learn more about notifications see Push Notifications for Case Activity.
SCServiceCloudlets you determine whether the SDK can handle a remote push notification with-notificationFromRemoteNotificationDictionary:. If the notification can be handled by the SDK, pass it to the-showInterfaceForNotification:method.Action Buttons
You can customize the action buttons used throughout the UI. You can override the look and the behavior of existing buttons, and you can create buttons associated with new actions. Use the
See moreSCServiceCloud.actionsproperty to get access toSCSActionManagerand the action button API.Declaration
Objective-C
@interface SCServiceCloud : NSObjectSwift
class ServiceCloud : NSObject
-
Delegate protocol to interact with the Service SDK, and to make decisions on behalf of the SDK.
See moreSee
SCServiceCloudDeclaration
Objective-C
@protocol SCServiceCloudDelegate <NSObject>Swift
protocol SCServiceCloudDelegate : NSObjectProtocol
-
Class used to specify Service Cloud configuration settings.
Pass an instance of this class to the
See moreSCServiceCloud.serviceConfigurationproperty on theSCServiceCloudshared instance to set the configuration.Declaration
Objective-C
@interface SCSServiceConfiguration : NSObjectSwift
class SCSServiceConfiguration : NSObject
-
Configuration class used to customize the settings that influence the branding and coloring of UI elements used throughout the SDK.
Pass an instance of this class to the
See moreSCServiceCloud.appearanceConfigurationproperty on theSCServiceCloudshared instance to set the appearance.Declaration
Objective-C
@interface SCAppearanceConfiguration : NSObjectSwift
class SCAppearanceConfiguration : NSObject -
Delegate protocol for responding to style and branding customization requests at runtime.
See moreDeclaration
Objective-C
@protocol SCAppearanceConfigurationDelegate <NSObject>Swift
protocol SCAppearanceConfigurationDelegate : NSObjectProtocol
-
Enumerated list of all configurable color tokens. To learn about color branding, see Color Branding.
Declaration
Objective-C
typedef NSString *SCSAppearanceColorTokenSwift
struct SCSAppearanceColorToken : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable -
Enumerated list of all configurable image tokens.
Declaration
Objective-C
typedef NSString *SCSAppearanceImageTokenSwift
struct SCSAppearanceImageToken : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable -
Enumerated list of all configurable text label tokens.
Declaration
Objective-C
typedef NSString *SCSAppearanceLabelTokenSwift
struct SCSAppearanceLabelToken : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable -
Possible error response codes when authenticating a user with your Salesforce org.
See moreDeclaration
Objective-C
enum SCServiceErrorCode {}Swift
enum SCServiceErrorCode : Int -
Service feature area. This value can be
SCServiceTypeCasesorSCServiceTypeKnowledge. To learn how this is used for authentication, see Authentication.Declaration
Objective-C
typedef NSString *SCServiceTypeSwift
struct SCServiceType : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
-
Authentication settings for the Snap-ins SDK. This class is necessary if you want to use any of the SDK features in authenticated mode. You’ll need to authenticate, for instance, if you want to access a knowledge base only accessible to logged in users, or if you want a user to view and manage their cases. Create an instance of this class using one of the provided initialization methods.
You can either authenticate explicitly using
-[SCServiceCloud setAuthenticationSettings:forServiceType:completion:]or you can authenticate on-demand by implementing-[SCServiceCloudDelegate serviceCloud:shouldAuthenticateServiceType:completion:].To learn more about authentication, see Authentication.
See moreDeclaration
Objective-C
@interface SCSAuthenticationSettings : NSObjectSwift
class SCSAuthenticationSettings : NSObject -
Key values for the
SCSAuthenticationSettingsdictionary. When creating anSCSAuthenticationSettings, be sure to at least specify the required keys.SCSOAuth2JSONKeyAccessToken: Access token (REQUIRED)SCSOAuth2JSONKeyInstanceUrl: URL for your org instance (REQUIRED)SCSOAuth2JSONKeyRefreshToken: Refresh tokenSCSOAuth2JSONKeyCommunityUrl: URL for the communitySCSOAuth2JSONKeyCommunityId: ID for the communitySCSOAuth2JSONKeyIdentityUrl: URL for the identity
Declaration
Objective-C
typedef NSString *SCSOAuth2JSONKeySwift
struct SCSOAuth2JSONKey : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
-
Facility used to customize the logging level, and optional file output, of the Snap-ins components.
See moreDeclaration
Objective-C
@interface SCServiceLogger : NSObjectSwift
class ServiceLogger : NSObject -
Logging level enumerated type. Use with
See moreSCServiceLogger.Declaration
Objective-C
enum SCSLoggerLevel {}Swift
enum SCSLoggerLevel : UInt8
-
Protocol used by UI components that are capable of being minimized.
See moreDeclaration
Objective-C
@protocol SCSMinimizable <NSObject>Swift
protocol SCSMinimizable : NSObjectProtocol -
Delegate protocol used to interact with, and be informed of changes to, minimizable controllers.
See moreDeclaration
Objective-C
@protocol SCSMinimizableDelegate <NSObject>Swift
protocol SCSMinimizableDelegate : NSObjectProtocol
-
An
SCSNotificationobject represents a push notification that was sent to the app from your Salesforce connected app.The
See moreSCSNotificationclass itself is an abstract class. Based on theuserInfodictionary passed to it from the push notification payload, a concrete subclass ofSCSNotificationis returned by calling:-[SCServiceCloud notificationFromRemoteNotificationDictionary:]Declaration
Objective-C
@interface SCSNotification : NSObjectSwift
class SCSNotification : NSObject -
A
See moreSCSNotificationTypedefines the type of notification.Declaration
Objective-C
enum SCSNotificationType {}Swift
enum SCSNotificationType : Int
Install in Dash
Service Core Reference