Recently while implementing Knowledge for one of my customers, I spend quite a good amount of time doing operations on Knowledge Articles through Flow. This post will focus on two highly used Knowledge Article operations i.e. Publish and Edit.
Before I go into further details, I will highly recommend you go through the below post to understand the Knowledge Data Model. Understanding Knowledge Data Model is the key as it will help you to use these actions in flow effectively and correctly. Here is the post –
Understanding Salesforce Lightning Knowledge Data Model
With the assumption that you know Data Model quite well, let’s dive in –
Edit Knowledge Article
- Action – The possible values are
- “EDIT_AS_DRAFT_ARTICLE” and
- “EDIT_AS_DRAFT_TRANSLATION”.
- Unpublish – “True” will archive the current published version and create a draft version. “False” will keep the current version published and create a new draft version.
- Article ID: Article Id of the master published article. A draft article will be created from this one.
Publish Knowledge Article
- Article Version ID List – This is the list of article version ids. In your flow, you need to query and store the version ids in a collection and then use that collection here.
- Publish Action – Possible values are
- PUBLISH_ARTICLE – This will replace the existing online article.
- PUBLISH_ARTICLE_NEW_VERSION – This will create a new online version.
- SCHEDULE_ARTICLE_FOR_PUBLICATION
- PUBLISH_TRANSLATION
- Schedule Publish Date – You can schedule the publication by entering future dates.
Other Knowledge Actions
- Archive online knowledge articles
- Delete Knowledge Articles
- Restore archived knowledge article version
- Submit Knowledge Article for Translation
@Sudipta, thank you very much for writing this up! I'm running into some issues with the Article Version ID List for Publish. Would you please consider fleshing out that portion of your example a bit more, including detail in the step prior as well? Thanks!
Hi Mia,
You basically need to query the article and get the article version id and store that in Flow collection variable. I would suggest you go through the below post to understand the Knowledge Data Model – https://www.sudipta-deb.in/2020/09/understand-salesforce-lightning.html
While SCHEDULE_ARTICLE_FOR_PUBLICATION in a flow including Schedule Publish Date what is the date format we need to pass as when I am passing the date from a date field in salesforce as a text input I have an error Invalid date format. Error ID: 2147316246-26494 (705024376)
Awaiting your reply on this message Sudipta Deb "While SCHEDULE_ARTICLE_FOR_PUBLICATION in a flow including Schedule Publish Date what is the date format we need to pass as when I am passing the date from a date field in salesforce as a text input I have an error Invalid date format. Error ID: 2147316246-26494 (705024376)"
Hi, Did you able to resolve Invalid date format issue?
Its not my first time to pay a quick visit this site, i am visiting
this web page dailly and obtain nice facts from here all the
time.
Can you write flow step by step? how to store Article version ID
Sure Prachi. Let me take this as action item and soon I will publish an article and youtube video. You can subscribe to my channel @ https://bit.ly/3vCQKpg