Administer Data Stores
The Data Store module is a web interface for managing database (DB) tables in the Work.AI platform. A field scheme defines the Data Store table structure and column data format.
You can use Data Stores to keep lookup tables for multi-value Answer options, save Business Process (BP) results, and query Data Stores from Bot Configurations.
To manage Data Stores, configure the permissions:
Go to System Settings > Role Management and select the user to modify the permissions.
On the Edit Role screen, select the Manage Data Stores permission and click Save.

Manage Data Store
To start managing Data Stores, go to Advanced > Data Stores.

You can perform the following operations with Data Stores:
- View and filter by column values. Set columns to display in the grid.
- Add.
- Edit.
- Upload a file. If new file column names coincide with the Data Store columns, all new records are appended to the Data Store. Otherwise, map columns from the file to the Data Store.
- Delete.
Create Data Store
To create a Data Store, follow the instruction below:
Click the Create Data Store button.

Enter a unique name and description in the Name and Description fields. Names can contain alphanumeric characters, underscores, and spaces.
To define the Data Store structure, select one of the following options:
- In the Field Scheme drop-down box, select a field scheme.

- Select Upload File, click Upload Data, and add your CSV file. The first row should contain column headers. Note that column names cannot contain spaces.

For a Data Store created from a file, an appropriate field scheme is added automatically.
Click Save.
Edit Data Store
To edit an existing Data Store, click its name in the grid.

On the Configuration tab, you can modify the following data:
- Name
- Description
- Field scheme

On the Data tab, you can perform the following actions:
Import. Upload a new CSV file with the data.

Record. Add new records manually one by one.

Delete. Select records and delete them from a Data Store. In the Confirm Deletion popup, click Delete.

Download. Select data format (Comma Separated for CSV and Excel 2010 for XLSX) and download a data file. You can further populate the downloaded file with needed columns.

Delete all. Click the three-dot menu and select Delete all to delete all records. In the Confirm Deletion popup, click Delete.

Delete Data Store
To perform a bulk Data Store deletion, follow the steps below:
Select Data Stores in the grid and click Delete.

Confirm the deletion by clicking Delete.

Use filters
For quick navigation through the Data Stores, use filters. There are two types:
Predefined: to filter out Data Stores by username.
Advanced: to set custom criteria for filtering.

To add a parameter to your filter, use the Select a Filter... drop-down list. After you add the first parameter, you can add or delete the parameters using the plus (+) or minus (-) icons. Available parameters are as follows:
- Name: text containing the Data Store name.
- Description: text containing the Data Store description. With Name and Description, you can use contains, does not contain, equals to, and not equals to options.
- Author: name of the user who created the Data Store. You can specify several authors and define the contains and does not contain options.
To match the search results with all options defined in your filter, use Match All of The Following.
Use Data Store
Answers
You can use a Data Store to create a reusable lookup list for task Answers. To use a predefined list in Answers, add a Data Store with two columns:
- id: a unique identifier
- name: a label to show in the dropdown list
You can use records from a Data Store for the following Answer Types:
- Free Text
- Select Multi
- Select One
- Check One
- Check Multi
- Taxonomy
Select the Autocomplete checkbox and choose an item from the Options list.

All currencies used as an answer for the Currency Answer Type are stored in a system Data Store called System Currency. In the Data Store, the currency code represents the currency id, and name contains the currency code and the currency name.
The names appear in the dropdown list where you can select a currency when processing a task.
Business Processes
To automatically load BP final results to a Data Store, select the Copy results to Data Store checkbox. This way, you won't have to generate a BP snapshot and store it on your local computer or in the cloud.
If a BP uses Data Stores in its steps, you can include the Data Stores in the package during the export procedure and then create them in another Control Tower after you import the package.
Global variables
All global variables are stored in one Data Store named Global Variables. You can use these variable values in the var-global plugin.
Manual Tasks
You can develop a custom Manual Task that uses Data Store API calls from JavaScript. In such Manual Tasks, you should create a set of Data Store Queries. For more details, refer to Add allowed Data Store query.
Optimize Data Store performance
The Data Store functionality is implemented using a relational database. To optimize performance for large amounts of data, consider indexes.
There are two ways to manage Data Store indexes:
- Set up indexes within the Bot Task code. See the examples in Data Store plugins.
- Contact your Operations team to create an index in MSSQL with the given table and index details.
Also, see the article about data purging.
Audit Data Store
You can track all actions with Data Stores in the ds.data_store_audit table in DB. The table contains information about the operation type, the Data Store where it occurred, the number of affected records, when and who performed the action, and related comments.
The following operations are logged in the table:
CREATE_DATASTOREDELETE_DATASTOREMODIFY_DATASTOREINSERT_ROWMODIFY_ROWDELETE_ROWDELETE_COLUMN
Only operations performed via API are logged in the table.
For troubleshooting tips, refer to the following support guides: