Skip to main content

Types of fields in the database

Default database fields

This table provides a list of default database fields, their API matches, data types, and examples of values that can be used.

Field in the databaseField name in the APIField type in the UIThe type of the field in the APIExample of the value
EmailemailLine/Emailstring"example@example.com"
PhonesphonesPhone listarray["+79001234567"]
Name_fnameLinestring"John"
Last name_lnameLinestring"Doe"
Date of birth_bdateDatestring"2001-12-31"
"2001-12-31T00:00+03:00"

The time can only be transmitted via the API.
Gender_sexEnumstring"male"
"female"
Date of reg._regdateDatestring"2023-12-31"
"2023-12-31T23:59:59+03:00"
The IP address of the reg._regipIPstring"127.0.0.1"
City reg._regcityLinestring"Moscow"
Country reg._regcountryLinestring"Russian Federation"
"RU"
Link reg._regurlLinestring"https://example.com"
IP address_ipIPstring"127.0.0.1"
City_cityLinestring"Moscow"
Country_countryLinestring"Russian Federation"
"RU"
Region_regionLinestring"Europe/Moscow"
Index_postal_codeLinestring"190000"
Time zone_tzLinestring"Europe/Moscow"
Supplier_vendorLinestring"form #30"

Custom database fields

The type of field determines which operators will be available in segments and in dynamic template variables, so we recommend carefully choosing the type of additional field in the database.

Field type in UIField type in APIExample of the value
Integerint100
Floatfloat100.5
Linestring"string value"
Datestring"2024-05-27T12:00:00Z"
Booleanbooleantrue
false
Enumstring"Option 1"

You can also pass a value as a number, for example, 1. The number corresponds to the ordinal number of the item in the list.
IPstring"127.0.0.1"
Tagsarray["Tag 1", "Tag 2", "Tag 3" ]
Objectobject{ "key_1": { "sub_key": "sub_value" } }
Array of objectsarray of objects[ { "key_1": "value_1" }, { "key_2": "value_2" } ]

Acceptable formats and restrictions

The platform expects certain value formats for each type of field. Make sure that the imported data meets the specified requirements, otherwise the system will not be able to process them correctly.

  • Email — the format must comply with RFC standards. A regular expression is used for validation:
^[-a-z0-9!#$%&'*+/=?^_{|}~]+(\.[-a-z0-9!#$%&'*+/=?^_{|}~]+)*@((?:localhost|([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?\.)*([a-z]{1,24})))$
  • Phones — the number must correspond to the international format (without spaces, hyphens and other separators, except for the plus sign at the beginning). More information about the standard can be found in this article.

  • Dates — are recorded in the format RFC 3339 (ISO 8601) indicating the time zone.

  • Country — accepted as a two-letter code ISO 3166-1 alpha-2 or the full name (in any case).

  • Gender — acceptable values are described in this article.

  • Provider — the length of the string is no more than 26 characters.

  • IP — IPv4 format.

  • Line — it is not recommended to store more than 100 KB of text in one field.

  • Objects and arrays of objects — you can write only peer-to-peer objects or peer objects nested in other objects. If you are using objects with a more complex structure, connect the SQL database and create queries to select profiles. In object field names, only Latin letters (in any case), digits from 0 to 9, the underscore _, and the hyphen - are allowed.

  • The limit on the amount of data of one profile in the database is 16 MB, including all metadata. However, it is not recommended to store a total of more than 2 MB in additional profile fields.

Matching of database fields and form elements

If you are configuring profile data import from form fields to database fields, make sure that you are using the correct field type for each form element.

Form elementField in the database
Short textCustom field with the “String" type
EmailDefault ”Email" field
Phone numberDefault field “Phones”
Long textCustom field with the “String" type
NumberCustom field with the “Integer” type
Yes/NoCustom field with the “Boolean” type
One choiceCustom field with the “String" type
Multiple choiceCustom field with the “Tags" type
Drop-down listCustom field with the “Tags" type
DateDefault or custom field with the “Date” type
RangeCustom field with the “Integer” type
note

Although you can write all user data in string fields, this will limit the possibilities for further segmentation. For example, if the date is written in a string field, you will not be able to use the comparison operators "date less" or "date more" in segments or templates.