Defining Data
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 documents
- In 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 orange
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 email
the phone number
the primary username
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
the message
Descriptive Name
the very special user greeting message
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:
the age is 21
the bank balance is $120.20
the interest rates are 5.67, 6.25
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:
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 99
the coupon codes are "SAVE20", "SALE2024", "HAPPYHOUR" and "JUST4U"
the email addresses are "john@gmail.com", "johnny@yahoo.com" and "johnsmith@aol.com"
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 email
the documents are the receipts
the approver is the manager
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
- In this example, the backup email is assigned the value
john@example.com.
the customer email is "john@example.com"
the backup email is the above
- Here, the invoice total is assigned the value
150.
the order total is 150
the invoice total is the above
- 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>
Examples
- In this example, the registration date is reassigned the value
11-05-2024.
use "11-05-2024" as the registration date
- 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
