ION Actions examples for Supply Chain | ION Factory OS
The manual for the New ION Experience has been released.
For the complete documentation index, see llms.txt. This page is also available as Markdown.
Required fields before approval
Mandate that specific PO line attributes are populated before submitting for approval
{
"enabled": true,
"title": "Purchase line items must have a need date",
"target": "PURCHASEORDERLINE",
"eventType": "UPDATE",
"ruleType": "VALIDATION",
"errorState": "ALLOW",
"context": "{ purchaseOrderLine(id: $id) { id needDate } }",
"code": "if context.get('changes', {}).get('purchaseOrderLines', {}).get('status', {}).get('new') == 'requested' and context.get('purchaseOrderLine', {}).get('needDate') is None: raise ValidationError()"
}
Mandate that specific PO header (custom) attributes are populated before submitting for approval
{
"enabled": true,
"title": "Purchase requires a justification before it can be ordered",
"target": "PURCHASEORDERLINE",
"eventType": "UPDATE",
"errorState": "ALLOW",
"context": "{ purchaseOrderLine(id: $id) { purchaseOrder {id attributes {key value}} } }",