LogoLogo
About
  • Home
  • Guides
  • BDK
  • REST API
  • Release Notes
  • Getting Started
    • What is Kognitos?
    • Logging In
    • Account Setup
    • Quick Start Guide
    • Core Concepts
  • Writing Automations
    • Automation Basics
      • Defining Data
      • Comments
      • Conditionals
      • Keywords
      • Loops
    • Calling Other Processes
      • Calling A Subprocess
      • Invoking a Subprocess
      • Starting Parallel Runs
    • Validating Data
    • Context Based Learning
    • Using the Debugger
  • Books
  • Automation Management
    • Scheduled Processes
    • Email Triggers
  • Enterprise Dashboard
  • Exception Handling
    • Providing Guidance
    • Resolving Common Exceptions
    • Learnings
  • Account Management
    • API Keys
    • User Roles & Permissions
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Writing Automations
  2. Automation Basics

Conditionals

Learn how to write conditional statements in Kognitos.

Kognitos allows your automation to make decisions based on logic. The keywords if, then, and else help control your automation's behavior in different scenarios, enabling dynamic workflows.

if / then Syntax

The basic syntax for a conditional decision is:

if {condition} then
  {do an action}

Example

if the number of team members < 10 then
  send "Let's have lunch outside!" to the team members

if / then / else Syntax

To add more flexibility, you can use an else statement to specify an alternative action when the condition is not met:

if {condition} then
  {do an action}
else
  {do a different action}

Example

if the number of team members < 10 then
  send "Let's have lunch outside!" to the team members
else
  send "Meet you in the cafeteria!"

Nested if / then / else statements

You can nest if / then / else statements to add more layers of logic for more complex conditions:

if the partner is "partner a" then
  use 0.1 as the rate
else
  if the partner is "partner b" then
    use 0.2 as the rate
  else
    use 0.4 as the rate

Don't Forget to Indent!

Proper indentation is crucial when writing if / then / else statements, especially when nesting them. It ensures the automation logic is clear, easy to follow, and runs as expected.

Last updated 1 month ago

Was this helpful?