Approval Workflows

Updates an approval workflow

Changed on

Replaces an approval workflow's definition. The whole definition is required — a partial body is rejected, not merged, and fields this contract does not define are ignored. Send type and active back as read; changing either here is rejected, and combinations the Rillet app cannot configure are rejected too (see the individual fields).

Entries already awaiting approval are unaffected, because an entry copies the layers it needs when approval starts; only entries registered after this call use the new definition. Deadlines and layer escalation rules are not part of this contract and are cleared, exactly as saving a workflow in Rillet clears them.

put/approval-workflows/{approval_workflow_id}

Request

Path parameters

approval_workflow_idstring uuid required

UUID of the approval workflow to be used in this operation.

Request body

namestring required
type'JOURNAL_ENTRY' | 'CONTRACT' | 'INVOICE' | 'BILL' | 'CHARGE' | 'CHARGE_REVERSAL' | 'REIMBURSEMENT' required

The kind of record a workflow applies to. Contract and Invoice are retained for backward-compatible reads but cannot be updated through this endpoint.

activeboolean required

Required, and must equal the workflow's current value — activation is a dedicated operation in Rillet, so a definition update never changes it. Read the workflow first if you are unsure.

methodsApprovalWorkflowMethod[] required

Only ["IN_APP"] is accepted today: EMAIL and SLACK deliver nothing, so they are rejected rather than stored.

submission_sourcesApprovalWorkflowConfigurableSubmissionSource[]

Example request

{
  "name": "JE over 50k — Controller then CFO",
  "type": "JOURNAL_ENTRY",
  "condition_group": {
    "logic": "AND",
    "conditions": [
      {
        "operator": "ANY_OF"
      }
    ]
  },
  "approval_layers": [
    {
      "id": "0199e21e-3b5a-7222-9d33-bbccddeeff00",
      "order": 1,
      "approver_user_ids": [
        "0199e21a-9b3d-7cde-8f21-665544332211"
      ]
    }
  ],
  "methods": [
    "IN_APP"
  ],
  "submission_sources": [
    "UI"
  ]
}

Response

OK

idstring uuid required
namestring required
type'JOURNAL_ENTRY' | 'CONTRACT' | 'INVOICE' | 'BILL' | 'CHARGE' | 'CHARGE_REVERSAL' | 'REIMBURSEMENT' required

The kind of record a workflow applies to. Contract and Invoice are retained for backward-compatible reads but cannot be updated through this endpoint.

activeboolean required

Only active workflows are evaluated. Read-only here: a workflow is activated and deactivated in Rillet, so this value can change without a definition update.

priorityinteger required

Evaluation order among the active workflows of the same type, ascending and zero-based — the first workflow whose conditions match is the one applied, and later ones are skipped. Assigned by the server: a workflow is put last when created, and again when reactivated. Not necessarily unique; ties are resolved by id.

methodsApprovalWorkflowMethod[] required

How approvers are asked to act. IN_APP is the only method Rillet acts on today; EMAIL and SLACK can appear on workflows configured before they were withdrawn, and no notification is delivered for them.

submission_sourcesApprovalWorkflowSubmissionSource[]
updated_atstring date-time required

ISO 8601 timestamp in UTC timezone (must end with 'Z'). Covers activation and reordering as well as definition changes.

Changes