Newer Version Available
SObject Suggested Articles for Case
Syntax
- URI
- To return suggested articles for a case that is being created—that is, as the case title, description, and other information are being entered but before the case has been saved and assigned an ID, use vXX.X/sobjects/Case/suggestedArticles?language=article language&subject=case subject&description=case description
- To return suggested articles for an existing case with an ID, use vXX.X/sobjects/Case/ID/suggestedArticles?language=article language
- Available since release
- 30.0
- Formats
- JSON, XML
- HTTP methods
- GET
- Authentication
- Authorization: Bearer token
- Request body
- None required
- Request parameters
-
Example for getting suggested articles for a case that’s being created
1curl https://yourInstance.salesforce.com/services/data/v30.0/sobjects/Case/suggestedArticles?
2language=en_US&subject=orange+banana&articleTypes=ka0&articleTypes=ka1
3 -H "Authorization: Bearer token"Example JSON response body
1[ {
2 "attributes" : {
3 "type" : "KnowledgeArticleVersion",
4 "url" : "/services/data/v30.0/sobjects/KnowledgeArticleVersion/ka0D00000004CcQ"
5 "Id" : "ka0D00000004CcQ"
6}, {
7 "attributes" : {
8 "type" : "KnowledgeArticleVersion",
9 "url" : "/services/data/v30.0/sobjects/KnowledgeArticleVersion/ka0D00000004CXo"
10 },
11 "Id" : "ka0D00000004CXo"
12} ]Usage
Salesforce Knowledge must be enabled in your organization. The user must have the “View Articles” permission enabled. The articles suggested include only the articles the user can access, based on the data categories and article types the user has permissions to view.
Articles are suggested based on a relevancy algorithm. The suggestedArticles resource is designed to get the IDs of articles relevant to a case. It’s intended to be used with other services that then use the IDs to get article data for display.