CustomerTag
Tag for customer categorization and filtering. Extends Tag with customer reference and assignment metadata for segmentation, targeting, and analytics.
Properties
Includes inherited properties from Tag
| Property | Type | Mode | Description | Required | Source |
|---|---|---|---|---|---|
| name | string | stored | Name or label of the tag Example: | Required | Tag |
| slug | string | stored | URL-friendly version of the tag name for routing and APIs Example: | Optional | Tag |
| category | string | stored | Category or group for the tag (e.g., 'segment', 'industry', 'priority', 'status') Example: | Optional | Tag |
| description | string | stored | Detailed description of what this tag represents Example: | Optional | Tag |
| color | string | stored | Color code for visual representation in UI (hex color) Example: | Optional | Tag |
| icon | string | stored | Optional icon identifier for the tag Example: | Optional | Tag |
| isActive | boolean | stored | Whether this tag is currently active and available for assignment Example: | Optional | Tag |
| sortOrder | number | stored | Display order for sorting tags in UI Example: | Optional | Tag |
| customer | Customer | stored | Reference to the customer being tagged | Required | CustomerTag |
| assignedAt | DateTime | stored | Timestamp when the tag was assigned to this customer Example: | Required | CustomerTag |
| assignedBy | User | stored | User who assigned the tag to this customer | Optional | CustomerTag |
| isSystemGenerated | boolean | stored | Whether the tag was automatically assigned by the system (e.g., from analytics, ML models) or manually | Optional | CustomerTag |
| confidence | number | stored | Confidence score for system-generated tag assignments (0-1 range, only for ML-generated tags) Example: | Optional | CustomerTag |
| notes | string | stored | Optional notes about why this tag was assigned to this customer Example: | Optional | CustomerTag |
Examples
Example 1
{
"@type": "CustomerTag",
"customer": {
"@type": "Customer",
"customerNumber": "CUST-2024-00123"
},
"name": "VIP",
"slug": "vip",
"category": "segment",
"description": "Very Important Person - top tier customer",
"color": "#8B5CF6",
"icon": "star",
"isActive": true,
"sortOrder": 1,
"assignedAt": "2024-11-12T10:00:00Z",
"assignedBy": {
"@type": "User",
"userId": "admin_001",
"name": "Admin User"
},
"isSystemGenerated": false,
"notes": "Promoted to VIP after reaching $10k lifetime value"
}Example 2
{
"@type": "CustomerTag",
"customer": {
"@type": "Customer",
"customerNumber": "CUST-2024-00123"
},
"name": "At-Risk",
"slug": "at-risk",
"category": "lifecycle",
"description": "Customer at risk of churning",
"color": "#EF4444",
"icon": "alert-triangle",
"isActive": true,
"sortOrder": 5,
"assignedAt": "2024-11-12T11:00:00Z",
"isSystemGenerated": true,
"confidence": 0.87,
"notes": "Churn model prediction - no purchase in 120 days"
}Example 3
{
"@type": "CustomerTag",
"customer": {
"@type": "Customer",
"customerNumber": "CUST-2024-00789"
},
"name": "Enterprise",
"slug": "enterprise",
"category": "segment",
"description": "Enterprise customer with multiple users",
"color": "#3B82F6",
"icon": "building",
"isActive": true,
"sortOrder": 2,
"assignedAt": "2023-06-10T15:00:00Z",
"isSystemGenerated": false
}Example 4
{
"@type": "CustomerTag",
"customer": {
"@type": "Customer",
"customerNumber": "CLIENT-2024-00456"
},
"name": "Black Friday 2024",
"slug": "black-friday-2024",
"category": "campaign",
"description": "Participated in Black Friday 2024 campaign",
"color": "#000000",
"icon": "tag",
"isActive": true,
"sortOrder": 10,
"assignedAt": "2024-11-01T00:00:00Z",
"isSystemGenerated": false
}