Custom attributes allow you to store additional information about contacts and conversations beyond the standard fields. You can use custom attributes to track user properties, conversation metadata, or any business-specific data.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Merkurcode/nauto-console/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Chatwoot supports two types of custom attributes:- Contact Attributes: Store information about contacts (users/customers)
- Conversation Attributes: Store information about specific conversations
app/models/custom_attribute_definition.rb:42
Custom Attribute Types
Chatwoot supports the following display types for custom attributes:| Type | Value | Description | Example |
|---|---|---|---|
| Text | 0 | Plain text input | ”Premium Plan” |
| Number | 1 | Numeric values | 42 |
| Currency | 2 | Monetary values | 99.99 |
| Percent | 3 | Percentage values | 85 |
| Link | 4 | URLs | https://example.com |
| Date | 5 | Date values | 2026-03-04 |
| List | 6 | Dropdown selection | One of predefined values |
| Checkbox | 7 | Boolean toggle | true or false |
app/models/custom_attribute_definition.rb:43
Creating Custom Attribute Definitions
Before you can set custom attributes, you must create attribute definitions that specify the attribute schema.Via API
Parameters
attribute_display_name(required): Human-readable name shown in the UIattribute_key(required): Unique identifier for the attribute (used in API calls)attribute_display_type(required): Display type (0-7, see table above)attribute_model(required):0for conversation,1for contactattribute_description: Optional description for the attributeattribute_values: Array of allowed values (required forlisttype)regex_pattern: Optional validation patternregex_cue: Optional hint for regex validation
app/controllers/api/v1/accounts/custom_attribute_definitions_controller.rb:36-45
Example: List Type Attribute
Example: Date Type Attribute
Standard Attributes
Certain attribute keys are reserved and cannot be used for custom attributes:Contact Standard Attributes
nameemailphone_numberidentifiercountry_codecitycreated_atlast_activity_atrefererblocked
Conversation Standard Attributes
statuspriorityassignee_idinbox_idteam_iddisplay_idcampaign_idlabelsbrowser_languagecountry_codereferercreated_atlast_activity_at
app/models/custom_attribute_definition.rb:25-29
Setting Custom Attributes
For Contacts (via Widget SDK)
For Contacts (via API)
For Conversations (via Widget SDK)
For Conversations (via API)
Deleting Custom Attributes
For Contacts (via Widget SDK)
app/javascript/entrypoints/sdk.js:147-154
For Conversations (via Widget SDK)
app/javascript/entrypoints/sdk.js:167-174
Retrieving Custom Attributes
Custom attributes are included in API responses for contacts and conversations:Contact Response
Conversation Response
Using Custom Attributes in Webhooks
Custom attributes are automatically included in webhook payloads:Pre-chat Form Custom Fields
Custom attributes can be collected via the pre-chat form in the widget. When you create or update contact attributes, they automatically sync to inbox pre-chat forms. Source:app/models/custom_attribute_definition.rb:46-57
Validation
Regex Validation
You can enforce validation rules using regex patterns:Required Values for List Type
For list type attributes, you must provide the allowed values:Managing Custom Attribute Definitions
List All Definitions
Get Single Definition
Update Definition
Delete Definition
Use Cases
E-commerce Integration
SaaS Application
Support Ticketing
Lead Qualification
Best Practices
- Use semantic keys: Choose descriptive
attribute_keyvalues (e.g.,subscription_plannotsp1) - Document your attributes: Add meaningful descriptions to help team members understand usage
- Choose appropriate types: Use the correct display type for better UI rendering and validation
- Limit attribute count: Too many custom attributes can impact performance
- Use list types: For predefined values, use list type instead of free text
- Validate input: Use regex patterns to enforce data quality
- Consider privacy: Don’t store sensitive data like passwords or credit card numbers
- Plan for scale: Custom attributes are stored as JSONB, so keep values reasonably sized
Limitations
- Custom attribute keys must be unique per account and attribute model
- Keys cannot conflict with standard attribute names
- Maximum JSONB size depends on your PostgreSQL configuration (typically 1GB)
- Attribute values are not encrypted by default
- Regex validation is only enforced in the UI, not via API
Related Resources
- Webhooks - Custom attributes are included in webhook payloads
- Widget SDK - Set custom attributes from your website
- API Reference - Custom attribute API endpoints

