Attribute types
The seven value types an attribute can have, what each accepts, and what happens to a value of the wrong type.
Every attribute on a profile, on an event, in a custom dataset or on a computed attribute has a type. The type decides what values are accepted, how the value is stored, which conditions the filter builder offers for it, and how it behaves in personalization and expressions.
You declare types on the Schema screen: under Entities for profiles, under Event types for events (the Type column of the attribute table), in custom datasets as Attribute types, and as the Value type of a computed attribute. See Profiles and entities and Attributes and computed attributes.
The seven types
| Type | Holds | What you send (JSON) | Notes |
|---|---|---|---|
string | Text | "gold" | Only text is accepted. A number sent to a string attribute is refused. |
integer | A whole number | 42 | Must be a JSON number. A fractional number is cut to its whole part (3.9 is stored as 3). Text such as "42" is refused. |
decimal | A number with a fractional part | 19.9 | Must be a JSON number. |
boolean | True or false | true | Only true or false, not "true" or 1. |
datetime | A moment in time | "2026-10-15T09:30:00Z" | See Datetime values. |
json | A structured object | {"city": "Bratislava"} | Must be a JSON object. A list is not accepted. Stored as given. |
array_string | A list of text values | ["vip", "newsletter"] | Must be a JSON list. Every entry is converted to text, so [1, 2] is stored as "1" and "2". |
A value of the wrong shape is refused when you send the data, with a message that names the attribute, for example:
attribute 'age': expected number for integer, got string
attribute 'tags': expected array for array_string, got stringFor a batch call the message is prefixed with the position of the item (profiles[3]: …), and nothing in the batch is stored. A data contract can change this: it can coerce, warn or reject on a mismatch.
Datetime values
A datetime attribute accepts text in any of these forms:
| Form | Example | Notes |
|---|---|---|
| Date and time with a zone | 2026-10-15T09:30:00Z, 2026-10-15T11:30:00+02:00 | Fractions of a second are accepted. |
| Date and time without a zone | 2026-10-15T09:30:00 | Taken as UTC. |
| Date only | 2026-10-15 | Midnight UTC. |
| Unix time | 1792042200 | A JSON number of seconds since 1 January 1970, UTC. |
Anything else is refused with cannot parse "…" as datetime. Dates are stored and shown in UTC. For imports through a connector, a date-time written as 2026-10-15 09:30:00 is also understood.
Undeclared attributes
An attribute that is not declared in the schema is accepted unless the entity or event type is set to Strict (reject unknown attributes); in strict mode a profile or event carrying an undeclared key is refused with status 422. In the default, lenient mode the type is worked out from the value:
| You send | Stored as |
|---|---|
| Text | string |
| A number | decimal |
true or false | boolean |
| A list | array_string |
| An object | json |
null | Refused: attribute value is null |
Declare the types of attributes you filter or report on. A number that arrives undeclared is a decimal, which is not the same as a declared integer when you later compare or group by it.
Types in other places
- Filters. The filter builder offers number comparison and between for
integeranddecimal, date comparison fordatetime, a checkbox forboolean, and text operators for the rest. See Query filters. - Personalization. In message copy, numbers behave as decimal numbers (compare with
2.0, not2), dates are formatted withdate, and lists are looped withrange. See Personalization syntax. - Imports. A connector mapping gives each field a type; a text cell that cannot be read as that type is a row error. For
boolean,true,1andyesare true andfalse,0,noand an empty cell are false. Forarray_string, a cell with comma-separated values becomes a list. - Journeys. A journey node that writes an attribute renders its value as text and then converts it to the attribute's type. For
array_stringa text starting with[is read as a JSON list, and any other text is split at commas. Forjson, the text must be a JSON object. - PII level. Each attribute also carries a PII sensitivity level (0 means not sensitive). It is independent of the type and controls who sees the value; see Consent and purposes.
Related
Expressions
The expression language used in eligibility rules, score formulas, signal transforms, cohort filters, data-contract rules and webhook success conditions.
Query filters
The condition builder used by segments, reports and journey conditions, with its fields, operators, groups and event aggregates.