AckdbScoreCapabilities

What this server's score validator accepts (#438): the contract a builder renders from instead of probing for support by saving throwaway definitions. Static, since it mirrors the validator's own constants, so it needs no DB round trip.

Properties

grainsarray ofrequired

Grains a definition can be created on.

string
"company""person"
scopesobjectrequired

Segment scoping (#443) — what scopeSegmentId accepts. Render the segment picker from this rather than assuming grain-for-grain: any segment grain may scope any score grain.

segmentKindsarray ofrequired
string
"company""contact""person"
derivedbooleanrequired

Whether a derived segment is a legal scope.

aggregatesarray ofrequired

Every aggregate reducer, with the grains and scoring modes each one allows. Render the aggregate picker from this: a scoring mode absent from `scoring` is a 400, not a fallback.

valuestringrequired
"count""sum""distinct_contacts""latest"
grainsarray ofrequired

Legal grains. distinct_contacts is company-only (the person grain has no contact rail).

string
"company""person"
scoringarray ofrequired

Scoring modes this reducer accepts. Only `latest` accepts `match`.

string
"bands""perUnitPoints""match"
requiresstring

The extra field knob this reducer requires, if any.

"sumField""valueField"
halfLifebooleanrequired

False when halfLifeDays does not compose (distinct_contacts, latest), where it 400s.

matchOpsarray ofrequired

Match operators the validator accepts, on every matchable field kind.

string
"eq""in""present"
normalizationsarray ofrequired
string
"absolute""percentile"
percentilePopulationsarray ofrequired

Percentile ranking populations (#432). Rejected on absolute definitions.

string
"all""active"
convergenceModesarray ofrequired

Convergence list shapes, exactly one per criterion (#414 sources, #421 signals).

string
"sources""signals"
eventValueMatchingstringrequired

How `match` values compare against event metadata: exact and case-sensitive, the way segment filters compare them (#380 canonicalizes trait values and deliberately left event fields exact). Seed value pickers from /fields/{key}/values rather than accepting free text, since a value differing only in case scores 0.

"exact"
limitsobjectrequired

Every numeric bound the validator enforces. Enforce them client-side to avoid round-trip 400s.

criteriaintegerrequired

Max criteria per definition.

groupsintegerrequired

Max weighted groups per definition.

matchEntriesintegerrequired

Max match entries per criterion (and values per entry).

bandsintegerrequired

Max bands per criterion.

labelsintegerrequired

Max label bands per definition.

pointsintegerrequired

Absolute bound on match/band points (±).

perUnitPointsintegerrequired

Absolute bound on the per-unit slope (±).

capintegerrequired

Max perUnitPoints cap (0 < cap ≤ this).

windowDaysintegerrequired

Max trailing window on an event aggregate.

convergenceWindowDaysintegerrequired

Max window on a convergence criterion, tighter than windowDays.

convergenceSignalsintegerrequired

Max signals in a signals-mode list.

Example

AckdbScoreCapabilities example
{
  "grains": [
    "company"
  ],
  "scopes": {
    "segmentKinds": [
      "company"
    ],
    "derived": false
  },
  "aggregates": [
    {
      "value": "count",
      "grains": [
        "company"
      ],
      "scoring": [
        "bands"
      ],
      "requires": "sumField",
      "halfLife": false
    }
  ],
  "matchOps": [
    "eq"
  ],
  "normalizations": [
    "absolute"
  ],
  "percentilePopulations": [
    "all"
  ],
  "convergenceModes": [
    "sources"
  ],
  "eventValueMatching": "exact",
  "limits": {
    "criteria": 50,
    "groups": 10,
    "matchEntries": 0,
    "bands": 0,
    "labels": 0,
    "points": 100,
    "perUnitPoints": 0,
    "cap": 0,
    "windowDays": 3650,
    "convergenceWindowDays": 365,
    "convergenceSignals": 20
  }
}