Contacts (formerly called “Persons”) represent individual users or respondents in Formbricks. Each contact can have custom attributes, a response history, and a unique identity across all surveys in an environment.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/formbricks/formbricks/llms.txt
Use this file to discover all available pages before exploring further.
What is a Contact?
A contact is an individual user tracked within an environment. Contacts allow you to:- Link responses to specific users across multiple surveys
- Store attributes like plan type, signup date, or location
- Track behavior like which actions they’ve taken
- Target surveys based on user characteristics
- Analyze responses by user segment
- Prevent survey fatigue with recontact rules
Contact Identity
Formbricks identifies contacts using a user ID that you provide:In-Product Surveys (SDK)
userId should be:
- Unique per user in your system
- Consistent across sessions
- From your database (user ID, account ID, etc.)
Link Surveys
For link surveys, contacts are created when:- User provides email via a contact info question
- You pass a
userIdin the URL:?userId=user-123 - You enable single-use links (automatically generates contact)
Anonymous Responses
If you don’t identify users, responses are still collected but not linked to a contact. These are anonymous responses. Use cases for anonymous responses:- Public link surveys (market research)
- Privacy-sensitive feedback (employee surveys)
- Pre-login feedback (landing page surveys)
Contact Attributes
Attributes are custom properties you store on contacts. They’re used for targeting surveys and analyzing responses by segment.Default Attributes
Formbricks tracks some attributes automatically:- User ID: Your unique identifier
- Email: If provided
- Created At: When the contact was first seen
- Updated At: When attributes were last changed
Custom Attributes
You can define unlimited custom attributes: Common examples:plan: “free”, “pro”, “enterprise”role: “admin”, “member”, “viewer”signupDate: “2024-01-15”mrr: 99 (monthly recurring revenue)country: “US”company: “Acme Inc.”featureFlags: [“new-dashboard”, “beta-analytics”]
Attribute Data Types
Formbricks supports three attribute data types:- String
- Number
- Date
Text values. Most common type.Use for: Plan types, roles, names, locations, categories
Setting Attributes
On initialization:plan doesn’t remove email or role.
Managing Attribute Keys
Before using attributes for targeting, you need to define them in Formbricks:Create Attribute Key
Click “Add Attribute Key” and define:
- Key: Technical name (e.g.,
plan,signupDate) - Name: Display name (e.g., “Subscription Plan”)
- Type: String, Number, or Date
- Description: Optional context for your team
Attribute keys are per environment. Define them separately in Development and Production, or they won’t appear in targeting rules.
Targeting Surveys with Attributes
Use contact attributes to show surveys only to specific user segments:Simple Targeting
Example 1: Survey only free plan usersAdvanced Targeting (Multiple Conditions)
Combine multiple attribute filters (AND logic):Contact Management
Viewing Contacts
Navigate to Contacts in the sidebar to see all contacts in your environment. Contact list shows:- User ID
- Email (if provided)
- Custom attributes
- Response count
- Last seen date
- Attribute values
- Response history
- Date created
Contact Details
Click a contact to see:- Attributes: All stored properties
- Response History: All surveys they’ve completed
- Actions: Events they’ve triggered
- Displays: Surveys they’ve been shown (responded or not)
Updating Contacts
Contacts can be updated via:- SDK: Call
setContact()with new attributes - API: Update via the Contacts API endpoint
- Manually: Edit in the Formbricks dashboard (not recommended for production)
Deleting Contacts
Delete contacts from the dashboard or via API.Contact Privacy & Security
PII (Personally Identifiable Information)
Be mindful of what attributes you store: Safe to store:- User IDs (hashed or pseudonymized)
- Plan types, roles, settings
- Aggregated data (team size, usage counts)
- Email addresses
- Names
- IP addresses
- Location data
Data Retention
Contacts persist in your environment until:- You manually delete them
- You delete the entire environment
- They’re automatically removed by your configured retention policy (Enterprise feature)
GDPR Compliance
Formbricks supports GDPR compliance:- Right to access: View contact data in dashboard or via API
- Right to deletion: Delete contacts and all associated responses
- Data export: Export all data associated with a contact
- Consent tracking: Store consent status as an attribute
Common Use Cases
Use Case 1: Segment-Specific NPS
Measure NPS separately for free vs. paid users: Survey 1: Free User NPS- Targeting:
plan equals "free" - Question: “How likely are you to recommend us?”
- Targeting:
plan equals "pro" OR plan equals "enterprise" - Question: “How likely are you to recommend us?”
Use Case 2: Churn Prevention
Survey users likely to churn: Targeting:Use Case 3: Feature Adoption
Survey users who haven’t adopted a key feature: Set attribute when feature is used:Use Case 4: Localization
Show different survey languages based on location: Survey 1 (English):- Targeting:
country equals "US" OR country equals "UK"
- Targeting:
country equals "ES" OR country equals "MX"
Best Practices
Set Contacts Early
Set Contacts Early
Call
setContact() as soon as the user logs in. This ensures all subsequent actions and responses are linked to the correct contact.Use Consistent User IDs
Use Consistent User IDs
Always use the same user ID format (e.g., your database primary key). Don’t mix email addresses and numeric IDs.
Keep Attributes Minimal
Keep Attributes Minimal
Only store attributes you’ll use for targeting or analysis. Avoid storing sensitive PII unless necessary.
Update Attributes on Change
Update Attributes on Change
When users upgrade, change roles, or update profile info, sync those changes to Formbricks immediately.
Define Attribute Keys First
Define Attribute Keys First
Before sending attributes via SDK, define them in Formbricks Settings → Attribute Keys. Otherwise, they won’t appear in targeting.
Document Your Attributes
Document Your Attributes
Keep a README or wiki page documenting all attributes, their types, and use cases. Helps new team members understand your setup.
Respect User Privacy
Respect User Privacy
Only collect attributes you need. Follow your privacy policy and give users control over their data.
API Reference
Manage contacts programmatically: Create/Update Contact:Next Steps
Responses
Learn how responses are linked to contacts
Survey Targeting
Deep dive into attribute-based targeting strategies
API Reference
Manage contacts programmatically via API
Self-Hosting
Deploy on your infrastructure for complete data control