Create Badge Rule
create_badge_ruleCreate a badge rule for the current customer. Describe the rule and confirm with the user before calling. Each condition is an object: {condition, category, threshold, seconds}. condition is one of SCORE_LT, SCORE_LTE, SCORE_GT, SCORE_GTE (with category HUMANITY, AUTHENTICITY, UNIQUENESS, BEHAVIOR, or ANY to match any category, and threshold 0-100) or IDENTITY_AGE_GT (with seconds since the identity was first seen). Badge rules cannot reference other badges (no BADGE_EXISTS) and have no IDENTITY_AGE_LT; use an escalation rule for those. All conditions must hold for the badge to apply. The badge's slug is derived from its name and is what escalation rules reference in BADGE_EXISTS conditions. Returns the created rule.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Badge name shown on identities, up to 50 characters; the slug is derived from it. | |
| type | Yes | GOOD, BAD, or NEUTRAL. | |
| priority | No | Priority for ordering badges on an identity (higher first; default 0). | |
| conditions | Yes | The conditions that must all hold for the badge to apply. | |
| applyDelaySeconds | No | Seconds the conditions must hold before the badge applies (default 0). | |
| removeDelaySeconds | No | Seconds the conditions must stop holding before the badge is removed (default 0). |