Skip to main content

Celonis Product Documentation

KM - Variables

Introduction to Variables
Why do they exist?

A Variable allows you to store a value in one place while referencing it in one or more other places within the KM. Variables can be referenced using the ${ } reference operator and use the following format ( ${my_variable_id})(e.g. ${limit_orders}). Variables can also be references inside other variables.

Note

Please consider the difference between runtime variables (${{my-runtime-var}}), KM variables (${my-KM-var}) and Views Variables.

What do they do?

The Variables segment contains KM Variable definitions and associated value assignments. These associated value assignments are the following:

  • Display Name: A human-readable label used in the user interface.

  • ID: A technical identifier used for unique referencing of this Variable.

  • Description: A human-readable description for the Variable.

  • Value: The value you want to give the Variables.

  • Scope: Indicates where in the Package the Variable can be used. If a Variable's scope is disabled then the Variable cannot be accessed and used anywhere in a package.

Any declared KM Variable can be reused in any PQL or Filter definition in the KM.

57542461.png
YAML
Defining Variables

Field name

Description

Required?

Expected value

id

A technical identifier that is used for unique referencing

yes

Alphanumerical, no spaces

displayName

A human-readable label that is used in the user interface

yes

String

description

A human-readable description

String

value

The variable value

yes

Arbitrary

Example

The following example shows a Variable definition that sets up a variable called 'LIMIT_ORDERS' which represents the maximum amount of orders. The Variable can then be referenced by name in any PQL field of the KM using the Variable referencing syntax: ${LIMIT_ORDERS}. This makes maintenance of values easier which would be duplicated otherwise since the Variable can be managed in one single place.

- id: LIMIT_ORDERS
  displayName: Maximum amount of orders
  description: ""
  value: 500