Skip to main content

Intent export and import

In new projects, you can reuse intents created in other projects by using the export and import features.

Export

To export all intents from the project, navigate to Intents and click above the list of intents. A JSON file will be downloaded, which can be used for importing intents to a new project.

tip
You can also export the entire project by clicking Download next to the project name. In the downloaded archive, the nlu.json file contains NLU data, including intents and their settings.

Import

To import intents, navigate to the Intents section and click Import on the top panel. Select the necessary file and what should be done with existing intents and intents having duplicate names. Click Import again.

tip
The file contains an array of intents with all their configured parameters, slot filling settings, and training phrases.

File structure

Intents

Objects representing each intent contain the following properties:

PropertyTypeDescriptionRequired
idNumberIntent IDNo
pathStringIntent pathYes
descriptionStringIntent descriptionNo
answerStringDefault answerNo
enabledBooleanTrue when the intent is enabledNo
phrasesArray of objects with a text propertyTraining phrasesYes
patternsArray of stringsTraining patternsNo
slotsArray of objectsSlotsNo

Slots

The slots property contains an array objects describing slots — entities that are requested during slot filling. Every object contains the following properties:

PropertyTypeDescription
nameStringSlot name
entityStringThe corresponding entity name
requiredBooleanTrue when the slot is required
promptsArray of stringsClarifying questions
arrayBooleanTrue when the slot is processed as an array

File example

The imported file must be in JSON format. The following example illustrates a valid file:

[
{
"id": 12345,
"path": "/Callback",
"enabled": true,
"shared": false,
"phrases": [
{
"text": "Could you call me later"
},
{
"text": "Call me back @duckling.time"
}
],
"classificationRules": {
"refs": []
},
"patterns": [],
"slots": [
{
"name": "dateTime",
"entity":"duckling.time",
"required": true,
"prompts": [
"When should I call you back?",
"When will it be best to call?"
],
"array": false
}
],
"priority": 0
}
]