Skip to content

MngTestAIWorkflowBinding

POST ai/workflow/test

Takes a sample event and reports, for every binding, whether it would fire and what would stop it. Nothing is sent, nothing is stored, no model is called.

This is the screen that answers "why did the client get no notification". Almost every such case is one of the suppression reasons below, and it should be visible without reading service logs.

Access Control

Allowed: admin.

Parameters

Parameter Type Description
eventName string Event name
event object Sample payload with the event fields
bindingId int Optional. Check one binding instead of all

Response Data

{
  "event": "account.margin_state",
  "recipient": { "type": "account", "id": 2000067 },
  "seen": true,
  "bindings": [
    {
      "bindingId": 3,
      "enabled": true,
      "agentId": 2,
      "delivery": ["notify"],
      "wouldFire": false,
      "reason": "cooldown",
      "requiresApproval": true,
      "dedupeKey": "login=2000067|level_type=1",
      "eventId": "a89e743cf46a4855986aa6769e47a075",
      "verifyBeforeSend": true,
      "details": { "previousId": "ntf_7c1…", "cooldownSeconds": 3600 },
      "prompt": "Account 2000067: margin level 95.4%…",
      "missingVariables": []
    }
  ],
  "wouldFire": 0
}
reason Meaning
filter A binding filter did not match
duplicate The same event within the deduplication window
cooldown This recipient was messaged by this binding recently
recipient_limit The daily cap for this recipient is reached, across all bindings
quiet_hours Quiet hours are in effect
no_recipient The payload has no valid recipient id

missingVariables lists placeholders the template could not fill — a hole that would otherwise appear in a message to a client.

Errors

Code Error Description
400 AI_INVALID_DATA Unknown event name
403 AI_ACCESS_DENIED The session is not an administrator