Use Bulk Import
The Bulk Import feature allows Teneo Studio users to quickly and efficiently import any language objects, entities, or Q and A pairs directly into a solution using a csv file holding all the relevant information. Such files are created using the Bulk Import format, which allows users to specify flow names, answer texts, multiple triggers, positive examples, variables and values, language object conditions, and entity entries with string and/or script variables and values, and the folder location. On this page, we will go over how exactly to execute a Bulk Import to add information to a Teneo Studio solution.
In this page we will go ahead and create a Bulk Import file for the following topics,
- Decaf options
- Secret menu
- Coffee beans
Let's get started.
Creating a Bulk Import file
In order to use Bulk Import, we need a correctly formatted csv (comma delimited) file containing the information to be imported to Studio. You can find detailed information about how this file should be formatted here.
For testing purposes, we can make use of a sample csv file containing information about three flows from the Longberry Baristas use case:
- Download the sample csv file here or manually add the following values in a csv file:
#ignore | Flow name | Start trigger spec | Trigger name | Pos. examples | Neg. examples | Trigger group | Trigger condition | Class name | Start answer spec | The answer |
---|---|---|---|---|---|---|---|---|---|---|
#question_answer | User wants to know our decaf options | #question | Do you serve decaf | decaf coffee/decaf options/i want to order decaf/i dont drink caffeine/do you have any decaf options/do you serve decaffeinated coffee/order decaf coffee/drink decaf coffee/decaf coffee options/decaf coffee menu | Default | DECAF_COFFEE | #answer | We do not have currently have any decaf options. | ||
#question_answer | User wants to know the secret menu | #question | What is on the secret menu | secret menu/whats on your secret menu/do you have a secret menu option/secret coffee recipe/whats your hidden coffee menu/I want to order something that is not on the menu/secret menu coffee/secret coffee/whats on the secret menu/secret item | Default | SECRET_MENU | #answer | We have one secret menu item! The iterm is hot foam over cold brew coffee - we call it 'Cold Nights'. | ||
#question_answer | User wants to know more about our coffee beans | #question | Where are the coffee beans from | Coffee beans/where are your beans from/whats the origin of your coffee beans/where are the coffee beans from/coffee origin/coffee bean/coffee beans origin/coffee bean farmer/coffee bean farm/coffee beans origin is | Default | COFFEE_BEANS | #answer | Our coffee beans are handpicked from various farms around the world. |
- Save the file. Make a note of where the file is stored as you will be accessing it later on.
Importing the file
Now that the csv file is ready, the next step is to import it into Studio.
- Before executing the bulk import, make sure to decide which folder to import the new objects into. For the Longberry Baristas sample csv file, for example, the most logical place to import the file into is the Flows folder. If necessary for other csv files, create a new folder to hold the objects by selecting the path in the Explore menu and clicking on the ‘Folder’ button in the Solution’s home tab. If you are importing directly to the solution root, the folder path must be specified in the import file.
- To execute a bulk import, select the desired folder for the imported objects and click the 'Bulk Import' button in the Home tab of Teneo Studio. It is also possible to start a bulk import by right-clicking on the chosen folder and selecting Bulk Import.
-
The system will open a browsing window: browse to the file location and select the file to import. Click 'Open' to upload it. An alternative option to start a bulk import is to simply drag the csv file directly from its folder location and drop it into the wanted folder location in Teneo Studio.
-
Teneo Studio will then validate the file, and once the validation is completed, a pop-up window will ask the user whether to preview the validated file, import it, or cancel the operation. Click 'Yes' to import the file. Studio will start importing the file, displaying a progress bar. Note that it is possible to click 'Run in Background' to be able to perform other tasks in Teneo Studio while the import is taking place. Once the import has completed, Teneo Studio will inform you about the Bulk Import result.
- The newly created language objects or Q and A pairs will now appear in the folder of Teneo Studio.
Warnings and errors
Teneo Studio performs a series of checks to validate the file to be imported; if the validation fails, the import is cancelled, and an error message is displayed, informing the user about the issues encountered in the file.
When hovering over any of the errors with the mouse, more information related to the encountered error is displayed:
The validation process only verifies the format of the csv file and that all mandatory fields are added correctly; it doesn’t check any other aspect, such as the condition syntax, and it is therefore recommended to always check the condition syntax after an import has finished.