Supply Chain · Product Configurator
Configurator · Rules
Two kinds of rule in one list. CONSTRAINT rules say what may be chosen, as explicit pairs, because a rule has to be explicable to a salesperson standing in front of a customer. PROCESS rules say what the choice MEANS — which component, in what quantity, through which operation, with which inspection — and carry a condition written in the ordinary expression language.
/api/scm/config-rulesPublished as /api/v1/config-rulesDownload specification (OpenAPI 3.1) Screen: Configurator · Rules
Overview
| Package | Supply Chain |
|---|---|
| Authentication | Bearer token: a service account's token (POST /api/auth/service-token) or, for the published path, an API key |
| Authorization | The caller's roles must hold Supply Chain › Configurator · Rules on the Roles screen: display for GET, add for POST, change for PUT, delete for DELETE; an action needs the grant of the button that runs it on the screen. |
| Table | cpq.rules · kept per company (and organisational unit where it has one) |
| Record | Created, changed and (where the screen allows) deleted; key id |
| Rules | The same as the screen: validation, numbering, approvals, posting, the company the caller belongs to, and the audit trail. |
API reference
14 operations. Open one for its parameters, bodies, responses and a sample request.
GET/api/scm/config-rulesList configurator · rules
Query parameters
| Name | Description | Example |
|---|---|---|
limit | Rows per page (50 by default, at most 200) | limit=100 |
offset | Rows to skip | offset=200 |
q | Free-text search over the search columns | q=acme |
sort | column:asc or column:desc, several separated by commas | sort=created_at:desc |
filter | A JSON condition or group (see the filter language), URL-encoded; any field below can be filtered and sorted | filter={"col":"status","op":"eq","value":"open"} |
<field>=<value> | Shorthand for "field is value" |
Response 200
{
"rows": [
{
"id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"model_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"code": "COD-000001",
"name": "Example",
"rule_type": "requires",
"when_option_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"when_class_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"then_option_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"then_class_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"quantity": "12.0000",
"message": "text",
"severity": "error",
"sort_order": 10,
"is_active": true
}
],
"count": 1
}Sample request
curl "https://demo.tranxact.ai/api/scm/config-rules?limit=20" \
-H "Authorization: Bearer $TOKEN"GET/api/scm/config-rules/{id}Read one config rules
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Response 200
{
"id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"model_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"code": "COD-000001",
"name": "Example",
"rule_type": "requires",
"when_option_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"when_class_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"then_option_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"then_class_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"quantity": "12.0000",
"message": "text",
"severity": "error",
"sort_order": 10,
"is_active": true
}404 when no record with that id is visible to the caller.
Sample request
curl "https://demo.tranxact.ai/api/scm/config-rules/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
-H "Authorization: Bearer $TOKEN"POST/api/scm/config-rulesCreate a config rules
Request body
The record as JSON. Fields marked Yes are required.
| Field | Type | Required | Description |
|---|---|---|---|
model_id | uuid | Yes | Model |
code | text | Yes | Code |
name | text | Yes | Name |
rule_type | text | Yes | Kind — Constraint rules: "requires" complains, "implies" adds it for them. Process rules: "calculates" works out a number, the "selects_" rules decide what the product is made of and how, and "defaults_value" fills in an answer (Locked: the person cannot change it). Rule actions: "propagates_value" writes a value into a sub-assembly (TG100.DIAL_SIZE = TG310.DIAL_SIZE); "excludes_component", "replaces_component" and "sets_component_qty" change a part already in the structure; "selects_bom", and "selects_routing" with "Instead of the base routing", choose a variant; "removes_operation", "sets_operation_time" and "sets_work_center" change an operation by its number; "validates" refuses (error) or warns when its condition holds. Faster: Configurator · Workbook › Rules as text, one IF … THEN … sentence per line. Allowed: requires excludes implies recommends min_quantity max_quantity forces_eto calculates selects_component selects_operation selects_routing selects_inspection |
when_option_id | uuid | No | When this option is chosen — Options of the chosen model. Type a material number to find the option that adds it. |
when_class_id | uuid | No | When class id |
then_option_id | uuid | No | Then this option — Not restricted to the same question as the "when" side — a rule that crosses the tree is the whole point of a rule. |
then_class_id | uuid | No | Then class id |
quantity | numeric | No | Quantity |
message | text | No | What the person is told — A constraint rule that fires with no explanation is a configurator people stop using. A process rule uses this as the reason it writes beside every part and every operation it produced. |
severity | text | No | Severity Allowed: error warning info |
sort_order | integer | No | Order |
is_active | boolean | No | Active |
effective_from | date | No | In force from — The date this version of the row takes effect. Leave it as today unless you are dating a change ahead. |
effective_to | date | No | Until — Leave empty for open-ended. Setting it ends this version rather than deleting it. |
condition_expr | text | No | When (a condition) — Written like a formula, over the codes of the questions: steel_grade = 'A' and diameter = 12 and galvanizing = 'yes'. Leave it empty for a rule that always applies — which is how the standard components and standard operations of a model are expressed. A question holds the CODE of the option chosen (dial_size = 'DS-4IN'), or the number typed for one that takes a value; <question>_option always holds the code. Not prose: "When dial size is 4 inch" is refused. For process rules only — constraint rules use the two option boxes above. Configurator · Models › Check this model lists every name and code. |
output_name | text | No | Name of the value it computes — For a "calculates" rule. Later rules address the result by this name. |
output_label | text | No | How to show that value |
output_uom | text | No | Unit of that value |
value_formula | text | No | Formula — e.g. length_mm + process_allowance + cutting_allowance |
then_item_id | uuid | No | Then select this part — One part. For several under the same condition, save the rule and add them to its Components. |
component_qty | numeric | No | Quantity (a constant) |
qty_formula | text | No | Quantity (a formula) — e.g. raw_mass_kg. Wins over the constant where both are given. |
component_uom | text | No | Unit of the quantity |
scrap_pct | numeric | No | Scrap % |
alternate_item_id | uuid | No | Alternative part — What is used when the first choice cannot be had. Not a second component. |
component_kind | text | No | What kind of part — Decides which line of the cost sheet it lands on. Allowed: raw component subassembly consumable packaging purchased |
consumed_at_op_no | integer | No | Consumed at operation |
operation_no | integer | No | Operation number |
operation_name | text | No | Operation |
then_work_center_id | uuid | No | On this work centre |
setup_minutes | numeric | No | Setup (minutes) |
run_minutes_per_unit | numeric | No | Run per one (minutes) |
time_formula | text | No | Run time (a formula) — e.g. round(2 + raw_length_mm / 2000, 3) |
is_subcontracted | boolean | No | Performed outside — The routing is where subcontracting is decided. An operation marked here raises a purchase requisition rather than being scheduled on a machine. |
subcontract_supplier_id | uuid | No | Subcontractor |
subcontract_cost | numeric | No | What they charge (a constant) |
cost_formula | text | No | What they charge (a formula) — Galvanizing is priced by the zinc deposited and machining by the hour — a flat figure makes every size cost the same to have treated. |
subcontract_lead_days | integer | No | How long they keep it (days) |
predecessor_op_no | integer | No | After operation |
then_routing_id | uuid | No | Then routing id |
then_inspection_plan_id | uuid | No | Then inspect to this plan |
inspection_stage | text | No | At which stage Allowed: incoming in_process final first_article pre_ship periodic audit returned |
then_submodel_id | uuid | No | Then configure this sub-assembly |
then_bom_id | uuid | No | Then use this bill of material — selects_bom: a variant bill that replaces the base one when the condition holds. |
replace_item_id | uuid | No | Part it replaces — replaces_component: this part is taken out and "Then select this part" goes in its place. |
target_code | text | No | Sub-assembly question — propagates_value: the question code on the sub-assembly ("Then configure this sub-assembly") that the Formula’s value is written into, e.g. DIAL_SIZE. |
is_locked | boolean | No | Locked — defaults_value / propagates_value: on, the person cannot change what the rule sets; off, it is only a default. |
replaces_base | boolean | No | Instead of the base routing — selects_routing: on, the routing replaces the base routing; off, its operations are added. |
Sample body
{
"model_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"code": "COD-000001",
"name": "Example",
"rule_type": "requires",
"when_option_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"when_class_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"then_option_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"then_class_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73"
}Response 201
{
"id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"model_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"code": "COD-000001",
"name": "Example",
"rule_type": "requires",
"when_option_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"when_class_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"then_option_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"then_class_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"quantity": "12.0000",
"message": "text",
"severity": "error",
"sort_order": 10,
"is_active": true
}Sample request
curl -X POST "https://demo.tranxact.ai/api/scm/config-rules" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"model_id":"3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73","code":"COD-000001","name":"Example","rule_type":"requires","when_option_id":"3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73","when_class_id":"3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73","then_option_id":"3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73","then_class_id":"3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73"}'PUT/api/scm/config-rules/{id}Change a config rules
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Request body
Only the fields to change; fields left out keep their value.
| Field | Type | Required | Description |
|---|---|---|---|
model_id | uuid | Yes | Model |
code | text | Yes | Code |
name | text | Yes | Name |
rule_type | text | Yes | Kind — Constraint rules: "requires" complains, "implies" adds it for them. Process rules: "calculates" works out a number, the "selects_" rules decide what the product is made of and how, and "defaults_value" fills in an answer (Locked: the person cannot change it). Rule actions: "propagates_value" writes a value into a sub-assembly (TG100.DIAL_SIZE = TG310.DIAL_SIZE); "excludes_component", "replaces_component" and "sets_component_qty" change a part already in the structure; "selects_bom", and "selects_routing" with "Instead of the base routing", choose a variant; "removes_operation", "sets_operation_time" and "sets_work_center" change an operation by its number; "validates" refuses (error) or warns when its condition holds. Faster: Configurator · Workbook › Rules as text, one IF … THEN … sentence per line. Allowed: requires excludes implies recommends min_quantity max_quantity forces_eto calculates selects_component selects_operation selects_routing selects_inspection |
when_option_id | uuid | No | When this option is chosen — Options of the chosen model. Type a material number to find the option that adds it. |
when_class_id | uuid | No | When class id |
then_option_id | uuid | No | Then this option — Not restricted to the same question as the "when" side — a rule that crosses the tree is the whole point of a rule. |
then_class_id | uuid | No | Then class id |
quantity | numeric | No | Quantity |
message | text | No | What the person is told — A constraint rule that fires with no explanation is a configurator people stop using. A process rule uses this as the reason it writes beside every part and every operation it produced. |
severity | text | No | Severity Allowed: error warning info |
sort_order | integer | No | Order |
is_active | boolean | No | Active |
effective_from | date | No | In force from — The date this version of the row takes effect. Leave it as today unless you are dating a change ahead. |
effective_to | date | No | Until — Leave empty for open-ended. Setting it ends this version rather than deleting it. |
condition_expr | text | No | When (a condition) — Written like a formula, over the codes of the questions: steel_grade = 'A' and diameter = 12 and galvanizing = 'yes'. Leave it empty for a rule that always applies — which is how the standard components and standard operations of a model are expressed. A question holds the CODE of the option chosen (dial_size = 'DS-4IN'), or the number typed for one that takes a value; <question>_option always holds the code. Not prose: "When dial size is 4 inch" is refused. For process rules only — constraint rules use the two option boxes above. Configurator · Models › Check this model lists every name and code. |
output_name | text | No | Name of the value it computes — For a "calculates" rule. Later rules address the result by this name. |
output_label | text | No | How to show that value |
output_uom | text | No | Unit of that value |
value_formula | text | No | Formula — e.g. length_mm + process_allowance + cutting_allowance |
then_item_id | uuid | No | Then select this part — One part. For several under the same condition, save the rule and add them to its Components. |
component_qty | numeric | No | Quantity (a constant) |
qty_formula | text | No | Quantity (a formula) — e.g. raw_mass_kg. Wins over the constant where both are given. |
component_uom | text | No | Unit of the quantity |
scrap_pct | numeric | No | Scrap % |
alternate_item_id | uuid | No | Alternative part — What is used when the first choice cannot be had. Not a second component. |
component_kind | text | No | What kind of part — Decides which line of the cost sheet it lands on. Allowed: raw component subassembly consumable packaging purchased |
consumed_at_op_no | integer | No | Consumed at operation |
operation_no | integer | No | Operation number |
operation_name | text | No | Operation |
then_work_center_id | uuid | No | On this work centre |
setup_minutes | numeric | No | Setup (minutes) |
run_minutes_per_unit | numeric | No | Run per one (minutes) |
time_formula | text | No | Run time (a formula) — e.g. round(2 + raw_length_mm / 2000, 3) |
is_subcontracted | boolean | No | Performed outside — The routing is where subcontracting is decided. An operation marked here raises a purchase requisition rather than being scheduled on a machine. |
subcontract_supplier_id | uuid | No | Subcontractor |
subcontract_cost | numeric | No | What they charge (a constant) |
cost_formula | text | No | What they charge (a formula) — Galvanizing is priced by the zinc deposited and machining by the hour — a flat figure makes every size cost the same to have treated. |
subcontract_lead_days | integer | No | How long they keep it (days) |
predecessor_op_no | integer | No | After operation |
then_routing_id | uuid | No | Then routing id |
then_inspection_plan_id | uuid | No | Then inspect to this plan |
inspection_stage | text | No | At which stage Allowed: incoming in_process final first_article pre_ship periodic audit returned |
then_submodel_id | uuid | No | Then configure this sub-assembly |
then_bom_id | uuid | No | Then use this bill of material — selects_bom: a variant bill that replaces the base one when the condition holds. |
replace_item_id | uuid | No | Part it replaces — replaces_component: this part is taken out and "Then select this part" goes in its place. |
target_code | text | No | Sub-assembly question — propagates_value: the question code on the sub-assembly ("Then configure this sub-assembly") that the Formula’s value is written into, e.g. DIAL_SIZE. |
is_locked | boolean | No | Locked — defaults_value / propagates_value: on, the person cannot change what the rule sets; off, it is only a default. |
replaces_base | boolean | No | Instead of the base routing — selects_routing: on, the routing replaces the base routing; off, its operations are added. |
Sample body
{
"model_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"code": "COD-000001"
}Response 200
{
"id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"model_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"code": "COD-000001",
"name": "Example",
"rule_type": "requires",
"when_option_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"when_class_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"then_option_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"then_class_id": "3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73",
"quantity": "12.0000",
"message": "text",
"severity": "error",
"sort_order": 10,
"is_active": true
}Sample request
curl -X PUT "https://demo.tranxact.ai/api/scm/config-rules/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"model_id":"3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73","code":"COD-000001"}'DELETE/api/scm/config-rules/{id}Delete a config rules
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Response 200
{ "deleted": true }Many documents are cancelled or reversed instead; the API refuses a delete the screen would refuse.
Sample request
curl -X DELETE "https://demo.tranxact.ai/api/scm/config-rules/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
-H "Authorization: Bearer $TOKEN"POST/api/scm/config-rules/parse-textParse text
Request body
The keys this action reads (* = required; "one of" lists the only values):
modelId, model, textResponse
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/scm/config-rules/parse-text" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"modelId":"value","model":"value","text":"value"}'POST/api/scm/config-rules/save-textSave text
Request body
The keys this action reads (* = required; "one of" lists the only values):
modelId, model, textResponse
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/scm/config-rules/save-text" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"modelId":"value","model":"value","text":"value"}'GET/api/scm/config-rules/as-textAs text
Response
200 with the data as JSON.
Sample request
curl "https://demo.tranxact.ai/api/scm/config-rules/as-text" \
-H "Authorization: Bearer $TOKEN"PATCH/api/scm/config-rules/{id}Patch configurator · rules
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Request body
The keys this action reads (* = required; "one of" lists the only values):
model_id, rule_type, condition_expr, then_option_id, value_formula, then_submodel_id, target_codeResponse
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X PATCH "https://demo.tranxact.ai/api/scm/config-rules/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"model_id":"value","rule_type":"value","condition_expr":"value","then_option_id":"value","value_formula":"value","then_submodel_id":"value"}'POST/api/scm/config-rules/{id}/copyCopy
Path parameters
| Name | Type | Description |
|---|---|---|
id | string (uuid) | The record's id, as a list returns it. |
Request body
The keys this action reads (* = required; "one of" lists the only values):
overrides, preview, withLinesResponse
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/scm/config-rules/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/copy" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"overrides":"value","preview":"value","withLines":"value"}'GET/api/scm/config-rules/{parentId}/componentsComponents
Path parameters
| Name | Type | Description |
|---|---|---|
parentId | string (uuid) | The record's parentId, as a list returns it. |
Response
200 with the data as JSON.
Sample request
curl "https://demo.tranxact.ai/api/scm/config-rules/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/components" \
-H "Authorization: Bearer $TOKEN"POST/api/scm/config-rules/{parentId}/componentsComponents
Path parameters
| Name | Type | Description |
|---|---|---|
parentId | string (uuid) | The record's parentId, as a list returns it. |
No body is required.
Response
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X POST "https://demo.tranxact.ai/api/scm/config-rules/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/components" \
-H "Authorization: Bearer $TOKEN"PUT/api/scm/config-rules/{parentId}/components/{lineId}Components
Path parameters
| Name | Type | Description |
|---|---|---|
parentId | string (uuid) | The record's parentId, as a list returns it. |
lineId | string (uuid) | The record's lineId, as a list returns it. |
No body is required.
Response
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X PUT "https://demo.tranxact.ai/api/scm/config-rules/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/components/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
-H "Authorization: Bearer $TOKEN"DELETE/api/scm/config-rules/{parentId}/components/{lineId}Components
Path parameters
| Name | Type | Description |
|---|---|---|
parentId | string (uuid) | The record's parentId, as a list returns it. |
lineId | string (uuid) | The record's lineId, as a list returns it. |
No body is required.
Response
200 or 201 with the record or result as JSON; a refusal is 409 or 422 with a sentence saying why.
Sample request
curl -X DELETE "https://demo.tranxact.ai/api/scm/config-rules/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73/components/3f1c2a9e-5b7d-4c1e-9a2f-0d4b8e6c1a73" \
-H "Authorization: Bearer $TOKEN"Data model
Every field of a config rules, as the API returns it. Field names are the JSON keys; any of them can be filtered and sorted on a list.
| Field | Type | Access | Description |
|---|---|---|---|
id | uuid | read only | Id |
org_id | uuid | read only | Org id |
model_id | uuid | read, write | Model |
code | text | read, write | Code |
name | text | read, write | Name |
rule_type | text | read, write | Kind — Constraint rules: "requires" complains, "implies" adds it for them. Process rules: "calculates" works out a number, the "selects_" rules decide what the product is made of and how, and "defaults_value" fills in an answer (Locked: the person cannot change it). Rule actions: "propagates_value" writes a value into a sub-assembly (TG100.DIAL_SIZE = TG310.DIAL_SIZE); "excludes_component", "replaces_component" and "sets_component_qty" change a part already in the structure; "selects_bom", and "selects_routing" with "Instead of the base routing", choose a variant; "removes_operation", "sets_operation_time" and "sets_work_center" change an operation by its number; "validates" refuses (error) or warns when its condition holds. Faster: Configurator · Workbook › Rules as text, one IF … THEN … sentence per line. Allowed: requires excludes implies recommends min_quantity max_quantity forces_eto calculates selects_component selects_operation selects_routing selects_inspection |
when_option_id | uuid | read, write | When this option is chosen — Options of the chosen model. Type a material number to find the option that adds it. |
when_class_id | uuid | read, write | When class id |
then_option_id | uuid | read, write | Then this option — Not restricted to the same question as the "when" side — a rule that crosses the tree is the whole point of a rule. |
then_class_id | uuid | read, write | Then class id |
quantity | numeric | read, write | Quantity |
message | text | read, write | What the person is told — A constraint rule that fires with no explanation is a configurator people stop using. A process rule uses this as the reason it writes beside every part and every operation it produced. |
severity | text | read, write | Severity Allowed: error warning info |
sort_order | integer | read, write | Order |
is_active | boolean | read, write | Active |
effective_from | date | read, write | In force from — The date this version of the row takes effect. Leave it as today unless you are dating a change ahead. |
effective_to | date | read, write | Until — Leave empty for open-ended. Setting it ends this version rather than deleting it. |
condition_expr | text | read, write | When (a condition) — Written like a formula, over the codes of the questions: steel_grade = 'A' and diameter = 12 and galvanizing = 'yes'. Leave it empty for a rule that always applies — which is how the standard components and standard operations of a model are expressed. A question holds the CODE of the option chosen (dial_size = 'DS-4IN'), or the number typed for one that takes a value; <question>_option always holds the code. Not prose: "When dial size is 4 inch" is refused. For process rules only — constraint rules use the two option boxes above. Configurator · Models › Check this model lists every name and code. |
output_name | text | read, write | Name of the value it computes — For a "calculates" rule. Later rules address the result by this name. |
output_label | text | read, write | How to show that value |
output_uom | text | read, write | Unit of that value |
value_formula | text | read, write | Formula — e.g. length_mm + process_allowance + cutting_allowance |
then_item_id | uuid | read, write | Then select this part — One part. For several under the same condition, save the rule and add them to its Components. |
component_qty | numeric | read, write | Quantity (a constant) |
qty_formula | text | read, write | Quantity (a formula) — e.g. raw_mass_kg. Wins over the constant where both are given. |
component_uom | text | read, write | Unit of the quantity |
scrap_pct | numeric | read, write | Scrap % |
alternate_item_id | uuid | read, write | Alternative part — What is used when the first choice cannot be had. Not a second component. |
component_kind | text | read, write | What kind of part — Decides which line of the cost sheet it lands on. Allowed: raw component subassembly consumable packaging purchased |
consumed_at_op_no | integer | read, write | Consumed at operation |
operation_no | integer | read, write | Operation number |
operation_name | text | read, write | Operation |
then_work_center_id | uuid | read, write | On this work centre |
setup_minutes | numeric | read, write | Setup (minutes) |
run_minutes_per_unit | numeric | read, write | Run per one (minutes) |
time_formula | text | read, write | Run time (a formula) — e.g. round(2 + raw_length_mm / 2000, 3) |
is_subcontracted | boolean | read, write | Performed outside — The routing is where subcontracting is decided. An operation marked here raises a purchase requisition rather than being scheduled on a machine. |
subcontract_supplier_id | uuid | read, write | Subcontractor |
subcontract_cost | numeric | read, write | What they charge (a constant) |
cost_formula | text | read, write | What they charge (a formula) — Galvanizing is priced by the zinc deposited and machining by the hour — a flat figure makes every size cost the same to have treated. |
subcontract_lead_days | integer | read, write | How long they keep it (days) |
predecessor_op_no | integer | read, write | After operation |
then_routing_id | uuid | read, write | Then routing id |
then_inspection_plan_id | uuid | read, write | Then inspect to this plan |
inspection_stage | text | read, write | At which stage Allowed: incoming in_process final first_article pre_ship periodic audit returned |
then_submodel_id | uuid | read, write | Then configure this sub-assembly |
created_at | timestamp with time zone | read only | Created at |
created_by | uuid | read only | Created by |
updated_at | timestamp with time zone | read only | Updated at |
updated_by | uuid | read only | Updated by |
then_bom_id | uuid | read, write | Then use this bill of material — selects_bom: a variant bill that replaces the base one when the condition holds. |
replace_item_id | uuid | read, write | Part it replaces — replaces_component: this part is taken out and "Then select this part" goes in its place. |
target_code | text | read, write | Sub-assembly question — propagates_value: the question code on the sub-assembly ("Then configure this sub-assembly") that the Formula’s value is written into, e.g. DIAL_SIZE. |
is_locked | boolean | read, write | Locked — defaults_value / propagates_value: on, the person cannot change what the rule sets; off, it is only a default. |
replaces_base | boolean | read, write | Instead of the base routing — selects_routing: on, the routing replaces the base routing; off, its operations are added. |
xf_text_1 | text | read only | Xf text 1 |
xf_text_2 | text | read only | Xf text 2 |
xf_text_3 | text | read only | Xf text 3 |
xf_text_4 | text | read only | Xf text 4 |
xf_text_5 | text | read only | Xf text 5 |
xf_num_1 | numeric | read only | Xf num 1 |
xf_num_2 | numeric | read only | Xf num 2 |
xf_num_3 | numeric | read only | Xf num 3 |
xf_date_1 | date | read only | Xf date 1 |
xf_date_2 | date | read only | Xf date 2 |
Errors
| Status | Meaning |
|---|---|
| 400 | The request could not be read: a filter that is not JSON, a bad parameter |
| 401 | No credential, or it is wrong, revoked or expired |
| 403 | The caller's roles do not hold Supply Chain › Configurator · Rules for this verb, or the address or origin is not allowed |
| 404 | No record with that id is visible to the caller |
| 409 | A conflict: a duplicate number, a document in a state that does not allow it, or a record changed or locked by someone else |
| 422 | Refused by the same validation as the screen; the error names the field and why |
Every error is JSON: {"error": "a sentence saying what was wrong"}, with field where it applies.