Skip to content

Data types

Bizzkit PIM offers an advanced type system which is the foundation of PIM attributes. It is based upon the primitive .NET types.

Commonly used data types

The following data types are most commonly used and can be considered the base of a typical data model in Bizzkit PIM:

  • PString
  • PTranslatedString
  • PInt32
  • PDecimal2
  • PBrand
  • PBoolean
  • PDateTime

Basic types

Basic types are types that contain a single value.

In the following, the Roundtrip format documents how the type is represented when exchanging data with external systems and values are converted to a string.

The string representation is guaranteed to roundtrip perfectly regardless of cultural settings, data type ranges in non-.NET programming languages, etc.

Numeric types

Integers

Data type Description Range Roundtrip format
PInt16 16-bit signed integer.
Equivalent with System.Int16 in .NET.
-32,768 to 32,767 Example: "32767"
PInt32 32-bit signed integer.
Equivalent with System.Int32 in .NET.
-2,147,483,648 to 2,147,483,647 Example: "2147483647"
PInt64 64-bit signed integer.
Equivalent with System.Int64 in .NET.
–9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 Example: "9223372036854775807"

Decimals

Represents an exact decimal value.

PIM decimal types are based on the .NET System.Decimal type. They are named PDecimalN (where N=1..9) and all have 18 significant digits where N denotes the Number of digits that are reserved for decimal values.

So PDecimalN has 18-N digits before the decimal point and N digit(s) after.

Data type Range Roundtrip format
PDecimal1 [-]{0..99999999999999999}[.{0..9}] Example: "99999999999999999.9"
PDecimal2 [-]{0..9999999999999999}[.{0..99}] Example: "9999999999999999.99"
PDecimal3 [-]{0..999999999999999}[.{0..999}] Example: "999999999999999.999"
PDecimal4 [-]{0..99999999999999}[.{0..9999}] Example: "99999999999999.9999"
PDecimal5 [-]{0..9999999999999}[.{0..99999}] Example: "9999999999999.99999"
PDecimal6 [-]{0..999999999999}[.{0..999999}] Example: "999999999999.999999"
PDecimal7 [-]{0..99999999999}[.{0..9999999}] Example: "99999999999.9999999"
PDecimal8 [-]{0..9999999999}[.{0..99999999}] Example: "9999999999.99999999"
PDecimal9 [-]{0..999999999}[.{0..999999999}] Example: "999999999.999999999"

Note

If a value is specified with more than N digit(s) after the decimal point, the value will be rounded to N digit(s) using ordinary rounding rules (0..4 => down and 5..9 => up).

If a value is specified with more than 18-N digits before the decimal point, an ArgumentOutOfRangeException is thrown in the constructor.

Date and time

PTimeSpan

Represents a time interval that's independent of date and time of day.

Internally uses .NET's System.TimeSpan and it's stored as the number of ticks.

A tick is 100 nanoseconds or one ten-millionth of a second.

It ranges from -9,223,372,036,854,775,808 ticks to 9,223,372,036,854,775,807 ticks which corresponds to slightly more than negative 10,675,199 days to slightly more than 10,675,199 days.

Roundtrip format is [-]d.hh:mm:ss.fffffff, where

  • d = number of whole days
  • hh = 2 digit number of whole hours in the time interval that aren't counted as part of days
  • mm = 2 digit number of whole minutes in the time interval that aren't included as part of hours or days
  • ss = 2 digit number of whole seconds in the time interval that aren't included as part of hours, days, or minutes
  • fffffff = ten-millionths of a second (or the fractional ticks) in a time interval

Example: "10675199.02:48:05.4775807"

PDateTime

Represents an instant in time, typically expressed as a date and time of day.

Internally uses .NET's System.DateTime, but unlike System.DateTime, it truncates seconds, miliseconds and offset.

Warning

The type should not be used if time zone is important. In that case use PDateTimeOffset instead.

It ranges from 1/1/0001 12:00 AM to 12/31/9999 11:59 PM (in the Gregorian calendar).

Roundtrip format is yyyy-MM-ddThh:mm:ss.fffffff, where

  • yyyy = 4 digit year
  • MM = 2 digit month
  • dd = 2 digit day
  • hh = 2 digit hours
  • mm = 2 digit minutes
  • ss = digit seconds
  • fffffff = ten-millionth of a second

Example: "9999-12-31T23:59:59.9999999"

Note

The second and fractional part is not supported by the PDateTime type itself. It's purely a preparation in the roundtrip format for a future change in case it's decided to support greater precision in PDateTime.

PDateTimeOffset

Represents a point in time, typically expressed as a date and time of day, relative to Coordinated Universal Time (UTC).

Internally uses .NET's System.DateTimeOffset, but unlike System.DateTimeOffset, it truncates seconds and miliseconds.

It ranges from 1/1/0001 12:00 AM +00:00 to 12/31/9999 11:59 PM +00:00. Valid offsets are -12:00 to +14:00 as long as they don't exceed the minimum and maximum value above.

Roundtrip format is yyyy-MM-ddThh:mm:ss.fffffff[+|-]zzz, where

  • yyyy = 4 digit year
  • MM = 2 digit month
  • dd = 2 digit day
  • hh = 2 digit hours
  • mm = 2 digit minutes
  • ss = digit seconds
  • fffffff = ten-millionth of a second
  • zzz = timezone offset from UTC, measured in hours and minutes (hh:mm)

Example: "9999-12-31T23:59:59.9999999+00:00"

Note

The second and fractional part is not supported by the PDateTimeOffset type itself. It's purely a preparation in the roundtrip format for a future change in case it's decided to support greater precision in PDateTimeOffset.

Strings and characters

Data type Description Roundtrip format
PChar Unicode 16-bit character.
Equivalent with System.Char in .NET.
Example: "a"
PString Represents text as a sequence of UTF-16 code units.
Equivalent with System.String in .NET.
Example: "The quick brown fox jumps over the lazy dog"

Referential types

Represents a link between an attribute value and an entity such as an image or product in PIM.

In the database mapping, referential types are stored in a column with a foreign key constraint ensuring referential integrity.

Referential types are based on PGuid and PInt32.

Data type Description Roundtrip format
PMediaBank6File Referential link to a file in Bizzkit DAM Example: "43b154d9-4687-460f-b1fd-31735e6bbb44"
PContentManagement7Article Referential link to an article in the Bizzkit CMS Example: "43b154d9-4687-460f-b1fd-31735e6bbb44"
PYouTubeVideo Referential link to a YouTube video Example: "43b154d9-4687-460f-b1fd-31735e6bbb44"
PBrand Referential link to a brand Example: "43b154d9-4687-460f-b1fd-31735e6bbb44"
PUser Referential link to a user Example: "43b154d9-4687-460f-b1fd-31735e6bbb44"
PProductCatalogueItem Referential link to a product catalogue item Example: "43b154d9-4687-460f-b1fd-31735e6bbb44"
PAttribute Referential link to an attribute Example: "43b154d9-4687-460f-b1fd-31735e6bbb44"
PChannel Referential link to a channel Example: "1"

Other types

Data type Description Range Roundtrip format
PBoolean Represents a Boolean (true or false) value. False and True Example: "True"
PGuid Represents a globally unique identifier (GUID). From wikipedia: A guid is a 128-bit value commonly displayed as 32 hexadecimal digits with groups separated by hyphens, such as 21EC2020-3AEA-4069-A2DD-08002B30309D Example: "43b154d9-4687-460f-b1fd-31735e6bbb44"

Segmented types

A segmented type represents a single logical value consisting of multiple values segmented by a segmentation key.

Segmented types are built on top of basic types.

Translation culture

Types that are segmented on translation culture.

Data type Segment data type Description
PTranslationCultureSpecificBoolean PBoolean Boolean (true or false) value that can be set per translation culture.

For example:
en-GB: true
da-DK: false
se-SV: true
PTranslationCultureSpecificBooleanD PBoolean Boolean (true or false) value that can be set per translation culture and has a default value for when no appropriate translation culture exists.

For example:
DEFAULT: true
da-DK: false
se-SV: true
PTranslationCultureSpecificDecimal2 PDecimal2 Exact decimal value with 2 digits after the decimal point. Value can be set per translation culture.

For example:
en-GB: 35.00
da-DK: 1835487.95
se-SV: 2000.50
PTranslationCultureSpecificDecimal2D PDecimal2 Exact decimal value with 2 digits after the decimal point. Value can be set per translation culture and has a default value for when no appropriate translation culture exists.

For example:
DEFAULT: 35.00
da-DK: 1835487.95
se-SV: 2000.50
PTranslatedString PString String that can be translated into several translation cultures.

For example:
en-GB: "the quick fox jumps over the lazy brown dog"
da-DK: "den hurtige brune ræv springer over den dovne hund"
se-SV: "den snabba bruna räven hoppar över den lata hunden"
PTranslatedStringD PString String that can be translated into several translation cultures and has a default value for when no appropriate translation culture exists.

For example:
DEFAULT: "the quick fox jumps over the lazy brown dog"
da-DK: "den hurtige brune ræv springer over den dovne hund"
se-SV: "den snabba bruna räven hoppar över den lata hunden"

Device

Types that are segmented on device.

Data type Segment data type Description
PResponsiveMediaBank6File PMediaBank6File Referential link to a MediaBank 6 file that can be targeted specific devices.

For example:
iPhone: 0b8e5ef5-a890-43da-9e02-dda74f0645b5
iPad: 5e280b08-7649-4e0e-a344-0922987210be
Desktop: a44a170a-40cc-48e0-a0e3-82cb7f42499a
PResponsiveMediaBank6FileD PMediaBank6File Referential link to a file in MediaBank 6 that can be a targeted specific devices and has a default value for when no appropriate device exists.

For example:
DEFAULT: a44a170a-40cc-48e0-a0e3-82cb7f42499a
iPhone: 0b8e5ef5-a890-43da-9e02-dda74f0645b5
iPad: 5e280b08-7649-4e0e-a344-0922987210be

Channel

Types that are segmented on channel.

Data type Segment data type Description
PChannelSpecificBoolean PBoolean Boolean (true or false) value that can be set per channel.

For example:
iPhone: true
iPad: false
Desktop: true
PChannelSpecificBooleanD PBoolean Boolean (true or false) value that can be set per channel and has a default value for when no appropriate channel exists.

For example:
DEFAULT: true
iPhone: true
iPad: false
PChannelSpecificDecimal2 PDecimal2 Exact decimal value with 2 digits after the decimal point. Value can be set per channel.

For example:
iPod: 35.00
iPad: 1835487.95
Desktop: 2000.50
PChannelSpecificDecimal2D PDecimal2 Exact decimal value with 2 digits after the decimal point. Value can be set per channel and has a default value for when no appropriate channel exists.

For example:
DEFAULT: 35.00
iPad: 1835487.95
Desktop: 2000.50
PChannelSpecificInt32 PInt32 Integer value that can be set per channel.

For example:
iPhone: 35
iPad: 1835487
Desktop: 2000
PChannelSpecificInt32D PInt32 Integer value that can be set per channel and has a default value for when no appropriate channel exists.

For example:
DEFAULT: 35
iPad: 1835487
Desktop: 2000
PChannelSpecificString PString String value which can be set per channel.

For example:
iPhone: "the quick fox jumps over the lazy brown dog"
iPad: "den hurtige brune ræv springer over den dovne hund"
Desktop: "den snabba bruna räven hoppar över den lata hunden"
PChannelSpecificStringD PString String value which can be set per channel and has a default value for when no appropriate channel exists.

For example:
DEFAULT: "the quick fox jumps over the lazy brown dog"
iPad: "den hurtige brune ræv springer over den dovne hund"
Desktop: "den snabba bruna räven hoppar över den lata hunden"
PChannelSpecificProductCatalogueItem PProductCatalogueItem Referential link to a product catalogue item that can be targeted specific devices.

For example:
iPhone: 0b8e5ef5-a890-43da-9e02-dda74f0645b5
iPad: 5e280b08-7649-4e0e-a344-0922987210be
Desktop: a44a170a-40cc-48e0-a0e3-82cb7f42499a
PChannelSpecificProductCatalogueItemD PProductCatalogueItem Referential link to a product catalogue item that can be targeted specific devices and has a defalt value for when no appropriate channel exists.

For example:
DEFAULT: 0b8e5ef5-a890-43da-9e02-dda74f0645b5
iPad: 5e280b08-7649-4e0e-a344-0922987210be
Desktop: a44a170a-40cc-48e0-a0e3-82cb7f42499a

Market

Types that are segmented on market.

Data type Segment data type Description
PMarketSpecificBoolean PBoolean Boolean (true or false) value that can be set per channel, which for example could be used to control in which market a specific product should be available.
PMarketSpecificDecimal2 PDecimal2 Exact decimal value with 2 digits after the decimal point. Value can be set per market.

For example:
Denmark: 25.00
Sweden: 30.00