Basic script variables

Basic script variables are essential building blocks in Genesys Cloud scripts. Genesys Cloud offers two main types of basic variables in scripts: Built-in and Custom.

Built-in variables

Built-in variables are ready-to-use variables provided by Genesys Cloud. They automatically track system data, such as agent names, queue names, and call durations. For more information, see Built-in script variables.

  • You can’t modify built-in variables.
  • You can view the full list of available built-in variables in the Variables tab within the script editor. For more information. see Script editor overview.
  • The availability of built-in variables depends on the features that you’ve enabled in your script settings. For more information. see Manage script properties.

Custom variables

Custom variables let you define and store information that’s specific to your script’s purpose. For example, you could create a variable to track a customer’s account number, a selected product, or whether they’ve accepted terms and conditions.

There are three core data types that you can choose from when creating custom variables:

  • String – Use for text or numbers, such as names, IDs, or short messages. 
  • Number – Best for storing whole numbers.
  • True/False – A Boolean variable that can be either true or false.
Note: Once you define a variable’s type, it can’t be changed later.