Help Center

Articles

From version 10.0.0 of the iOS SDK you can display your Help Center, show articles programmatically, filter your Help Center content and using our data methods, deeply embed your Intercom Help Center alongside your own content.

Check here for more content on setting up your Help Center in Interccom.

To display a ViewController with your Help Center content, call the following method:

  1. objectivec
  2. swift
[Intercom presentHelpCenter];

If you don't have Help Center enabled in your Intercom settings the method presentHelpCenter will fail to load. To enable your Help Center please go here and click the "Turn On Help Center" button.

Present an Article Programmatically

From version 8.1.0 of the iOS SDK you can programmatically present an Article. To present an Article, pass in an articleID from your Intercom workspace to the following method:

  1. objectivec
  2. swift
[Intercom presentArticle:@"123456"];
Make sure the article is live

An article must be ‘live’ to be used in this way. If it is in a draft or paused state, end-users will see an error if the app tries to open the content.

Collections

Present a filtered Help Center

From version 10.0.0 of the iOS SDK you can now pass in 1 or more collection IDs to filter the Help Center. This will display the same ViewController as calling presentHelpCenter but the collections list will only show the IDs passed in.

  1. objectivec
  2. swift
[Intercom presentHelpCenterCollections:@[@"COLLECTION_1_ID", @"COLLECTION_2_ID"]];

If the collection IDs are invalid or have no content, we will default to showing the complete Help Center list.

Fetch Collections

To fetch a list of all Collections call:

  1. objectivec
  2. swift
[Intercom fetchHelpCenterCollectionsWithCompletion: completionBlock];

A successful response will return an Array of ICMHelpCenterCollection objects. An ICMHelpCenterCollection contains the follow values:

NameTypeDescription
summaryNSStringA string that describes the collection
collectionIdNSStringAn identifier for that collection, this can be used to fetch the sections/articles for this
titleNSStringThe name of the collection

Fetch the contents of a collection

To get a list of sections/articles for a collections call:

  1. objectivec
  2. swift
[Intercom fetchHelpCenterCollection:@"COLLECTION_ID" withCompletion: completionBlock];

This method requires a COLLECTION_ID. You can get the IDs of your collections from fetchHelpCenterCollections or searchHelpCenter methods.

A collection can have a section (a group of articles with a header) or articles without a section. A successful response will return a ICMHelpCenterCollectionContent object. It contains the follow values:

NameTypeDescription
collectionIdNSStringThe ID for that collection
titleNSStringThe name of the collection
summaryNSStringA string that describes the collection
articlesNSArrayAn array of ICMHelpCenterArticle objects
sectionsNSArrayAn array of ICMHelpCenterSection objects

A section is a grouping of articles with a name. The ICMHelpCenterSection model is described as:

NameTypeDescription
titleNSStringThe name of the section
articlesNSArrayAn array of ICMHelpCenterArticle objects

The ICMHelpCenterArticle model can be found both inside of sections, or at the top level of the collection content (not a part of any section). The ICMHelpCenterArticle model is described as:

NameTypeDescription
articleIdNSStringThe ID for that article, this can be used to display the article calling presentArticle: articleId
titleNSStringThe title of the article

Search the Help Center

To get a list of articles in the Help Center, filtered by a search term call:

  1. objectivec
  2. swift
[Intercom searchHelpCenter:@"SEARCH_TERM" withCompletion: completionBlock];

The method requires an NSString with a term to search. A successful response will return an NSArray of ICMHelpCenterArticleSearchResult objects. It contains the follow values:

NameTypeDescription
articleIdNSStringThe ID for that article, this can be used to display the article calling presentArticle: articleId
titleNSStringThe title of the article
matchingSnippetNSStringThe part of the article that matched the search string provided
summaryNSStringA summary of the article

Errors returned from any of the methods come back in the ICMHelpCenterDataError object. The error can have the following types:

NameDescription
notFoundA 404, the content does not exist or has been removed
serverErrorThere was a server error, this covers most unsuccessful response codes. The code is returned in the log.
missingUserIdentityyou need to have registered a user to use any of the Intercom Help Center methods.
missingAppIdentityyou need to have set your app_id and api_key before calling any of the Help Center methods
invalidResponseObjectthe server returned a 200 but the response could not be modelled by the Intercom SDK
unknownErroran unknown error type has occurred