Variables
Any task can use predefined variables. These variables are created through Developer Console and defined as JSON object. This JSON object is next transformed to input fields and available on User Dashboard in user friendly way.
This is how different parameters of task can be configured.
Example JSON variables definition might look like this:
{
"checkbox#ENABLED": true,
"short_text#ORDER_EXPORT_PATH": "/new_path/",
"short_text#USER": "[email protected]",
"short_text#HOST": "ftp.com"
}JSON property name consists of variable type and variable name and is separated with #. JSON property value is just our variable value.
In your code you would referance variable by its name. To output second variable you would type: {{ ORDER_EXPORT_TYPE | log }}
Above snippet would look like this on User Dashboard:

Variable type might be one of the following:
section (repeatable group)
A section is a repeatable group of inner scalar fields. Use it for "list of structured rows" configurations such as loyalty tiers, shipping bands, or commission slabs. Merchants get a dashboard editor with Add and Remove buttons for each row, and Liquid can iterate the value natively — no | parse_json filter is needed.
Prefer section over json for any repeating-row configuration.
The value is an array of plain objects whose keys match the inner-field schema:
metadata.<NAME>.fields is required and must be a non-empty array. Each field needs a name, a type, and an optional label. Allowed inner type values are: short_text, long_text, checkbox, date_time, select. Sections cannot be nested.
Numeric values are stored as strings (same convention as short_text with subtype: "number"); use | times: 1 in Liquid for numeric comparisons.
Iterate in Liquid:
Metadata
For all variable you can define metadata where you would specify additional variable context. To the variables JSON definition add new special property called metadata where you can define additional input field configuration.helpText or options (only for select field).
Available metadata properties are:
- subtype - applicable to short_text field only. Might be one of the following: password, email, number, or integer
- min - min value of short_text with number subtype
- max - max value of short_text with number subtype
- minLength - min number of characters in short_text
- maxLength - max number of characters in short_text
- maxArraySize - applicable only to array variables, specifies max number of elements in an array
- helpText - help text displayed below input field
- step - step of number subtype
- pattern - regex pattern for input field
- showCharacterCount - shows current number of characters in input field
- options - applicable only to select field. Contains list of available options for select field.
- visibleIf - only shows the field if field reference as value evaluates to true
- metaobjectType - used only for metaobject or metaobjets variable. It is required to allow metaobjects search
metadata property is not considered as variable therefore can't be access from script logic
Last updated