PPactDocs
Enrichment

Enrichment policies

Tier policies that auto-select an enrichment level per record based on status, segment, saved view, campaign, deal stage, or tag — so the right records get the right depth.

Right depth, right records

An enrichment tier policy answers one question at run time: what level should this record be enriched at? Instead of picking a level by hand for every batch, you define rules that map a record's attributes to a level (L1L4), and the resolver applies them automatically.

Policies live in the enrichment_tier_policies table (alembic 0051) and are resolved by core.enrichment.tiers.resolve_batch, which the run engine calls during both preview and execution — the chosen level per record is persisted on the run as tier_policy_resolutions_json.

Matching scopes

A policy matches a record by scope and scope_value:

ScopeMatches when
statusRecord's status equals the policy value
segmentRecord is in the named segment
saved_viewRecord is in the saved view's resolved id-set
campaignRecord is attached to the campaign
deal_stageAssociated opportunity is at the stage
tagRecord carries the tag
custom_filterA stored filter expression matches

Resolution order

Every active policy is loaded and evaluated by priority (ascending — a lower number is higher priority); on a tie, the lower id wins. The first policy that matches sets the record's level and its optional max_cost_per_record_cents ceiling. When nothing matches, the resolver falls back to the run's requested level with no ceiling.

Not to be confused with pricing policies

Tier policies pick a level (how deep to enrich). Pricing policies set the markup on what a call costs — those are platform-wide and Pact-staff only (see the pricing page). And budgets cap total spend. All three are independent.

Managing tier policies

EndpointPurpose
GET /v1/enrichment/policiesList active policies (priority order)
POST /v1/enrichment/policiesCreate a policy
PATCH /v1/enrichment/policies/{id}Update scope, level, ceiling, priority
DELETE /v1/enrichment/policies/{id}Soft-delete (sets active=false)
bash
curl -X POST https://api.pact.place/v1/enrichment/policies \
  -H "Authorization: Bearer $PACT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Enterprise opps get Premium+",
    "scope": "deal_stage",
    "scope_value": "negotiation",
    "level": "L4",
    "priority": 10
  }'