- Trigger → action: If an action appears in
ALLOWED_TRIGGERS_BY_ACTION, only those triggers may use it. - Action → next action: If an action appears in
ALLOWED_NEXT_ACTIONS, only the listed actions may come immediately after it in the ordered sequence (steps or graph traversal).
Source of truth:
packages/shared/src/workflow-synergy.ts (ALLOWED_TRIGGERS_BY_ACTION, ALLOWED_NEXT_ACTIONS). The API and UI call the same validation.Rule 1 — Allowed triggers per action
| Action | Allowed triggers |
|---|---|
create_investigation | alert_created, rule_triggered |
generate_checklist, assign_to, add_note | alert_created, investigation_created, investigation_status_changed, investigation_updated |
start_investigation, change_status, change_priority, set_stage_role_access | investigation_created, investigation_status_changed, investigation_updated |
set_entity_status, run_risk_matrix | entity_created, create_entity_flow, alert_created, investigation_created, investigation_status_changed, investigation_updated, transaction_created, rule_triggered, kyc_approved, kyc_rejected, kyc_validation_finished, manual_execution |
run_basic_enrichment | manual_execution, entity_created, create_entity_flow |
run_enrichment, run_shareholders_flow | entity_created, create_entity_flow (run_shareholders_flow also allows manual_execution) |
create_kyc_validation | entity_created, create_entity_flow, alert_created, rule_triggered, kyc_approved, kyc_rejected, kyc_validation_finished, manual_execution |
request_transaction_approval, set_transaction_status | transaction_created, rule_triggered, manual_execution, scheduled |
send_webhook, send_push_notification, create_alert, and any action not listed above accept any trigger.
Notable: scheduled is not in the allowed list for set_entity_status, run_risk_matrix, run_enrichment, create_kyc_validation, etc. Design scheduled automations that only use actions permitted for scheduled.
Rule 2 — Allowed next action (immediate successor)
Only the immediate pair is checked. For graphs, the engine orders actions (e.g. BFS from the trigger) and validates the same pairs.| Previous action | May be followed immediately by |
|---|---|
run_enrichment | run_risk_matrix, set_entity_status, create_alert, send_webhook, send_push_notification, create_kyc_validation |
run_basic_enrichment | run_shareholders_flow, run_risk_matrix, set_entity_status, create_alert, send_webhook, send_push_notification, create_kyc_validation |
run_shareholders_flow | run_risk_matrix, set_entity_status, create_alert, send_webhook, send_push_notification, create_kyc_validation |
run_risk_matrix | set_entity_status, create_alert, send_webhook, send_push_notification, create_kyc_validation |
set_entity_status | run_risk_matrix, create_alert, send_webhook, send_push_notification, create_kyc_validation |
create_alert | send_webhook, send_push_notification, create_investigation |
create_kyc_validation | set_entity_status, create_alert, send_webhook, send_push_notification, run_risk_matrix |
create_investigation | assign_to, add_note, change_status, change_priority, set_stage_role_access, send_webhook, send_push_notification, generate_checklist, start_investigation |
start_investigation, change_status, change_priority, assign_to, set_stage_role_access, add_note, generate_checklist | assign_to, add_note, change_status, change_priority, set_stage_role_access, send_webhook, send_push_notification, generate_checklist (same for each; no start_investigation as successor except from create_investigation) |
request_transaction_approval | set_transaction_status, send_webhook, send_push_notification |
set_transaction_status | request_transaction_approval, send_webhook, send_push_notification |
Typical chains (examples)
- Onboarding:
run_enrichment→run_risk_matrix→set_entity_status→create_alert/create_kyc_validation. - Alert triage:
create_investigation→assign_to→change_status→send_webhook. - Payments:
request_transaction_approval→set_transaction_status→send_webhook.
Maintenance: When changing synergy in code, update
workflow-synergy.ts first, then this page.