CCX Scripting Series – Validating a Script

validate menu

Validating a new script file using the UCCX Script Editor can aid in reducing potential issues during implementation as it will “validate” all script steps have been configured and variable names are correct. It won’t validate your programming logic (for this we’ll need to use Reactive Debug), but it will identify things like typos in Label names, non-existent Labels, and steps that may not be configured.

For example, if you have a Goto step that points to a Label that no longer exists, validation will generate a dangling Goto error.

dangling goto

Another example might be a Play Prompt step that doesn’t have a prompt assigned.  As many of you know the script editor won’t allow you to remove the prompt name assigned to an existing Play Prompt step, however, it is possible to add a Play Prompt step to a script and not assign a prompt to the step.   Doing this will always generation a validation error.

playprompt error

Resolving these issues during validation is made easier by a feature in the script editor that allows you to locate the step causing the error by clicking the validation error in the script editor.  When clicking the error, the script editor will highlight both the error message and the script set causing the error, making it easier to locate and resolve the error.