One of the strong benefits in Persoo are strict data types for all fields in data tables and also in events and visitor profiles.
Following values are all of different types:
true, false, 123, 8.88, "abc", ["a", "b"], gender:male, gender:female,...
What are data types?
- Double – basic double or its flavours carrying also the information about formating, specific meaing
- price in currence
- Enumeration – each enumeration can contain only limited list of values. Enumeration is for example “gender” with values “male”, “female”. Or “color” with values “red”, “blue”, “yellow”. Or “brand” with the list of existing brands.
- System Enumeration types – there are many system enumeration types backed with event history table, i.e. for event names, hostnames, pathnames, internal search query, etc.
- “<Basic Type> List” – array of given data types, i.e. “String List” means array of “Strings”.
Why to use field data types?
- Data types help us to convert data to the right format (i.e. in CSV everything is string).
- Each data type is related to other operators. For numbers you can use <, ==, >, …. and for strings you can use “contains”, “match”,…
- There are too many fields and variables in Persoo. In Targeting rules and in Algorithm rules, data types helps you to suggest only the variables matching correct data type … i.e. when you need to compare a “double” variable with something, it make sence to compare it only with “double” value or “double” type variable, but not with strings.
More about Enumerations
When you define in data import, that field “gender” in a table “products” has type “enumeration”, you create data type called “Enumeration for field: products.gender”. Since the definition, you can use this data type also in other tables or in visitor profiles.
Available values of this enumeration data type are defined by the values of the definition field in the given table. The table is used as “look up table” for suggesting values of the field in rules/conditions in persoo administration.
There are also system enumeration data types. These are backed by internal data tables (which you cannot see) containing values of events, hostnames, pathnames, … from the event history.
Note: if you want to be able to use a rule in an algorithm for table products, that i.e. product field “brand” is equal to “currentQuery.brand”, you must use the same “enumeration data type” in both tables. Typically, one table will define new data type. Second table will use the data type from the list in select box.