Skip to main content

Data structure

The Data structure page lets you define the global structure used by your account for data variables and mappings. You can create the structure from JSON, XML, or CSV data, inspect it in the editor, import new data, export the current structure, and save changes.

These variables will look like @data.var@.

Before you start​

Your account has one data structure. When a structure exists, the page opens the current structure in the editor.

Organization admins and project admins can create a data structure and save changes in the editor.

Open the data structure​

Go to Storage and open Data.

The editor shows the structure as a tree. If the structure is empty, the root appears as an empty object. Use the search field and tree controls to inspect the current structure.

The page includes these main actions:

  • Import from file to import data into the structure.
  • Save to store changes.

Create a data structure​

When no data structure is set up, and you have permission for creation, the creation wizard lets you choose a data format and source.

Supported formats are:

  • JSON
  • XML
  • CSV

After you select a format, choose how to provide the data:

  • import a file
  • Create structure in the editor

The Create structure option only accepts a JSON format.

Once you enter the content in the editor or upload a file, click on Save to persist changes.

The editor is divided into two areas:

The toolbar​

The toolbar menu contains the following buttons:

TypeUsage
Expand allExpand all fields
CompactCollapse all fields
Code/TreeViewThis option displays the JSON data in an editable tree, or if it is more suitable for you, then you can modify manually. The editor makes it easy to create, duplicate, remove fields, and to edit the contents of the fields
SearchboxThis search input field allows you to find any field inside your data. Search results will be highlighted and can be iterated by repeatedly pressing Enter or Shift+Enter. The right side of the search box will have two buttons to go to the next or previous search result

The Editor Canvas​

Canvas is the place where the data is placed.

How does the Tree View work?​

The Tree editor displays the JSON data in an editable tree. The field values in the editor are editable input fields, can be dragged up and down using the drag area on the left side of the fields.

If the field that we want to modify is inside an Array or Object, it can also be dragged and moved up, down and out or in of the Array or Object.

Right next to the drag area, there is a button to open the actions menu. Depending on the type of field, the following functionalities may be available:

  • Type. Change the type of the field. Choose from:
TypeUsage
BooleanThe field type is a conditional field that can be true or false
ObjectAn unordered set of key/value pairs
NumberA number field
ArrayAn ordered collection of values
StringField type is not determined from the value but always returned as string
  • Sort. Sorts the child nodes of an array or object. For an array, the values of the child nodes will be sorted. In the case of an object, the child nodes will be sorted by key. Arrays and Objects can be sorted ascending or descending.
  • Insert. Inserts a new field before the current field. Available types are auto (default), object, array, and string.
  • Append. Inserts a new field after the current field. Available types are the same as the Insert action.
  • Duplicate. Duplicates the field, including all child nodes.
  • Remove. Removes the field, including all child nodes.

Shortcut keys​

The tree editor supports shortcut keys for all available actions. The following shortcut keys are available:

ShortcutUsage
Alt+ArrowsMoves the caret up/down/left/right between fields
Ctrl+Shift+Arrow Up/DownSelects multiple fields
Shift+Alt+ArrowsMoves field up/down/left/right
Ctrl+DDuplicates field
Ctrl+DelRemoves field
Ctrl+EnterOpens link when on a field containing an URL
Ctrl+InsInserts a new field with type auto
Ctrl+Shift+InsAppends a new field with type auto
Ctrl+EExpands or collapse field
Alt+EndMoves the caret to the last field
Ctrl+FFinds
Ctrl+GFinds next
Ctrl+Shift+GFinds previous
Alt+HomeMoves the caret to the first field
Ctrl+MShows actions menu
Ctrl+ZUndoes the last action
Ctrl+Shift+ZRedoes

Import data into the editor​

Select Import from file at the top of the page.

Select the file and review it in the editor.

Configure CSV imports​

When you import or create a data structure from CSV or TXT content, you can configure how the file is read.

CSV options include:

  • Is it header based?
  • Does it have any delimiter?
  • Does it have any quotes?

If the file uses a delimiter, select a preset delimiter or choose Custom Value and enter the delimiter manually. If the file uses quotes, enter the quote character used to ignore delimiters inside quoted values.

important

Only the first two lines of CSV data are used as the reference for generating the data structure.

Save changes​

Select Save to store the current structure.

If the data structure is already used by flows or interfaces, the confirmation warns that changes may affect those areas.

Notes and limitations​

The data structure is used by other product areas to resolve variables and mappings. Review changes carefully before saving, especially when the confirmation warns that the structure is currently in use.

CSV imports are based on the first two lines of the source data, so make sure those lines represent the structure you want to generate.

Was this article helpful?