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:
A name that identifies and labels the data.
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
In this example, the customer is the data name. It is assigned the singular value "John Smith":
the customer is "John Smith"Here, the items is the plural data name. It is assigned the plural value of the documents.
the items are the documentsIn this example, the fruits is the plural data name. It is assigned a list (plural) of fruit values:
the fruits are the apple, the banana, the orangeMake sure singular names pair with singular values, and plural names pair with plural values! For example, you wouldn’t write “the fruits is the orange”. Instead, you would write: “the fruits are the oranges”.
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:
the emailthe phone numberthe primary username2. 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
the messageDescriptive Name
the very special user greeting messageData 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:
the age is 21the bank balance is $120.20the interest rates are 5.67, 6.252. 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:
the message is "Welcome to Kognitos!"the username is "i-like-to-automate-123"the announcement is "We're so glad you're here. Let's build something great together."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:
the due date is "2024-11-05"the project start date is "January 1, 2024"the birthday is "March 22, 1990"4. Lists
To define a list, separate the values by commas. For example:
the test scores are 95, 86, 100, 77, 65 and 99the coupon codes are "SAVE20", "SALE2024", "HAPPYHOUR" and "JUST4U"the email addresses are "[email protected]", "[email protected]" and "[email protected]"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:
the username is the customer emailthe documents are the receipts the approver is the managerNote: You can only reference another data element if it has been defined earlier in the automation.
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 aboveExamples
In this example, the backup email is assigned the value
[email protected].
the customer email is "[email protected]"
the backup email is the aboveHere, the invoice total is assigned the value
150.
the order total is 150
the invoice total is the aboveIn this example, the file is assigned a copy of the above file in the automation.
the file is the aboveReassigning 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
Updating a referenced data element can overwrite previous data — see Example 2 for more details.
Examples
In this example, the registration date is reassigned the value
11-05-2024.
use "11-05-2024" as the registration dateIn 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 nameIf 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 nameLast updated
Was this helpful?
