Siebel SmartScript Administration Guide > Extending Scripts with Siebel VB and Siebel eScript >

About Siebel VB and Siebel eScript


You can use Siebel VB and Siebel eScript (a scripting language like JavaScript) with all SmartScript elements. This topic describes the Siebel VB and Siebel eScript events that are specific to SmartScripts. The syntax for all of these events is the same in both Siebel VB and Siebel eScript. Most of the examples in this chapter are in Siebel VB. However, the events work the same way in Siebel eScript. For more information about Siebel VB and Siebel eScript, see the following guides:

  • Siebel Object Interfaces Reference
  • Siebel VB Language Reference
  • Siebel eScript Language Reference

NOTE:  Siebel eScript functions work in the same way as the standard JavaScript functions. They require the trailing parentheses ( ) even when the function does not have any parameters.

Any function that can be performed using Siebel VB or Siebel eScript can be performed in the context of a SmartScript or a call script. In addition, SmartScripts are automatically configured with Siebel VB and eScript events, which can be added to a question or script using the SmartScript Script Programs view and Question programs view. In addition, administrators can create their own custom procedures from these views. Table 7 lists the standard Siebel VB and Siebel eScript events that are used in SmartScript events.

Table 7. Standard Siebel VB and Siebel eScript Events Used in SmartScripts
Name
Role

Script_Open

A postevent function called when the script is opened.

Script_Cancel

A postevent function called when the script is canceled.

Script_PreFinish

A preevent function called when the user clicks the Finish button.

Script_Finish

A postevent function called after the script has been finished, but before data is saved to allow a last-minute cleanup or postprocessing.

Script_Save

An event function called before the normal script state has been saved to the business components and the answer table, and after the Script_Finish function has run.

Each question element is configured with four events. Other elements do not have Siebel VB or Siebel eScript events associated with them. These events can contain methods that can be used to further control the workflow of a script. Table 8 lists the standard Siebel VB and Siebel eScript events that are used in SmartScript Questions.

Table 8. Standard Siebel VB and Siebel eScript Events Used in SmartScript Questions
Name
Role

Question_Enter

A postevent function called after the question has been entered and all pre-question processing is complete.

Question_PreLeave

A preevent function called on the question before the user leaves it by jumping or proceeding (but not by Undo or Backup).

Question_Leave

A postevent function called after branching has been determined and all built-in validations have been performed.

Question_PreBranch

A preevent function that allows the choice of answer to be replaced by the Siebel VB or Siebel eScript script.

Siebel SmartScript Administration Guide Copyright © 2013, Oracle and/or its affiliates. All rights reserved. Legal Notices.