Skip to main content

Types

Every variable in Vom has a type that determines what values it can hold and what operations can be performed on it. The types supported are the following:

Boolean​

A logical value representing true or false. Useful for conditions, flags, and yes/no decisions.

Examples: TRUE, FALSE

Number​

A numeric value, covering both integers and decimals. Used for amounts, scores, counts, percentages, and any other quantitative data.

Examples: 42, 3.14, -100, 0.5

Text​

A sequence of characters, enclosed in double quotes. Used for names, identifiers, labels, and any other free-form data.

Examples: "Hello", "John Doe", "approved"

Datetime​

An instant in time, including both date and time of day. Datetimes should be provided as combined date and time ISO 8601 strings in the UTC timezone (ending with Z).

Examples: 2024-06-12T10:15:00Z, 2023-01-01T00:00:00Z

To represent a date without a specific time, use midnight, for example 2024-06-12T00:00:00Z.

Within formulas, datetimes work like numbers (similar to Excel serial dates), so you can use date functions such as DATEDIF, NOW, and YEAR to manipulate them. See Vom Formulas for more details.

Document​

A file passed as a variable value, such as an image, PDF, or scanned form. Documents are used for feeding files into Generative AI blocks, for example to extract information or verify authenticity.

A document value has two fields:

  • contents: File data as a Base64-encoded DataURI, following the format data:[<media-type>][;base64],<data>.
  • filename: The original name of the file.

Example:

{
"contents": "data:text/plain;base64,dGVzdA==",
"filename": "example.txt"
}

Within formulas, document variables evaluate to TRUE if the document was provided and FALSE otherwise, giving a simple way to check whether an optional document was supplied. See Vom Formulas for more details.

List​

Any of the types above can also be used as a list. A list is an ordered sequence of values that all share the same type, for example a list of transaction amounts or a set of category labels. All elements must have the same type, and empty lists are not supported.

Examples: [1, 2, 3] (list of numbers), ["a", "b", "c"] (list of texts), [TRUE, FALSE, TRUE] (list of booleans)

tip

Unlike Excel, Vom uses square brackets [] to write lists in formulas.