Download KB article from KB's

Yug Bisen
Tera Contributor

Can we download KB articles from any of the knowledge base in one shot? If yes, How?

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hi @Yug Bisen ,

The first thing we need to do is navigate to the [kb_knowledge] table (this is where all articles are stored) and filter a list of what we want to work with. For the sake of demo and explanation I'll just use one article for now:

SandeepDutta_0-1701239394710.png

 

As a side note - one of the main differences between an XLSx and XML export, is that XLSx will only include the attributes of the columns you see in the list view, where-as XML will include all. This is one of the reasons it's often used to migrate data between a sub-Prod > Prod instance as it can preserve sys_id's.

To export our list, we can click on any column header in the list and select the following path:

SandeepDutta_1-1701239394856.png

 



Once downloaded, we can view the XML in a browser or code editor like Visual Studio code to validate it's formed correctly:

SandeepDutta_2-1701239394701.png

 



For those who don't know, XML's attributes are called "namespaces" and in this scenario they correlate to the fields on the table we created our extraction from. This is why we can see "sys_updated_on" or "short_description" etc.

What we need to make a note of in this example is the following:

  • number - we will use this in our transform script later
  • article_id - you may need to use this in the transform script
  • language - this will form an important part of our import and be used in the transform script later
  • latest - this can be used to ensure we create a relationship with the latest version of this article, if "Version Control" is used. So review as per your needs.
  • kb_knowledge_base - this will help us map our new translated article into the correct KB
  • kb_category - this will help us map our new translated article into the correct category for the correct KB
  • meta - if we translate Meta to assist search results, then this is how we can populate them into the new article
  • short_description - this will become the new article's title
  • text - this will become the body of the new article

 

View solution in original post

3 REPLIES 3

Community Alums
Not applicable

Hi @Yug Bisen ,

The first thing we need to do is navigate to the [kb_knowledge] table (this is where all articles are stored) and filter a list of what we want to work with. For the sake of demo and explanation I'll just use one article for now:

SandeepDutta_0-1701239394710.png

 

As a side note - one of the main differences between an XLSx and XML export, is that XLSx will only include the attributes of the columns you see in the list view, where-as XML will include all. This is one of the reasons it's often used to migrate data between a sub-Prod > Prod instance as it can preserve sys_id's.

To export our list, we can click on any column header in the list and select the following path:

SandeepDutta_1-1701239394856.png

 



Once downloaded, we can view the XML in a browser or code editor like Visual Studio code to validate it's formed correctly:

SandeepDutta_2-1701239394701.png

 



For those who don't know, XML's attributes are called "namespaces" and in this scenario they correlate to the fields on the table we created our extraction from. This is why we can see "sys_updated_on" or "short_description" etc.

What we need to make a note of in this example is the following:

  • number - we will use this in our transform script later
  • article_id - you may need to use this in the transform script
  • language - this will form an important part of our import and be used in the transform script later
  • latest - this can be used to ensure we create a relationship with the latest version of this article, if "Version Control" is used. So review as per your needs.
  • kb_knowledge_base - this will help us map our new translated article into the correct KB
  • kb_category - this will help us map our new translated article into the correct category for the correct KB
  • meta - if we translate Meta to assist search results, then this is how we can populate them into the new article
  • short_description - this will become the new article's title
  • text - this will become the body of the new article

 

Yug Bisen
Tera Contributor

Thanks @Community Alums 

I need to download all the articles present under any Knowledge base, and this process should get automate on monthly or quarterly basic.

Community Alums
Not applicable

Hi @Yug Bisen ,

Your original question has been answered and please mark the appropriate answers, please raise another question for automate on monthly or quarterly basic.