TestProgramBlock
One block, by its type.
One block, by its type.
Possible values: [yesno, branch, action]
- yesno
- branch
- action
A Condition block with two exits. When its one case matches, the run takes Yes (the wires whose
port is the case id); otherwise it takes No (the wires whose port is else).
It has exactly one case and hasElse: true; anything else is refused (graph.schema,
reason: invalid_yesno). A case with no condition rows always takes Yes.
Possible values: non-empty
c_euThe block's name on the page and in messages. Two blocks may not have the same name, ignoring case and spaces at the ends. Left out, messages name the block by its id.
Sold in the EU?Always true, for the No exit.
Possible values: [true]
cases object[]required
Possible values: >= 1, <= 1
The Yes exit. Edges leave the block from Yes with port = this id.
Possible values: non-empty
c_eu_yescondition object
Two levels: the rows of a group are joined by the group's combinator, and the groups are joined by this
combinator. For example (A and B) or C is combinator: or with the groups [A, B] (and) and [C].
A group cannot hold another group (graph.schema, reason: nested_group).
Every case needs at least one row. A case whose condition has none (left out, no groups, or empty groups) is
refused with 400 (yesno.no_condition on a Yes / No block, branch.case_no_condition on a Branch).
Possible values: [and, or]
andgroups object[]
Optional; kept as sent.
Possible values: [and, or]
andconditions object[]
Optional. A problem found in this row names it as rowId.
r1field objectrequired
Which field the row reads. A system field is named by key alone; an additional field also needs
entityType. A field that is not in the organization's field list is saved with the warning
condition.unknown_field, and its row then matches only isEmpty.
The field's key (see Fields on Update Test Program).
product_categoryPossible values: [system, additional_field]
Additional fields only: lab_test (Lab Test Additional Data), itm (Item), pdt (Style), mat (Material) or po (Purchase Order).
Possible values: [lab_test, itm, pdt, mat, po]
Optional in the request; the backend writes the field list's label on save.
Product CategoryMust be one the field offers (see Fields on Update Test Program); otherwise 400
(condition.parse, reason: operator_not_allowed).
| Operator | Matches when the field … | Value |
|---|---|---|
is / isNot | is / is not the value | one value |
isAnyOf / isNoneOf | is one / none of the values | a non-empty list |
hasAllOf | has every value (no Test Program field offers it today) | a non-empty list |
gt / gte / lt / lte | is greater / greater or equal / less / less or equal | a number, or a date YYYY-MM-DD |
isEmpty / isNotEmpty | has no value / has a value | none: leave value out |
Possible values: [is, isNot, isAnyOf, isNoneOf, hasAllOf, gt, gte, lt, lte, isEmpty, isNotEmpty]
Left out for isEmpty / isNotEmpty, one value for is, isNot and the comparisons, a non-empty
list for isAnyOf / isNoneOf. Each value is plain ("S", 10000, "2026-01-01") or an option
{ "id", "label" }, of which only id is compared:
- for a number field, a JSON number (
10000, not"10000"); - for a date field, a text
YYYY-MM-DD; - for a choice field, the option id (
lab_test); - for a taxonomy field (
product_category,brand, …), the category's Custom ID; - for a text field, the exact text;
- for an Organization field, always
{ "id", "label" }withid= a Local Organization ID (see Organization values under Fields on Update Test Program).
Fields on Update Test Program lists what each field holds, with a sample value.
A value of the wrong kind for the field is refused with 400 (condition.parse,
reason: value_not_allowed). A choice the field does not list is saved with the warning
condition.unknown_option.
["EU","UK"]A free object the rule engine ignores.
position object
Where the page draws the block. Optional; kept as sent.
A Condition block with one exit per case, plus Anything Else when hasElse is true.
The cases are checked in order, and the run takes the exit of every case that matches. When a matching
case has stopHere: true, the cases after it are not checked. The else exit is taken only when no case
matched.
Possible values: non-empty
c_categoryThe block's name on the page and in messages. Two blocks may not have the same name, ignoring case and spaces at the ends. Left out, messages name the block by its id.
Which product category?true adds the Anything Else exit (port: else).
falsecases object[]required
Checked in this order. A Branch with no cases is saved with the warning branch.no_cases.
This case's exit. Edges leave the block from this case with port = this id.
Possible values: non-empty
c_category_toysThe case's name on the page and in messages. Left out, messages name the case by its id.
ToysWhen this case matches, the cases after it are not checked.
falsecondition object
Two levels: the rows of a group are joined by the group's combinator, and the groups are joined by this
combinator. For example (A and B) or C is combinator: or with the groups [A, B] (and) and [C].
A group cannot hold another group (graph.schema, reason: nested_group).
Every case needs at least one row. A case whose condition has none (left out, no groups, or empty groups) is
refused with 400 (yesno.no_condition on a Yes / No block, branch.case_no_condition on a Branch).
Possible values: [and, or]
andgroups object[]
Optional; kept as sent.
Possible values: [and, or]
andconditions object[]
Optional. A problem found in this row names it as rowId.
r1field objectrequired
Which field the row reads. A system field is named by key alone; an additional field also needs
entityType. A field that is not in the organization's field list is saved with the warning
condition.unknown_field, and its row then matches only isEmpty.
The field's key (see Fields on Update Test Program).
product_categoryPossible values: [system, additional_field]
Additional fields only: lab_test (Lab Test Additional Data), itm (Item), pdt (Style), mat (Material) or po (Purchase Order).
Possible values: [lab_test, itm, pdt, mat, po]
Optional in the request; the backend writes the field list's label on save.
Product CategoryMust be one the field offers (see Fields on Update Test Program); otherwise 400
(condition.parse, reason: operator_not_allowed).
| Operator | Matches when the field … | Value |
|---|---|---|
is / isNot | is / is not the value | one value |
isAnyOf / isNoneOf | is one / none of the values | a non-empty list |
hasAllOf | has every value (no Test Program field offers it today) | a non-empty list |
gt / gte / lt / lte | is greater / greater or equal / less / less or equal | a number, or a date YYYY-MM-DD |
isEmpty / isNotEmpty | has no value / has a value | none: leave value out |
Possible values: [is, isNot, isAnyOf, isNoneOf, hasAllOf, gt, gte, lt, lte, isEmpty, isNotEmpty]
Left out for isEmpty / isNotEmpty, one value for is, isNot and the comparisons, a non-empty
list for isAnyOf / isNoneOf. Each value is plain ("S", 10000, "2026-01-01") or an option
{ "id", "label" }, of which only id is compared:
- for a number field, a JSON number (
10000, not"10000"); - for a date field, a text
YYYY-MM-DD; - for a choice field, the option id (
lab_test); - for a taxonomy field (
product_category,brand, …), the category's Custom ID; - for a text field, the exact text;
- for an Organization field, always
{ "id", "label" }withid= a Local Organization ID (see Organization values under Fields on Update Test Program).
Fields on Update Test Program lists what each field holds, with a sample value.
A value of the wrong kind for the field is refused with 400 (condition.parse,
reason: value_not_allowed). A choice the field does not list is saved with the warning
condition.unknown_option.
["EU","UK"]A free object the rule engine ignores.
position object
Where the page draws the block. Optional; kept as sent.
Adds tests to the lab test when the run reaches it. It has no exits: a wire cannot leave an Action block, and it can never be the starting block. A block reached by several wires runs once.
Possible values: non-empty
a_euThe block's name on the page and in messages. Two blocks may not have the same name, ignoring case and spaces at the ends. Left out, messages name the block by its id.
EU baselineactions object[]required
What the block adds. A block holds each action at most once (graph.schema, reason: duplicate_action), so it can hold one add_tests_by_ids and one add_tests_by_tags.
- AddTestsByIdsAction
- AddTestsByTagsAction
Adds the test properties and conditions it names, by Test Package ID, Test Property ID and Test Condition ID.
Possible values: [add_tests_by_ids]
arguments objectrequired
At least one of packages and properties must list something, every package must list at least one
property, and every property at least one condition. Otherwise 400 (graph.schema,
reason: empty_selection).
Only what is listed is added: naming a package does not add the rest of the package.
An id that is not in the catalog is saved with the warning add_tests.not_found. When the program runs, a
package, property or condition that is missing, disabled or not visible is skipped.
packages object[]
Properties added as part of a test package. Each property must belong to that package.
Test Package ID.
Possible values: non-empty
CHM-EU-01Optional in the request; the backend writes the catalog's name on save.
properties object[]required
Possible values: >= 1
Test Property ID.
Possible values: non-empty
CHM-PB-01Optional in the request; the backend writes the catalog's name on save.
conditions object[]required
Possible values: >= 1
Test Condition ID, on the property's latest version.
Possible values: non-empty
L-01Optional in the request; the backend writes the catalog's name on save.
Whether the lab test must keep this condition. Left out or null, the condition's own setting in the catalog applies.
true: the condition cannot be removed from a lab test the program filled.
falseproperties object[]
Properties added on their own, outside any package.
Test Property ID.
Possible values: non-empty
CHM-PB-01Optional in the request; the backend writes the catalog's name on save.
conditions object[]required
Possible values: >= 1
Test Condition ID, on the property's latest version.
Possible values: non-empty
L-01Optional in the request; the backend writes the catalog's name on save.
Whether the lab test must keep this condition. Left out or null, the condition's own setting in the catalog applies.
true: the condition cannot be removed from a lab test the program filled.
falseposition object
Where the page draws the block. Optional; kept as sent.
{
"id": "c_eu",
"type": "yesno",
"title": "Sold in the EU?",
"description": "string",
"hasElse": true,
"cases": [
{
"id": "c_eu_yes",
"condition": {
"combinator": "and",
"groups": [
{
"id": "string",
"combinator": "and",
"conditions": [
{
"id": "r1",
"field": {
"key": "product_category",
"fieldType": "system",
"entityType": "lab_test",
"label": "Product Category"
},
"operator": "is",
"value": [
"EU",
"UK"
],
"extra": {}
}
]
}
]
}
}
],
"position": {
"x": 0,
"y": 0
}
}