Importing content
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.
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.
- Log in to Pega Knowledge portal.
- In the left navigation pane, click .
- Click the Import Content tab, and then click Import.
- 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.
Data Column | Description | Required? |
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 |
ContentTitle | The title of the article. | Y |
ContentAbstract | The abstract information for the article. | Y |
ContentType | The type of content. Enter one of the following:
If you leave this column empty, Authored is the default. | Y |
Language | The default language used for the articles. English is the default language.
| N |
Category | The category associated with the article.
| 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. | 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:
| 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. |
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.
- Define the additional attributes that you want to add to the CSV file as properties of the PegaFW-KM-Data-ImportContent class.
- 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.
- Add the new properties you created as column names in the CSV file.
- Upload the updated CSV file in the KMImportContentDetails binary file rule.
- 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.
- Log in to the Pega Knowledge portal.
- In the left navigation pane, click .
- Click the Import Content tab, and then click Import. The Import content window appears.
- Click Choose file, and then select the CSV file to import.
- Click Import.
- On the Web Options dialog box, click the Encoding tab.
- In the Save this document as: field, select Unicode (UTF-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.
Previous topic Customizing the dashboard Next topic Exporting content