Product Org Updates
What Product Org Updates Are
Product Org Updates let you send product workspace/tenant data to TrailSpark via a dedicated webhook endpoint. This is designed for PLG companies that want to incorporate account-level product data into lead scoring -- plan tiers, user counts, MRR, trial status, feature adoption, and custom metrics.
Webhook Endpoint
POST https://app.trailspark.ai/api/product-orgs/webhook/{apiKey}
The API key must be created with Product Org Updates endpoint type.
Creating a Product Org API Key
- Go to Settings > API Keys > Create API Key
- Select Product Org Updates as the endpoint type
- Configure the Payload Template to map fields from your payload to TrailSpark fields
- Name the key, optionally set expiration and HMAC secret
- Click Create API Key
Copy your API key immediately. It is only displayed once.
Payload Template Configuration
The payload template maps incoming webhook fields to TrailSpark's product org fields using dot-notation paths into your payload.
Required Fields
| Field | Description | Example Path |
|---|---|---|
| Product Org ID | Unique workspace/tenant identifier | workspace_id, groupId, data.tenant.id |
Optional Core Fields
| Field | Description | Example Path |
|---|---|---|
| Name | Workspace display name | workspace_name, traits.name |
| Plan ID | Internal plan identifier | plan_id, traits.plan |
| Plan Name | Human-readable plan name | plan_name, traits.plan_name |
| User Count | Users in workspace | user_count, traits.employees |
| MRR | Monthly recurring revenue (cents) | mrr, traits.mrr |
| Trial Status | Trial state (active, expired, converted) | trial_status, traits.trial_status |
| Last Active At | Last activity timestamp | last_active_at, activity.last_seen |
| Feature Flags | Enabled features (JSON object) | feature_flags, data.features |
Custom Fields
Add any product-specific metrics as key-value pairs:
| Custom Field Name | Payload Path |
|---|---|
projects_count | metrics.total_projects |
api_calls_30d | usage.api_calls_last_30_days |
storage_gb | usage.storage_gigabytes |
Payload Examples
Flat Structure
1{
2 "workspace_id": "ws_abc123",
3 "workspace_name": "Acme Corp Workspace",
4 "plan_id": "plan_pro_annual",
5 "plan_name": "Pro Annual",
6 "user_count": 47,
7 "mrr": 49900,
8 "trial_status": "converted",
9 "last_active_at": "2024-01-15T10:30:00Z",
10 "feature_flags": {"sso_enabled": true, "api_access": true},
11 "projects_count": 23,
12 "api_calls_30d": 15420
13}Segment Group Call
1analytics.group("ws_abc123", {
2 name: "Acme Corp Workspace",
3 plan: "pro",
4 plan_name: "Pro Annual",
5 employees: 47,
6 mrr: 49900,
7 trial_status: "converted"
8});Segment sends this as:
1{
2 "type": "group",
3 "groupId": "ws_abc123",
4 "traits": {
5 "name": "Acme Corp Workspace",
6 "plan": "pro",
7 "plan_name": "Pro Annual",
8 "employees": 47,
9 "mrr": 49900,
10 "trial_status": "converted"
11 }
12}Template configuration for this payload:
| Field | Path |
|---|---|
| Product Org ID | groupId |
| Name | traits.name |
| Plan ID | traits.plan |
| Plan Name | traits.plan_name |
| User Count | traits.employees |
| MRR | traits.mrr |
| Trial Status | traits.trial_status |
Nested Structure
1{
2 "data": {
3 "tenant": {"id": "tenant_xyz789", "name": "Enterprise Client"},
4 "subscription": {
5 "plan_id": "enterprise",
6 "plan_name": "Enterprise",
7 "mrr_cents": 299900,
8 "trial": {"status": "not_applicable"}
9 },
10 "usage": {"active_users": 156, "last_activity": "2024-01-15T14:22:00Z"}
11 }
12}How Product Orgs Connect to Leads
- Webhook creates target org: TrailSpark automatically creates a target organization when a Product Org Update is received
- Leads link via productOrgId: When lead signals include a matching
productOrgId, the lead is linked to the same target organization - Data appears in evaluation: Product org data surfaces as
productOrgInfoin the LLM evaluation context, alongside CRM firmographic data
To link leads to product orgs, include a productOrgId field in your lead signals that matches the Product Org ID sent via this webhook.
Evaluation Context
Product org data appears in evaluation as:
1{
2 "productOrgInfo": [
3 {
4 "productOrgId": "ws_abc123",
5 "name": "Acme Corp Workspace",
6 "planName": "Pro Annual",
7 "userCount": 47,
8 "mrr": 49900,
9 "trialStatus": "converted",
10 "featureFlags": {"sso_enabled": true, "api_access": true},
11 "customFields": {"projects_count": 23, "api_calls_30d": 15420}
12 }
13 ]
14}Troubleshooting
Webhook returns 403 -- The API key was not created with Product Org Updates endpoint type. Create a new key with the correct type.
Product org not created -- Verify the payload contains a value at the configured productOrgId path. Check for typos in nested path definitions.
Missing fields in evaluation -- Verify optional field paths match your actual payload structure.
Leads not linking to product org -- Ensure lead signals include productOrgId matching the product org's ID exactly (case-sensitive).
