[The manual for the New ION Experience has been released.](https://docs.firstresonance.io/)

For the complete documentation index, see [llms.txt](https://manual.firstresonance.io/llms.txt). This page is also available as [Markdown](https://manual.firstresonance.io/features/ion-actions/ion-actions-examples-for-supply-chain.md).

## Required fields before approval

Mandate that specific PO line attributes are populated before submitting for approval

```json
{
  "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

```json
{
  "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}}  } }",
