User Profile
Name, email, account creation date, verification status.
Subscription
Plan name, billing cycle, MRR, payment status.
Usage Metrics
API calls, storage used, team members, feature adoption.
Activity History
Recent actions, login history, last active session.
What Agents See
Rich context displayed in every ticket sidebar.
User Context Panel
{
"user": {
"id": "usr_abc123",
"email": "[email protected]",
"name": "Jane Smith",
"created_at": "2023-06-15",
"verified": true
},
"subscription": {
"plan": "Pro",
"status": "active",
"mrr": 99,
"billing_cycle": "monthly",
"trial_ends": null
},
"usage": {
"api_calls_this_month": 45000,
"api_limit": 100000,
"team_members": 8,
"storage_used_gb": 12.4
},
"recent_activity": [
"Upgraded to Pro plan",
"Added 3 team members",
"Created API key"
]
}How to Pass Context
Include user data when creating tickets.
Via Widget
<SupportWidget
workspaceId="ws_xxx"
user={{
id: currentUser.id,
email: currentUser.email,
name: currentUser.name,
plan: currentUser.subscription.plan,
mrr: currentUser.subscription.mrr,
api_calls: currentUser.usage.apiCalls,
created_at: currentUser.createdAt
}}
/>Via API
POST /v1/workspaces/ws_xxx/tickets
{
"subject": "Can't access API",
"customer_email": "[email protected]",
"custom_fields": {
"user_id": "usr_abc123",
"plan": "Pro",
"mrr": 99,
"api_calls_this_month": 45000,
"team_members": 8
}
}Via Webhook (Server-Side Enrichment)
Listen for ticket.created events and enrich with backend data.
// When ticket is created, fetch user data
// from your database and update the ticket:
PATCH /v1/workspaces/ws_xxx/tickets/tkt_xxx
{
"custom_fields": {
"lifetime_value": 2847.00,
"support_tier": "priority",
"account_health": "green"
}
}