Every datum stored in Custobar has a data type, which defines how the datum can be used. For example a number can be compared to another, to find out whether it is greater or less than another number.
The data types supported by Custobar are
|boolean||Boolean value, either
|country_code||ISO-3166 country code, e.g. “it” for Italy.|
|date||ISO-8601 date, e.g.
|datetime||ISO-8601 datetime, e.g.
|day_of_year||Day of a year in format
|RFC5322 string, with additional validation for email address well-formattedness.|
|integer||Number without a decimal part.|
|language_code||ISO-639-1 language code, e.g. “sv” for Swedish.|
|list||List of values. Supports set operations.|
|money||Cent price in a currency. E.g.
|number||Decimal number, e.g.
|object||Collection of values keyed with a string. For example customers are objects of values, such as
|phone_number||E.164 string, with additional validation for phone number well-formattedness.|
|set||List of values which are unique in the
|string||String of characters.|
When designing a schema for your data, you must pick a data type for each of the fields, before they can be used in Custobar.
During the data import the fields in the import file are checked for validity according to the data type constraints and converted if possible. For example, you cannot import a string value, such as “Peter” into a field of type