Importing external knowledge
Before ending this section, let’s spend a few minutes talking about how we can import articles into Salesforce Knowledge that come from external sources (that is, an old knowledge system or an external website).
The process of importing articles involves creating a ZIP file containing all the required information. To do this, follow these steps:
- Create a CSV file that holds the first row of all the fields that will be imported into Salesforce (for example, Record Type, Title, Language, Data Categories, and so on—basically, any custom field), as well as all the article’s information on the following rows. If a field is typed as rich text or file, the corresponding HTML files, images, or generic file formats can be added as a relative path from the ZIP’s content structure.
- Define a property file (it has to be named with the .properties extension) that contains the key import parameters (such as date/time format or CSV encoding/separator).
- Add the required extra content (such as HTML files and images for rich text fields or generic files for file type fields) to subfolders (for example, data/html, data/images, and data/files). Remember to respect the relative folder paths when creating CSV files. For example, if the Description__c custom field is a Rich Text field and it contains some HTML formatted data, in the CSV on the row of the KN001 article, just fill in the corresponding column with the data/html/art_desc_KN001.html value, which refers to the path on the ZIP file we’re going to create. If the HTML file contains a reference to the KN001-01.png image, that image should be linked with an tag within the HTML file, pointing to the relative path of the image within the ZIP, that is, data/images/KN001-01.png.
- Create a ZIP file, which must contain the root folder of the CSV file, the properties file, and all the required subfolders.
- Import the file from Setup | Data | Import Articles and monitor the import process from Setup | Environments | Monitoring | Article Imports.
The following are some limitations to consider (these are just a few):
• There can only be one CSV file and one properties file, and they must be in the root directory of the ZIP file.
• Filenames must not contain any special characters.
• The ZIP process must preserve the folder’s structure (which is natural since CSV and HTML may have local references to other files).
• A ZIP file must be under 20 MB in size and each uncompressed file must be under 10 MB in size.
• A CSV file must have less than 10,000 data rows (1 header and 9,999 article detail rows).
• Each row must have less than 400,000 characters and any cell in the CSV file must be smaller than 32 KB.
• An article can have up to 49 translations inside a given CSV file.
Refer to Salesforce Help at https://help.salesforce.com/articleView?id=knowledge_article_importer.htm&type=5 for more details about the import feature of Knowledge articles.
If you need to import translations of articles that are already on the CRM, please refer to Salesforce Help at https://help.salesforce.com/articleView?id=knowledge_translation_import.htm&type=5.