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
SCServiceCloudDelegate
implementation using theSCServiceCloud.delegate
property. 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.serviceConfiguration
property.Customize the appearance of the interface (such as the colors, fonts, images, and strings) using the
SCServiceCloud.appearanceConfiguration
property. 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.
SCServiceCloud
allows you to explicitly set the authentication settings using-setAuthenticationSettings:forServiceType:completion:
. You can also check the authentication for a particular service using-authenticationSettingsForServiceType:
. Refer toSCSAuthenticationSettings
for 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.
SCServiceCloud
lets 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.actions
property to get access toSCSActionManager
and the action button API.Declaration
Objective-C
@interface SCServiceCloud : NSObject
Swift
class ServiceCloud : NSObject
-
Delegate protocol to interact with the Service SDK, and to make decisions on behalf of the SDK.
See
SCServiceCloud
Declaration
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.serviceConfiguration
property on theSCServiceCloud
shared instance to set the configuration.Declaration
Objective-C
@interface SCSServiceConfiguration : NSObject
Swift
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.appearanceConfiguration
property on theSCServiceCloud
shared instance to set the appearance.Declaration
Objective-C
@interface SCAppearanceConfiguration : NSObject
Swift
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 *SCSAppearanceColorToken
Swift
struct SCSAppearanceColorToken : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
-
Enumerated list of all configurable image tokens.
Declaration
Objective-C
typedef NSString *SCSAppearanceImageToken
Swift
struct SCSAppearanceImageToken : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
-
Enumerated list of all configurable text label tokens.
Declaration
Objective-C
typedef NSString *SCSAppearanceLabelToken
Swift
struct SCSAppearanceLabelToken : _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 : NSObject
Swift
class SCSAuthenticationSettings : NSObject
-
Possible error response codes when authenticating a user with your Salesforce org.
See moreDeclaration
Objective-C
enum SCServiceErrorCode : NSInteger {}
Swift
enum SCServiceErrorCode : Int
-
Facility used to customize the logging level, and optional file output, of the Snap-ins components.
See moreDeclaration
Objective-C
@interface SCServiceLogger : NSObject
Swift
class ServiceLogger : NSObject
-
Service feature area. This value can be
SCServiceTypeCases
orSCServiceTypeKnowledge
. To learn how this is used for authentication, see Authentication.Declaration
Objective-C
typedef NSString *SCServiceType
Swift
struct SCServiceType : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
-
Logging level enumerated type. Use with
See moreSCServiceLogger
.Declaration
Objective-C
enum SCSLoggerLevel : uint8_t {}
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
SCSNotification
object represents a push notification that was sent to the app from your Salesforce connected app.The
See moreSCSNotification
class itself is an abstract class. Based on theuserInfo
dictionary passed to it from the push notification payload, a concrete subclass ofSCSNotification
is returned by calling:-[SCServiceCloud notificationFromRemoteNotificationDictionary:]
Declaration
Objective-C
@interface SCSNotification : NSObject
Swift
class SCSNotification : NSObject
-
A
See moreSCSNotificationType
defines the type of notification.Declaration
Objective-C
enum SCSNotificationType : NSInteger {}
Swift
enum SCSNotificationType : Int
-
Key values for the
SCSAuthenticationSettings
dictionary. 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 *SCSOAuth2JSONKey
Swift
struct SCSOAuth2JSONKey : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable