Data Import Format
Introduction
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.
In-Depth Guides
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 knowledge.json
Folder Structure
The complete knowledge package should be a zip file containing the following structure:
/package
├── manifest.json
└── /knowledgehub
├── knowledge.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.
- knowledge.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.
Workflow
-
Create manifest.json
: Develop the
manifest.json
file to include essential metadata for the import package. -
Establish Folder Structure
: Set up the necessary folder hierarchy within
knowledge.json
. -
Define Topic Structure
: Outline the topic structure that categorizes and organizes the articles in
knowledge.json
. -
Set Up Portals
: Configure the portal(s) to manage and display the knowledge content to end-users in
knowledge.json
. -
Integrate Structures into knowledge.json
: Combine the defined folder, topic, and portal structures into the single
knowledge.json
file. -
Develop articles.json
: Create the
articles.json
file containing the detailed content of all knowledge articles.
Required Files
manifest.json
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"
}
}
Creating manifest.json
- 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 |
knowledge.json
This file defines the structure of the knowledge base, including folders, topics, and portals. See the dedicated guides for detailed instructions.
Example Snippet:
{
"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"
}
]
}
}
]
}
}
articles.json
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"
}
]
}
]
}