Basics: Data Types
Smart Tags supports the following set of data types that you can use for your condition expressons:
|Strings are used to represent data as text. For example, the word
hamburger and the phrase
I ate 3 hamburgers are both strings.
|A boolean type can have one of two values:
|An integer is a whole number — that is, a number with no fractional or decimal portion, for example
|A float is a floating-point number that has fractional parts expressed with a decimal point, for example
3.14. Useful to represent prices and weight.
|Date and time in ISO 8601 format.
|Relative to current date and time (i.e now).
|Weights are represented in one of the following units:
For example, if the product weight is in
kg and you are comparing against
lb, Smart Tags will convert the weights to
|Weights that are represented in grams (g)
|A metafield consists of a namespace, a key, a value. The namespace is used to group different metafields together. For example, another third-party Shopify app may specify its app name as the namespace.
A metafield value may be stored as a string or an integer. Smart Tags will automatically convert the value to the correct type.
|Content stored as HTML text, for example product description. Smart Tags allows you to use the content as raw HTML as it is, or just its text content by stripping its HTML tags.
|Predefined fixed list of valid values. For example, valid discount code types are:
|Predefined list of valid values but unlike
Enum (Fixed), may have / can accept other custom values. For example, valid fulfillment services values includes
manual (which is predefined) and other provider names for example
|Price represented in floating-point number.
|A unique identifier for an object such as a product, an order, a customer, etc.