Knowledge
This is a list of classes related to Knowledge. The entry point into this feature is through the SCKnowledgeInterface
class. Refer to that class to get started.
-
The
SCKnowledgeInterface
class is the main interface to the Knowledge SDK. Use this class to configure and customize the Knowledge interface.To get an instance of this class, use the
See moreSCServiceCloud.knowledge
property on+[SCServiceCloud sharedInstance]
.Declaration
Objective-C
@interface SCKnowledgeInterface : NSObject
Swift
class SCKnowledgeInterface : NSObject
-
Delegate protocol that defines the methods sent to the Knowledge delegate.
See moreDeclaration
Objective-C
@protocol SCKnowledgeInterfaceDelegate <NSObject>
Swift
protocol SCKnowledgeInterfaceDelegate : NSObjectProtocol
-
A
SCSKnowledgeManager
object is used to interact with knowledge data such as category groups, categories, and articles.The knowledge manager abstracts the storage, network retrieval, and queries for interacting with data in an efficient fashion. You can use this object to fetch categories and articles from your org. Once fetched, you can use this object to get cached content. See the
SCSArticleQuery
class for an explanation on how to query for content.The knowledge manager caches data for offline use, allowing categories and articles to be used even when no network is available. To stay informed about important changes in the underlying data model, any changes to the underlying categories will be advertised through the use of the following notifications:
SCSKnowledgeManagerCategoryAddedNotification
– A new category is added.SCSKnowledgeManagerCategoryUpdatedNotification
– A category has been modified (e.g. title, child categories, etc)SCSKnowledgeManagerCategoryDeletedNotification
– A category has been deleted.
The object of the notification will be the
See moreSCSKnowledgeManager
instance itself, while the category in question is stored in the notification’suserInfo
dictionary under theSCSKnowledgeManagerCategoryKey
key.Declaration
Objective-C
@interface SCSKnowledgeManager : NSObject
Swift
class KnowledgeManager : NSObject
-
Declaration
Objective-C
enum SCArticleSortByField {}
Swift
enum SCArticleSortByField : Int
-
Declaration
Objective-C
enum SCArticleSortOrder {}
Swift
enum SCArticleSortOrder : Int
-
Knowledge channel type.
See moreDeclaration
Objective-C
enum SCChannelType {}
Swift
enum SCChannelType : Int
-
Declaration
Objective-C
enum SCQueryMethod {}
Swift
enum SCQueryMethod : Int
-
Declaration
Objective-C
enum SCSArticleDownloadOption {}
Swift
enum SCSArticleDownloadOption : Int
-
Possible Knowledge error response codes.
See moreDeclaration
Objective-C
enum SCSKnowledgeErrorCode {}
Swift
enum SCSKnowledgeErrorCode : Int
-
A
SCSArticle
object represents a knowledge base article.This article may or may not already be downloaded locally. Use the
See more-[SCSArticle isArticleContentDownloaded]
property to check whether it is downloaded. You can download the article with the-[SCSArticle downloadContentWithOptions:completion:]
method.Declaration
Objective-C
@interface SCSArticle : NSObject
Swift
class Article : NSObject
-
View controller capable of displaying the contents of an article. When used in conjunction with a navigation controller, the
title
property of the view will automatically be set to the title of the article, ornil
if no article is assigned.Article content is automatically rendered into content capable of being displayed within this view controller. The articles data is laid out as HTML and rendered within a WKWebView instance.
HTML content is rendered using a structure like the following:
<html> <head> <meta name="viewport" content="initial-scale=1"/> <link rel="stylesheet" href="/style.css" type="text/css" media="all"/> <link rel="stylesheet" href="/article/{{article.id}}/style.css" type="text/css" media="all"/> </head> <body> <header> {{article.title}} </header> <main> <field name="{{field.name}}" type="{{field.type}}"> <field-title>{{field.title}}</field-title> <field-value>{{field.value}}</field-value> </field> ... </main> <script src="/script.js"></script> <script src="/article/{{article.id}}/script.js"></script> </body>