Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Importing content

Updated on April 27, 2021

Import content into Pega Knowledge from an external source such as a legacy content system or a translation services vendor by using a pre-defined CSV file template. You can also update existing content using this file template.

Pega Knowledge User Guide Pega Knowledge User Guide Pega Knowledge User Guide Pega Knowledge User Guide Pega Knowledge User Guide Pega Knowledge User Guide

Note the following restrictions about the import process:

  • You can only import content using the standard CSV file format.
  • You cannot import file attachments. If an article has attachments, manually add the attachments after the import.
  • You cannot import embedded images in articles. If the image is a link to an external repository, the link will be imported.

To import or update content, download the CSV file template from the Knowledge portal, populate the file by mapping the data columns in the file to your Pega Knowledge content structure, and then import the file.

This section contains the following topics:

  • Downloading the CSV file
  • Populating the CSV file
  • Adding additional data attributes to the CSV file
  • Importing the CSV file
  • Viewing the import results

Downloading the CSV file

Download the CSV file from the Pega Knowledge portal and populate it with information about the content that you want to import or update.

  1. Log in to Pega Knowledge portal.
  2. In the left navigation pane, click Knowledge > Content.
  3. Click the Import Content tab, and then click Import.
  4. In the Import content window, click Download Template.

Populating the CSV file

The CSV file template contains columns that represent the data that you map to your Pega Knowledge content data structure. Each row and column represents an article. If the data columns do not match your existing data structure, you can update the template by adding additional data columns. For more information, see Adding additional data attributes to the CSV file later in this section.

The following figure shows an example of the CSV file template:

Pega Knowledge uses the Content ID column to import or update content, based on the following rules:

  • When importing content, if you do not provide the content ID in the CSV file, Pega Knowledge creates a new content ID for the article.
  • When updating content, if you provide the content ID in the CSV file, the new content replaces the existing content that matches that ID.

The following table lists and describes the data columns in the CSV file, and indicates whether that data is required when updating or importing content in Pega Knowledge.

Note: The CSV file template has a limit of 32,767 characters (including spaces). Pega Knowledge imports the content up to the character limit. If the number of characters exceeds the limit, you can use the LinkToPrevious column as described in the following table to import the remaining content.
Data ColumnDescriptionRequired?
ContentID

The content ID of the article in the Pega Knowledge portal.

The ContentID should exist in the system, and the format should include the KC- prefix. Example: KC-123.

Y= if updating existing content

N = if importing new content

ContentTitleThe title of the article.Y
ContentAbstractThe abstract information for the article.Y
ContentType

Enter the type of content, for example, URL, Authored, or any other valid content type.

  • URL - Refers to a URL that points to the content.
  • Authored - Refers to a Pega Knowledge article (not a link to another article or website).

If you leave this column empty, Authored is the default.

Y
Language

The default language used for the articles. English is the default language.

  • To add another language, enter the 2-character abbreviation for the language in the Language column. For example, FR for French. To view a list of the 2-character language abbreviations, in the Authoring portal, select Configurations > Languages.
  • If you leave this column empty, Pega Knowledge uses the language specified in the pyDefault rule in D_KMApplicationSettings.
  • If you are updating content, you can specify the associated language in the CSV file or you can edit the article in the Pega Knowledge portal prior to importing.
N
Category

The category associated with the article.

  • To associate an article with multiple categories, use comma-separated values in the CSV file. Spaces are not required after the commas. Example: Customer Service,General Q & A.
  • When importing content, if you leave this column empty, Pega Knowledge uses the Uncategorized category.
  • If you specify a category that is not already defined in the Taxonomy, the category is not linked to the content and you will receive an Invalid category error.
  • When updating content, if you add another category to the CSV file, the new category is added to the existing categories of the content.
N
Tags

The tags or synonyms associated with the article.

When importing or updating content, you can add multiple tags as comma-separated values in the Tags column. Spaces are not required after commas. Example: travel tips,travel,foreign.

N
ContentBody

The content of the article.

Note: HTML tags are supported only in ContentBody because it uses the Rich Text Editor (RTE).
Y
LinkToPrevious

Use this column to import the remaining content when you have exceeded the 32,767 character limit (including spaces) and there are additional articles to import.

Perform the following steps to import the remaining articles:

  1. Add the content to the next row.
  2. Enter True in the LinkToPrevious column.
  3. You can repeat steps 1 and 2 in subsequent rows for large articles.
    Note: Leave the ContentID column empty for articles that you have added in the second row and subsequent rows.

Y = if you have exceeded the character limit and you want to import the remaining content.

N = if you have not exceeded the character limit.

ReasonForEditIf you are updating existing content, enter the reason for the update. Y = If updating existing content.

N = If importing new content.

Adding additional data attributes to the CSV file

If the CSV file has data columns that do not match your existing data structure, you can add data attributes to the CSV file that represent your existing data structure.

  1. Define the additional attributes that you want to add to the CSV file as properties of the PegaFW-KM-Data-ImportContent class.
  2. Map the newly created properties to the existing properties of the PegaFW-KM-Work-Content class or hierarchy:
    • If you are importing new content, map the properties using the PrepareImportedContentWorkPage data transform.
    • If you are updating existing content, map the properties using the KMUpdateContent activity.
  3. Add the new properties you created as column names in the CSV file.
  4. Upload the updated CSV file in the KMImportContentDetails binary file rule.
  5. To set the updated CSV file as the new pre-defined template, edit the KMImportContentDetails binary file rule, and then upload the updated CSV file in the rule. Pega Knowledge users can now download the updated file template.

Importing the CSV file

After populating the CSV file, perform the following steps to import the file. This process imports the new content or updates the existing content in the Pega Knowledge portal.

  1. Log in to the Pega Knowledge portal.
  2. In the left navigation pane, click Knowledge > Content.
  3. Click the Import Content tab, and then click Import. The Import content window appears.
  4. Click Choose file, and then select the CSV file to import.
  5. Click Import.
  6. On the Web Options dialog box, click the Encoding tab.
  7. In the Save this document as: field, select Unicode (UTF-8).
  8. Click OK.
    The imported content moves to the Knowledge Content - Imported workbasket. Pega Knowledge generates a Content ID for each new article.

    Only successful imports are moved to the Knowledge Content - Imported Workbasket. If errors occur while importing the CSV file, error messages that describe the failure are displayed on the resulting Import page.

Viewing the import results

After importing content, you can view the results of the import process in the Import content tab. This page shows successful and failed imports, and includes the row numbers, generated IDs, and comments (error messages) of the imported rows. The following example shows the result of the import process.

You can open an article by clicking the ID number or navigating to the Knowledge Content – Imported workbasket. The content displayed in this workbasket is in the New-Draft stage, which allows you to continue editing, approving, and publishing the content according to the standard Pega Knowledge authoring flow.

Note the following:

  • When updating content, the ContentID that you provided in the CSV file is automatically populated in the Knowledge Content - Imported workbasket with the Pending- Publish status. You can navigate to the workbasket and edit the content as needed.
  • You cannot update content that has a KC-xx ID and a status of Withdrawn, Archived or Rejected.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us