To import data into the eGain knowledge system from any external source, the data must be organized into a specific format. This guide and its related articles outline the required folder structure and file formats to ensure a successful data import.
For detailed instructions on creating each component, please refer to the following guides:
- Guide to Folder Import
- Guide to Article Import
- Guide to Topic Import
- Guide to Portal Import
- Guide to assembling knowledgehub.json
The complete knowledge package should be a folder containing the following structure:
/package
├── manifest.json
└── /knowledgehub
├── knowledgehub.json
└── /articles
├── articles.json
├── /content
│ └── sample_article.html
├── /inline_resources
│ └── sample_image.jpg
└── /resources
└── Ref Guide.pdf- manifest.json: Contains metadata about the data import package.
- knowledgehub.json: Defines the knowledge base structure, including folders, topics, and portals.
- articles.json: Contains the content and metadata of the knowledge articles.
- /content: Contains the article body in HTML format.
- /inline_resources: Contains inline attachments (like images) used in articles.
- /resources: Contains downloadable attachments (like PDFs) used in articles.
- Create manifest.json: Develop the
manifest.jsonfile to include essential metadata for the import package. - Establish Folder Structure: Set up the necessary folder hierarchy within
knowledgehub.json. - Define Topic Structure: Outline the topic structure that categorizes and organizes the articles in
knowledgehub.json. - Set Up Portals: Configure the portal(s) to manage and display the knowledge content to end-users in
knowledgehub.json. - Integrate Structures into knowledgehub.json: Combine the defined folder, topic, and portal structures into the single
knowledgehub.jsonfile. - Develop articles.json: Create the
articles.jsonfile containing the detailed content of all knowledge articles.
The manifest.json file provides essential metadata for the data import package, including the package name and the department to which the data will be imported.
Example:
{
"packageName": "Data import from Purple Nile Retail department",
"department": {
"name": "PurpleNile Retail"
}
}- Create a new JSON file named manifest.json.
- Enter the necessary parameters:
| Parameter | Description | Type | Required |
|---|---|---|---|
| packageName | Name of the package | String | Yes |
| department.name | Name of department to import package | String | Yes |
This file defines the structure of the knowledge base, including folders, topics, and portals. See the dedicated guides for detailed instructions.
{
"knowledge": {
"folders": [
{
"name": "Purple Nile Retail - Sample Data",
"description": "",
"folders": []
}
],
"topics": [
{
"name": "Credit Card and Payments",
"description": "",
"addArticles": {
"fromArticles": [
{
"path": "Purple Nile Retail - Sample Data/Credit Cards & Payments/E-Gift Cards"
}
]
}
}
],
"portals": [
{
"name": "Customer Portal",
"description": "",
"addTopics": {
"fromTopics": [
{
"path": "Credit Card and Payments"
}
]
}
}
]
}
}This file contains the content of the knowledge articles, including metadata, content, and references to resources such as images and documents.
Example Snippet:
{
"articles": [
{
"name": "Chat Links",
"folder": {
"path": "Reasoning Engine/Content/Shared"
},
"content": "content/order-history.html",
"availabilityDate": "2025-01-28T19:53:58Z",
"description": "Sample Article",
"summary": "Sample Article",
"keywords": "Chat",
"includeInGenAI": true,
"translations": [
{
"langCode": "es-ES",
"name": "Spanish",
"content": "content/order-history_es.html"
}
]
}
]
}