Defining Data

Learn how to define data in Kognitos.

Overview

In Kognitos, defining data refers to naming a specific piece of information, allowing it to be stored, referenced, updated, and passed between steps within an automation.

Every data element (also referred to as a fact) consists of two parts:

  1. A name that identifies and labels the data.

  2. A value, which represents the information itself. Values can be singular or plural.

Defining Singular Data

To define a singular data element, use "is":

<name> is <value>

Defining Plural Data

To define a plural data element, use "are":

<name(s)> are <value(s)>

Examples

  1. In this example, the customer is the data name. It is assigned the singular value "John Smith":

the customer is "John Smith"
  1. Here, the items is the plural data name. It is assigned the plural value of the documents.

  1. In this example, the fruits is the plural data name. It is assigned a list (plural) of fruit values:

Data Names

Data names define how information is labeled and referenced. The following rules apply:

1. Begin with "the"

Data names must be prefaced with the. For example:

2. Names can be Simple or Descriptive

Data names can be simple or descriptive. Adjectives can be used in descriptive names to provide additional clarity or context. For example:

Simple Name

Descriptive Name

Data Values

Data values can be singular or plural. Possible data types include numbers, text, dates, lists, or references to other data elements.

1. Numbers

Numeric values can be assigned to data such as age, balance, or rates. For example:

2. Text

Text values can be words, sentences, or phrases. They can include any characters—letters, numbers, symbols, or spaces—as long as they are enclosed in double quotes (""). For example:

3. Dates

A date value represents a specific calendar day, such as a due date, birthday, or event date. Be sure to enclose date values in double quotes (""). For example:

4. Lists

To define a list, separate the values by commas. For example:

5. Referencing Other Data

The value of a data element can also be a reference to another data element. In these cases, the data value is set to another data name. For example:

6. The Above

When a data element's value is set to the above, Kognitos makes a copy of the value from the previous lines in the automation:

<data name> is the above

Examples

  1. In this example, the backup email is assigned the value [email protected].

the customer email is "[email protected]"
the backup email is the above
  1. Here, the invoice total is assigned the value 150.

the order total is 150
the invoice total is the above
  1. In this example, the file is assigned a copy of the above file in the automation.

the file is the above

Reassigning Data

Use the use keyword to reassign a data element, which copies the reference to the original data value:

use <data value> as the <data name>

Warning: Overwriting Data

Examples

  1. In this example, the registration date is reassigned the value 11-05-2024.

use "11-05-2024" as the registration date
  1. In this example, the order name is assigned a copy of the reference to the last name, meaning it will point to the same value.

use the last name as the order name

If the last name changes, the order name will also change, because it references the same value. When the last name changes to Smith-Brown (line #3), the order name also changes (line #4):

the last name is "Smith"
use the last name as the order name
the last name is "Smith-Brown"
the order name

Last updated

Was this helpful?