1

I am looking into building a web app using either the SOAP or REST API that would allow our clients team to generate new knowledgebase articles (service cloud) to be submitted to salesforce via the API.

This is for an internal portal project to make it easier for our client's team to format the articles.

I have found good information on creating new versions of an existing KnowledgeArticleVersion. However it is not clear from the documentation I have found how you would create a completely new KnowledgeArticle from scratch.

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_knowledgearticleversion.htm This page of the API docs talks about creating a new knowledge article, but I believe they are saying a new version of an existing article.

Is anyone able to provide any insight on how/if this can be accomplished through the API?

2

The knowledge article data model is polymorphic in nature .

Hence the creation of the knowledge article process is similar to creation of any other record except we have articletype appended by __kav to get the object name .

Hence to create Initial version in REST API i would use the same calls as i use for other object

http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_erd_knowledge.htm

You will have to insert knowledge article using REST API as below

https://www.salesforce.com/us/developer/docs/api_rest/Content/dome_sobject_create.htm

curl kav/">https://na1.salesforce.com/services/data/v20.0/sobjects/FAQ_kav/ -H "Authorization: Bearer token -H "Content-Type: application/json" -d @newaccount.json"

{
"summary" : "Express Logistics and Transport"
//Include various fields here 

}

Remember to set up REST API you will first have to OAUTH with salesforce or obtain session ID using login() call

Also once you draft an article you can manage its life cycle through various API documented in below guide in chapter 4

http://www.salesforce.com/docs/developer/knowledge_devpre/index.htm

  • Thanks! I worked on another SFDC project maybe 8-12 months ago and at that time I was forced to work with the SOAP api because the REST api did not have any methods for working with the service cloud. Are rest/soap API's now equally robust for working with the service cloud? – Matt Keys Mar 23 '14 at 15:04
  • Yes REST is pretty fast and one advantage i always enjoy with REST is its easier to handle JSON in browser than XML. – Mohith Shrivastava Mar 23 '14 at 17:54

protected by Community Oct 23 '18 at 13:41

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.