Understanding Scripting

A script is a predefined set of questions or statements that are joined together in a specific order and used to gather information from respondents. When the script is processed, which is known as runtime, a questioner follows the script and records the respondent's answers. Depending on the purpose of the script, the system can use the respondent's answers to score the script.

Before you can create a script, you must define its components in the proper sequence. Script components include:

  • Answer sets

  • Variables

  • Tokens

  • Rate sets

  • Questions

You do not necessarily use all components in every script; you use only the components that support the features that you want to include in the script. For example, you might choose not to use variables and tokens in a script.

After you have created script components, you can create scripts. Scripts can be either branch scripts, which use conditional logic to determine a sequence of questions, or linear scripts, which contain a fixed set of questions in a fixed order.

In a branch script, a script tree shows hierarchical relationships among questions. Questions are parents of answers, which are in turn parents of follow-up questions. Sibling nodes on the tree represent mutually exclusive paths through the script, so the questions that are asked depend on the answers that are provided.

In a linear script, the script tree hierarchy is flat. Questions are parents of answers, but answers have no children. Instead, all questions appear at the same hierarchical level. All questions are asked, and no branching logic is used. This diagram illustrates the difference between a branch script and a linear script:

Example of a linear and branch script

After you create scripts, you can validate them to verify that you have set them up correctly. When you validate a script, the system compares the script against one or more of three predefined rules to determine whether all nodes in the script tree are valid.

After have created a valid script, you can clone the script. You might find this feature useful if you want to create several similar scripts. Using the cloning feature, you can create one script and clone it as many times as necessary. You can then change the cloned scripts so that they contain the information that is specific to that version of the script.

You can also translate scripts into multiple languages. You might find this feature useful if customer service representatives are working with the same issues in different countries. Using the translation feature, you can create one script and translate it into multiple languages, rather than creating multiple scripts to support each necessary language.

After you have created valid scripts, you can use them to solve work order or case-related issues. You can access scripts directly from work order and case entry forms, or by using Solution Advisor. When you find scripts that pertain to the issue that you are trying to resolve, you can attach an instance of each relevant script to the work order or case. When you attach a script instance to a work order or a case, you can run the script immediately; save the script to run in the future; or run a portion of the script, save the answers that are received from the respondent, and complete the script at a later time.