Profile Scoring Rules
Profile scoring rules assign points based on lead profile attributes (company size, industry, role, etc.) rather than behavioral actions. Use these to implement ICP (Ideal Customer Profile) scoring.
GET /profile-scoring/rulesets/{id}/rules
List all profile scoring rules for a specific ruleset.
Request
curl -u "CLIENT_ID:CLIENT_SECRET" \
"https://your-api.example.com/profile-scoring/rulesets/ruleset-abc/rules"
Response
Status: 200 OK
{
"rules": [
{
"id": "rule-123",
"ruleset_id": "ruleset-abc",
"profile_field": "company_employee_count",
"operator": "equals",
"value": "501+",
"weight": 50,
"active": true
},
{
"id": "rule-456",
"ruleset_id": "ruleset-abc",
"profile_field": "company_industry",
"operator": "equals",
"value": "Technology",
"weight": 30,
"active": true
}
]
}
POST /profile-scoring/rulesets/{id}/rules
Create a new profile scoring rule within a ruleset.
Request
curl -X POST https://your-api.example.com/profile-scoring/rulesets/ruleset-abc/rules \
-u "CLIENT_ID:CLIENT_SECRET" \
-H "Content-Type: application/json" \
-d '{
"profile_field": "company_employee_count",
"operator": "equals",
"value": "501+",
"weight": 50
}'
Request Body
| Field | Required | Type | Description |
|---|---|---|---|
profile_field | Yes | string | The profile field to evaluate (must be mapped via /profile-mappings) |
operator | Yes | string | Comparison operator: equals, not_equals, contains, greater_than, less_than |
value | Yes | string | The value to match against |
weight | Yes | number | Points to award when rule matches (can be negative) |
active | No | boolean | Whether rule is active (default: true) |
Response
Status: 201 Created
{
"id": "rule-789",
"ruleset_id": "ruleset-abc",
"profile_field": "company_employee_count",
"operator": "equals",
"value": "501+",
"weight": 50,
"active": true,
"created_at": "2025-01-15T11:30:00Z"
}
Operators Explained
| Operator | Description | Example |
|---|---|---|
equals | Exact match | company_size equals "501+" |
not_equals | Does not match | industry not_equals "Healthcare" |
contains | Substring match | job_title contains "VP" |
greater_than | Numeric comparison | revenue greater_than "10M" |
less_than | Numeric comparison | employees less_than "50" |
Common Errors
| Status Code | Error | Solution |
|---|---|---|
| 400 | Invalid profile_field | Ensure field is mapped via /profile-mappings |
| 400 | Invalid operator | Use: equals, not_equals, contains, greater_than, less_than |
| 404 | Ruleset not found | Verify ruleset ID is correct |
Example Use Cases
Use Case 1: Enterprise ICP Scoring
Score leads higher if they match enterprise criteria:
# High-value company size
POST /profile-scoring/rulesets/{id}/rules
{"profile_field": "company_employee_count", "operator": "equals", "value": "501+", "weight": 50}
# Target industry
POST /profile-scoring/rulesets/{id}/rules
{"profile_field": "company_industry", "operator": "equals", "value": "Technology", "weight": 30}
# Decision-maker role
POST /profile-scoring/rulesets/{id}/rules
{"profile_field": "contact_seniority", "operator": "contains", "value": "C-Level", "weight": 40}
# Result: C-level contacts from 500+ employee tech companies score 120 points
Use Case 2: Negative Scoring for Poor Fit
Penalize leads that don't match your ICP:
# Too small
POST /profile-scoring/rulesets/{id}/rules
{"profile_field": "company_employee_count", "operator": "equals", "value": "1-10", "weight": -20}
# Wrong industry
POST /profile-scoring/rulesets/{id}/rules
{"profile_field": "company_industry", "operator": "equals", "value": "Retail", "weight": -15}
Important Notes
Profile Fields Must Be Mapped
Before creating profile scoring rules, ensure the profile field is mapped via /profile-mappings:
# 1. Create mapping
POST /profile-mappings
{"metadata_key": "company_size", "profile_field": "company_employee_count"}
# 2. Then create rule
POST /profile-scoring/rulesets/{id}/rules
{"profile_field": "company_employee_count", "operator": "equals", "value": "501+", "weight": 50}
Profile Data Must Be Sent
Profile scoring only works if you send profile data in event metadata:
POST /ingest
{
"alias_kind": "email",
"alias": "jane@example.com",
"event_type": "form_submit",
"metadata": {
"company_size": "501+",
"industry": "Technology",
"job_title": "VP Sales"
}
}
Related Endpoints
- Update/Delete Profile Rules
- Profile Mappings - Map metadata to profile fields
- Profile Rulesets - Manage rulesets
- Engagement Scoring Rules - Score based on behavioral actions
See Also
- Profile Scoring Guide
- Event Ingestion - How to send profile data in metadata