Product Administration Guide > Customizable Product Scripts >

About Scripts

A script is a Siebel Visual Basic or Siebel eScript program that runs when a predefined event to which it is assigned occurs during a configuration session. These events occur at specific points when opening or closing a session or processing a user request. You can also place scripts in a declarations area for use by other event-based scripts.

A script can refer to any product that has been added from the product table to a customizable product. These are called component products. Scripts can also be used to set attribute values of component products and of the customizable product. Scripts cannot be used to refer to relationships or links.

Scripts have full access to the Siebel API. You can use scripts to call Siebel business components and to provide information to back-end databases through Siebel business services. For a description of basic API methods, see eConfigurator API.

In addition, several special eConfigurator methods are described in this chapter. These can be included in scripts and allow you to obtain information about the current solution. You can also use them to submit requests to the eConfigurator engine. For example, you can write a script and insert it into an event that is called each time an item quantity changes in the current solution. When the user selects or removes an item, this event is called and your script runs. The script can use eConfigurator methods to determine the amount of the item or of other items in the current solution and can submit a request to the eConfigurator engine to modify item amounts. The script could also perform special computations or update an external application based on information obtained from the eConfigurator methods.

The items and rules that comprise the customizable product are called the declarative portion. The declarative portion cannot be modified by scripts. For example, you cannot add or delete rules from a customizable product using scripts.

Scripts are intended to add additional behaviors or features and can be used in several ways:

  • Arithmetic functions. You can use scripting to perform more complex mathematical operations that cannot feasibly be created using configuration rules. For example, if you are configuring a solution for a chemical manufacturing process, you can use calculations based on viscosity, average ambient temperature, and desired throughput to arrive at the correct configuration of pumps and other equipment.
  • External program calls. You can use scripts to make calls to external programs. For example, you can pass information about the current session to external programs.
  • Accessing Siebel objects. You can use all the standard features of Siebel VB and and Siebel eScript, including reading and editing Siebel databases and calling Buscomps, BusObjects, and other Siebel objects.
Product Administration Guide