Basics: Data Types

Data Types

Smart Tags supports the following set of data types that you can use for your condition expressons:

Data Types Description
String Strings are used to represent data as text. For example, the word hamburger and the phrase I ate 3 hamburgers are both strings.
Boolean A boolean type can have one of two values: true or false.
Integer An integer is a whole number — that is, a number with no fractional or decimal portion, for example 42, 3005
Float 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 Date and time in ISO 8601 format.
Relative Date Relative to current date and time (i.e now).
Weight Weights are represented in one of the following units:
  • grams (g)
  • kilograms (kg)
  • ounces (oz)
  • pounds (lb)
Smart Tags will automatically convert weights between units based on the desired weight units for comparison.
For example, if the product weight is in kg and you are comparing against lb, Smart Tags will convert the weights to lb.
Weight (grams) Weights that are represented in grams (g)
Metafield 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.
HTML 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.
Enum (Fixed) Predefined fixed list of valid values. For example, valid discount code types are:
  • Fixed Amount
  • Percentage
  • Shipping
Enum (Custom) 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 amazon, shipwire, etc.
Price Price represented in floating-point number.
ID A unique identifier for an object such as a product, an order, a customer, etc.