AckdbScoreDefinitionInput

Create/replace body for a score definition.

Properties

scoreKeystringrequiredmaxLen 40 · pattern /^[a-z][a-z0-9]*(_[a-z0-9]+)*$/

Immutable slug → the sc__<scoreKey> column. Single underscores only.

namestringrequired
descriptionstring (nullable)
grainstringrequired

Immutable after create.

"company""person"
groupsarray ofrequired

Weighted criterion groups; weights must sum to 1 (±0.01).

keystringrequired
weightnumberrequiredmin 0 · max 1
criteriaarray ofrequired
normalizationstring

absolute (default): 100 × points / max possible, clamped. percentile: rank within THIS grain's population (strictly-below semantics — a no-data row is the 0th percentile).

"absolute""percentile"
percentilePopulationstring

Percentile definitions only (#432) — 400 with absolute normalization. all (default): rank against the whole grain population (today's behavior). active: rank only against rows where at least one non-trait criterion fired (an event:/convergence/contacts/company: criterion contributed nonzero points) — on sparse books the empty rows stop being the yardstick. Excluded rows still serve a score of 0 (never NULL) and take whatever lt label band covers 0.

"all""active"
labelsarray of

Label bands over the normalized 0–100 score (first match wins).

gtenumber
ltnumber
labelstringrequired
scopeSegmentIdstring (nullable)

SCOPE (#443): score ONLY the members of this saved segment. Absent/null = the whole grain (every definition before this feature). Rows outside the segment read NULL in sc__<key> and sc__<key>__label — not 0 — and are excluded from the percentile population, the preview histogram and the history sweep. ANY segment grain is legal for either score grain: a contact/person segment scoping a company score means 'the companies of those people', a company segment scoping a person score means 'the people with an active edge at those companies'. Derived segments are legal. 400s when the segment does not exist, or when its filter (or its base's) references a SCOPED score — a scored population may only be defined by whole-grain scores, which is what makes a scoring cycle impossible.

isPrimaryboolean

One primary per grain (server-enforced hand-off).

enabledbooleandefault true

Example

AckdbScoreDefinitionInput example
{
  "scoreKey": "pql",
  "name": "PQL score",
  "description": "string",
  "grain": "company",
  "groups": [
    {
      "key": "fit",
      "weight": 0.4
    }
  ],
  "criteria": [
    {
      "group": "string",
      "field": "event:slack.message",
      "label": "string",
      "match": [
        {
          "op": "eq",
          "values": [],
          "points": 0
        }
      ],
      "bands": [
        {
          "gte": 0,
          "lt": 0,
          "points": 0
        }
      ],
      "agg": "count",
      "sumField": "string",
      "valueField": "employee_count",
      "windowDays": 0,
      "halfLifeDays": 0,
      "perUnitPoints": 0,
      "cap": 0,
      "filter": {
        "titleContains": [
          "string"
        ],
        "activeWithinDays": 0
      },
      "sources": [
        "string"
      ],
      "signals": [
        "string"
      ]
    }
  ],
  "normalization": "absolute",
  "percentilePopulation": "all",
  "labels": [
    {
      "gte": 0,
      "lt": 0,
      "label": "Excellent"
    }
  ],
  "scopeSegmentId": "string",
  "isPrimary": false,
  "enabled": true
}