Skip to main content

Celonis Product Documentation

Knowledge Model - Variables

A Variable allows you to store a value in one place while referencing it in one or more other places within the Knowledge Model. 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.

There is a difference between runtime variables (${{my-runtime-var}}), Knowledge Model variables (${my-KM-var}) and Views variables.

What do they do?

The Variables segment contains Knowledge Model 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 Knowledge Model Variable can be reused in any PQL or Filter definition in the Knowledge Model.

57542461.png
Defining Variables with YAML

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 Knowledge Model 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