Overview

  • Most of the customers may be having existing knowledge articles that they want to move to Salesforce in order to make sure that the CRM and its knowledge are together within salesforce.
  • Salesforce Knowledge allows us to import existing articles and their translations with one file for each article type.
  • There are multiple things to be considered and a proper preparation done before moving the knowledge from an external system to Salesforce.

Considerations for Importing Knowledge

  • In order to import Knowledge Articles, “Manage Articles,” “Manage Knowledge Article Import/Export,” and “Manage Salesforce Knowledge” permissions needs to be enabled on Profile or through Permission Sets.
  • CRUD permissions may also be needed on the article types.
  • Import articles tool allows knowledge articles to be imported
  • Only one knowledge article type can be imported at a time.
  • If the article has translations they can be also be included in the CSV file.
  • Articles cannot be imported from other organization even within connected orgs i.e Sandbox to Production
  • When migrating from a Legacy system try to capture the Legacy Id as external id, this helps in keeping the data in sync.
  • Created data and last modified date are not available to be used in Formula Fields so be cautious and plan accordingly.
  • Migrating Data to rich text fields needs the creation of HTML files as described here. This works best in case of a limited set of articles and not easy to consider while working on a huge list of articles. Whenever you need to create articles with RTF fields just create Text area long field while you are migrating the data and push HTML content to that field using data loader. Once articles are imported, convert that field to RTF field.
  • Importing multi-language articles is another pain and we can’t import articles with translations using Data Loader and have to live with Import Articles tool.
  • Check to see if there are any limitations in Excel pertaining to the number of characters (old versions have limitations) that can be held in a cell and plan accordingly.
  • Leverage PublishingService Class in order to perform bulk operations on articles. This becomes important and handy in cases where we have a need to update published articles. We can write a small piece of code OR batch which will utilize methods from Publishing Service class.
  • Follow the Considerations for Data Loader, special characters, file encoding, and import.
  • For Lightning Knowledge, Import and export capabilities are introduced to further support the record type functionality. It allows you to choose a record type while importing articles. The great benefit of this addition is that you don’t have to add the record types later to the articles and all articles can be imported together unlike Classic knowledge where the import needs to be done by article type.
  • Follow the steps specified in Import Existing Information into Salesforce Knowledge
  • The article importer does not support subfields. If you have fields within fields, adjust structure and content before importing into Salesforce Knowledge.

Migration Steps – Salesforce Help documentation has clear information on the Migration steps.

      Prepare Articles for Import

  • Sort your existing articles by information type like FAQ, Products etc
  • Ensure that each information type has a corresponding article type that matches its structure and content.
  • Ensure the Field Level Security on Article Type allows for editing the fields that are about to be imported.

      Create a.CSV file for article Import

  • Create one.csv file per article.
    • There can only be one .csv file and one .properties file.
    • The .csv file and the .properties file must be in the root directory.
    • The compression process must preserve the folder and subfolder structure.
    • The .zip file name can’t contain special characters.
    • The .zip file can’t exceed 20 MB and the individual, uncompressed, files within the zip file can’t exceed 10 MB.
    • .csv files can’t have more than 10,000 rows, including the header row. Therefore, you can have a maximum of 9,999 articles and translations.
    • .csv file rows can’t exceed 400,000 characters.
    • .csv file cells can’t exceed 32 KB.
    • Each article in the .csv file can’t have more than 49 translations.
  • In the first row, specify the article type’s fields and metadata, such as language data categories or channels. Following fields and metadata to import content.
    • isMasterLanguage
    • Title
    • Standard and Custom Fields
    • Rich text area field
    • File Field
    • Data category groups
    • Channel
    • Language
  • In subsequent rows, specify the articles that need to be imported. Use one row per article and enter the appropriate information in each field or metadata column.
    • For rich text fields specify the relative path to the corresponding .html file in your .zip file.
    • Use the plus symbol (+) to specify more than one category or more than one channel.

       Specify article Import Parameters

  • Specify import parameters in a property file using key names and corresponding values.
  • Create a file with required parameters in Key=Value format.
  • Save the file as a .properties file
  • Example File Format:

DateFormat=yyyy-MM-dd

DateTimeFormat=yyyy-MM-dd HH:mm:ss

CSVEncoding=ISO8859_15_FDIS

CSVSeparator=,

RTAEncoding=UTF-8

       Create article .zip file for import and Import using Import Articles wizard.

  • Create a .zip file containing:
    • The .csv file.
    • The folder containing the .html files to import.
    • The folder containing the image files referenced in the .html files.
    • The .properties file.
  • From Setup, enter Import Articles in the Quick Find box, then select Import Articles.
  • Select the appropriate Article Type for the imported articles.
  • To select the .zip file, click Browse, and then click OK.
  • If your import contains translations, select the Contains translations? checkbox.
  • Click Import Now.

      Check Article and Translation Import and Export Status

Tools for Migrating Articles

      Salesforce Import wizard

  • While importing of knowledge articles, be careful with the type of files (.csv or .properties). Make sure the file extension is genuinely .properties or .csv
  • Give same name to .csv and .properties file
  • Most important – select all the files (.csv,.properties and folder containing .html files) and then make zip folder of it.

      Salesforce Knowledge Heroku tools

  • Salesforce Knowledge Heroku tools are built using the Salesforce Public API and this tool is not officially supported by Salesforce.
  • With the Salesforce Knowledge Heroku tools, you can mass export articles as a Zip file in the format of the Salesforce Article importer or the Heroku Article importer. This includes Rich Text Fields and images.
  • This is an unsupported Force.com labs application, more information regarding this tool can be found here: Salesforce Community: Knowledge Import/Export Tools
  • The tool itself is available here: https://kbapps2.herokuapp.com/

Limitations

  • The .zip file can’t exceed 20 MB and the individual, uncompressed, files within the zip file can’t exceed 10 MB.
  • .csv files can’t have more than 10,000 rows, including the header row. Therefore, you can have a maximum of 9,999 articles and translations.
  • .csv file rows can’t exceed 400,000 characters.
  • .csv file cells can’t exceed 32 KB.
  • Each article in the .csv file can’t have more than 49 translations.
  • while importing data into rich text area field
    • Images must be .png, .gif, or .jpeg files.
    • Each image file can’t exceed 1 MB.
    • .html files can’t exceed the maximum size for their field.
    • If a date doesn’t match the date format specified in the property file, the related article isn’t imported.
    • If an .html file references a file that isn’t allowed, the related article isn’t imported.
    • If a .html file references an image that’s missing, the related article is imported without the image.
  • In a file field each file must not exceed 5 MB.
  • When importing articles with translations and associated channels, only the master article retains the channels. The article translations have no associated channels upon import.
  • The article importer does not support subfields. If you have fields within fields, adjust your structure and content before importing into Salesforce Knowledge.

References

Leave a Reply

Your email address will not be published. Required fields are marked *