Knowledge Center next icon Export & Import Guide
Jul 20, 2023
5 minutes read

Export & Import Guide

Export Articles

Exporting articles is useful when you need to review your content or to use for an import. You can use the "Search" feature to find content in your database that use a specific dialog answer, context, intent, entity and more.

Once you've narrowed down your search using one of the filters, you can select "Export" by clicking on the more options menu to the right of the search filter. Article exports are available in JSON or Excel format.

Export articles:

export articles.gif

If you need to download all of the articles in your project, do not apply a search filter. Simply select "Export" from the more options menu and the file will be downloaded to your computer.

Export dialogs:
Dialog exports work similar, except you should export them from the Dialogs menu:

Note:

  • Dialog exports are available in JSON and Excel format
  • Dialogs currently cannot be imported

image.png

Getting Started with Importing Articles (JSON)

Completing the task of importing articles successfully requires a moderate level of knowledge and familiarity with JSON structures and the specific code implementation. Here's a breakdown of the knowledge needed:

  • JSON Basics: You should have a fundamental understanding of JSON syntax and how to work with JSON objects and arrays. This includes knowledge of key-value pairs, arrays, nested structures, and data types.
  • Content Structure: Understanding the structure of the existing code is crucial. You need to comprehend how articles, outputs, questions, categories, and other elements are organized within the code to add new content correctly.
  • Code Modification: You should be comfortable modifying JSON code directly. This involves adding new objects, updating properties, and ensuring proper syntax throughout the code. Familiarity with a code editor such as Visual Studio Code can be helpful.
  • Other: Depending on the specific implementation, understanding any additional functionalities like context variables, metadata, or conversation variables might be necessary.

The following guide assumes a foundational understanding of JSON and the existing code structure. Beginners might find it challenging to complete the task without some prior knowledge, while experienced developers or content managers familiar with JSON manipulation will likely find it easier to import new content successfully.

Download our guide on how to convert the exported JSON file into Excel.

Import Guide (JSON)

Your project must have at least 1 article in it to use the import feature. If you have a new project without any articles, please create an article before continuing with this guide.

Export an article from your database. Once you have your export, examine it to get familiar with the JSON structure for articles.

Understand the JSON structure:

  • The "Articles" array contains individual article objects.
  • Each article object includes details such as "Culture," "Id," "Outputs," "Questions," and "Categories."
  • The "Outputs" array contains one or more outputs associated with the article.
  • The "Type" field within an output specifies the output type ("Answer").
  • The "Text" field within an output contains the actual article content or answer.
  • The "Links" array within an output may contain links to relevant resources.
  • The "Questions" array includes user questions related to the article.
  • The "Categories" array assigns categories to the article.

Prepare Your Content

Once you are comfortable with the contents of the JSON file, you can begin to prepare the content for your import. You can use your article export as a template to prepare your content.

Before making significant changes to a JSON file, be sure to make a backup copy.

Tips:

  • Open your exported article in your preferred code editor to read and edit the JSON file.
  • Add a new object within the "Articles" array to represent the new content. The id for new articles must be “0”.
  • Articles must consist of at least 1 answer with the value ““IsDefault”: true” and 1 question.
  • Work in small batches to prevent errors. There is a limit of importing 200 articles at a time. If you exceed this limit when trying to import articles, you will receive a notification that tells you that you have exceeded the maximum number of articles.
  • Pay attention to proper usage of braces {}, square brackets [], colons :, commas ,, and quotation marks for strings.

Import Guide (Excel)

Your project must have at least 1 article in it to use the import feature. If you have a new project without any articles, please create an article before continuing with this guide. Dialogs cannot be imported.

Export articles from your database. Once you have your export, examine it to get familiar with the Excel export for articles.

Here are some general guidelines to follow when importing with Excel:

  • Import batches containing no more than 200 rows in the Answers tab
    - Get ONE Excel export and split this up into batches and work on each batch separately.
    - Articles must consist of at least 1 answer with the value ““IsDefault”: true” and 1 question.
    - If you are also updating questions, the Questions tab should contain the same ID's as the Answers tab (So when removing ID's from the Answers tab, make sure you remove the same ID's from the Questions tab.
  • If you need to update the questions in an article you will also need to update these questions with the same value in the Answers tab.
  • When updating answers that contain a link, be sure to check & compare the link values. For example: %{Link(1)})
    Check columns J & K in the Answers tab to make sure they align with one another.
  • Pay attention to proper usage of braces { }, square brackets [ ], colons :, commas, and quotation marks for strings.

KNOWN ISSUE:

  • In the categories column on the Questions & Answers tab, there is a small bug in the exports where you will find "SortOrder":NaN instead of "SortOrder":null. You will need to replace the “NaN” values with “null” which can be done with find and replace.
    - Select the entire column D in the Answers tab and find and replace this value (CTRL+H).
    - Ensure that Column D is still selected and do another Find/Replace:
    - Find what: .0,"N and Replace with: ,"N (Replace All)

Upload, Validate and Review

Once you have finished preparing your JSON or Excel import file, navigate to the article import section and upload your import file. Click the “Upload & Validate” button. The system will check and validate the file.

Review the article(s) to ensure it appears correct and contains the desired content and links. If everything looks good, click the “Import” button.

article-export.gif

Final Check

  • Verify that the imported articles are accessible and displayed correctly.
  • Perform tests to ensure that user questions are matched with the appropriate articles.
  • Confirm that any links within the articles are working as expected.

group icon
Get support

Can’t find the answer you are looking for?
Ask for the help of our chatbot, or get in touch with our support team.

Contact Support
Is this region a better fit for you?
Go
close icon