Siebel SmartScript Administration Guide > Working with Questions, Answers, and Translations >

Storing User-Provided Answers From Sessions

Answers provided by a user during a SmartScript session can be saved for reuse in the application or for analysis.

Saving to the Script Sessions Table

You have the option of saving header information about each script session and also specific questions and answers for the session. To do so, you must set the Script Save Sessions parameter and check the Question Save Answer Table flag for any question that should be logged as part of the Script Sessions information. This is useful when you do not require the answers to be saved to records and other business components for the rest of the application, but still want to save the answers provided during the script.

NOTE:  The Save Session setting and Save Answer flag may not be used independently of each other. They are designed to work together to save answers to the Sessions Tables. They are also independent of Save Buscomp, Save Field, and Save BusObject.

The Call Script Runs and Call Script Run Answers components are based on the Script Sessions table and the Answers table, respectively. You can use these business components to store answers provided by the user during a Smart Script. They allow you to control whether a session is created at all and which questions will have their answers saved in the answers table. The Call Script Runs business component saves the script name, as well as date and time started and the employee name if the script is run from an employee application, or the contact name if the script is run from a customer application. In addition, the duration of the script is automatically saved as is the language in which the script was run. There is a one-to-many relationship between the Call Script Runs table and the Call Script Run Answers table. The answers table simply stores question and answer pairs. In other words, you may expect to get a single session record and multiple answer records associated with that sessions record for every script run.

Saving to a Business Component

Answers provided during the course a SmartScript session can be used to update existing records or create new records in any Siebel business component. You can specify the location to which SmartScript will save answer data by completing three fields in the Question Administration form: Save Business Object, Save Bus Comp, and Save Field.

SmartScripts can automatically create a new record in a business component and save the answers to fields in that business component using the Save Business Object, Save Bus Comp, and Save Field settings. Fields which are mapped from picklists should use pick applets. SmartScripts can be set to either update an existing record or create a new one, and the key logic occurs when a question is found which has the Save Bus Comp and Save Field defined. If there is already an active record set in that business component, then the SmartScript will assume that this is the record which should be updated. If there is not yet an active record in that business component, then a new record will be created and the answers saved to that record. The record commit in both cases occurs when the Finish button is selected.

If a pick applet is not used, then the answer provided for the question that is mapped to that Save Field will be saved to that field for the active record. If a pick applet is used, then it will behave the same way as if the pick applet is used in a standard Siebel view.

NOTE:  Business component records are saved in the Siebel database only after the successful completion of a SmartScript. If the SmartScript fails or is canceled, the answers will not be committed to the business component.

Setting Up a Save Field for a Multi-Value Field

If the save field for an answer already has a picklist or multi-value field associated with it in the business component definition, you need not create new answers. However, you must specify the appropriate save field in the definition of your question.

For example, an employee wants to save a caller's address in the Street Address business component of the Accounts business object. If the Street Address business component were not part of the Accounts business object, you would first have to add it, or arrange to have it added, using Siebel Tools, to make it available. When setting up the question, you would enter Accounts in the Save BusObj field and Street Address (or any of the Address Multi Value Fields) in the Save Buscomp field.

To set up a save field for a multi-value field

  1. Use Siebel Tools to make sure that the business component with the multi-value field you want to use is listed as a business object component for the parent business object.
  2. If the business component you want to use is not listed, add the multi-value field as a business object component to the business object to which you want to save the data.
  3. In the SmartScript Question Administration screen, click the Question Administration menu, and select New Record.
  4. In the Save BusObj field, pick the parent business object from the picklist.
  5. In the Save BusComp field, pick the business component with which the multi-value field is associated.
  6. In the Save Field field, pick the multi-value field into which the data should be saved from the picklist.
Siebel SmartScript Administration Guide