|
| 1 | +# Profile attributes |
| 2 | + |
| 3 | +**Profile attributes** define the shape of data that can be stored on a profile for your organization. They control attribute names, types, mutability, and how values are resolved when two profiles are merged. |
| 4 | + |
| 5 | +Together, the set of profile attributes defined for your organization makes up the **profile attribute schema**. |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## Scopes |
| 10 | + |
| 11 | +Profile attributes are organised into three scopes: |
| 12 | + |
| 13 | +| Scope | Description | |
| 14 | +|---|---| |
| 15 | +| `identity_attributes` | Attributes sourced from the identity system (e.g. email, phone, name from {{ product_name }} claims) | |
| 16 | +| `traits` | Behavioural or preference data managed by the application (e.g. language, segments) | |
| 17 | +| `application_data` | Per-application attributes, scoped by application identifier | |
| 18 | + |
| 19 | +--- |
| 20 | + |
| 21 | +## Attribute fields |
| 22 | + |
| 23 | +| Field | Required | Description | |
| 24 | +|---|---|---| |
| 25 | +| `attribute_name` | yes | Dot-notation path including scope prefix | |
| 26 | +| `display_name` | no | Human-readable label | |
| 27 | +| `value_type` | yes | One of the supported data types (see below) | |
| 28 | +| `merge_strategy` | yes | How to resolve the value when two profiles are merged | |
| 29 | +| `mutability` | yes | Read/write behaviour (see below) | |
| 30 | +| `multi_valued` | no | If `true`, the attribute holds an array of the declared type | |
| 31 | +| `canonical_values` | no | Enumerated allowed values (for string attributes) | |
| 32 | +| `sub_attributes` | no | Child attributes when `value_type` is `complex` | |
| 33 | +| `application_identifier` | no | Scopes the attribute to a specific application (for `application_data`) | |
| 34 | + |
| 35 | +--- |
| 36 | + |
| 37 | +## Supported value types |
| 38 | + |
| 39 | +| Type | Description | |
| 40 | +|---|---| |
| 41 | +| `string` | Plain text | |
| 42 | +| `integer` | Whole number | |
| 43 | +| `decimal` | Floating-point number | |
| 44 | +| `boolean` | `true` / `false` | |
| 45 | +| `date` | Calendar date | |
| 46 | +| `date_time` | Date and time | |
| 47 | +| `epoch` | Unix timestamp (milliseconds) | |
| 48 | +| `complex` | Nested object, define child fields in `sub_attributes` | |
| 49 | + |
| 50 | +--- |
| 51 | + |
| 52 | +## Mutability |
| 53 | + |
| 54 | +Mutability controls whether an attribute value can be changed once set. |
| 55 | + |
| 56 | +| Value | Meaning | |
| 57 | +|---|---| |
| 58 | +| `readWrite` | Can be freely read and updated | |
| 59 | +| `readOnly` | System-managed, cannot be updated by applications (e.g. `meta.created_at`) | |
| 60 | +| `writeOnly` | Can be written but not read back | |
| 61 | +| `immutable` | Must be set at creation, cannot be changed (e.g. `profile_id`) | |
| 62 | +| `writeOnce` | Can be empty initially; once set, cannot be updated (e.g. `user_id`) | |
| 63 | + |
| 64 | +--- |
| 65 | + |
| 66 | +## Merge strategies |
| 67 | + |
| 68 | +When two profiles are unified, the merge strategy for each attribute decides which value wins. |
| 69 | + |
| 70 | +| Strategy | Behaviour | |
| 71 | +|---|---| |
| 72 | +| `overwrite` | The incoming profile's value replaces the existing one | |
| 73 | +| `combine` | Both values are combined into an array (requires `multi_valued: true`) | |
| 74 | + |
| 75 | +--- |
| 76 | + |
| 77 | +## Core attributes |
| 78 | + |
| 79 | +These attributes are built into every profile and cannot be modified: |
| 80 | + |
| 81 | +| Attribute | Type | Mutability | |
| 82 | +|---|---|---| |
| 83 | +| `profile_id` | `string` | `immutable` | |
| 84 | +| `user_id` | `string` | `writeOnce` | |
| 85 | +| `meta.created_at` | `date_time` | `readOnly` | |
| 86 | +| `meta.updated_at` | `date_time` | `readOnly` | |
| 87 | +| `meta.location` | `string` | `readOnly` | |
| 88 | + |
| 89 | +--- |
| 90 | + |
| 91 | +## Staying in sync with {{ product_name }} |
| 92 | + |
| 93 | +`identity_attributes` mirror the claim dialects in {{ product_name }}. When a claim is added, updated, or deleted, the service automatically reconciles its local attribute set so the two stay aligned, no manual action is needed. |
| 94 | + |
| 95 | +--- |
| 96 | + |
| 97 | +## Related |
| 98 | + |
| 99 | +- [Manage profile attributes]({{base_path}}/guides/customer-data/guides/manage-profile-attributes) |
| 100 | +- [Unification rules]({{base_path}}/guides/customer-data/concepts/unification-rules) |
0 commit comments