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 can save header information about each SmartScript session and also specific questions and answers for the session. To do so, you must select the Save Session check box in the Scripts view of the Administration - SmartScript screen, and select the Save Answer Table check box for any question that you want to log as part of the Script Sessions information.

NOTE:  You select the Save Answer Table check box in the Scripts view of the Administration - SmartScript screen.

This is useful when you do not want 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 SmartScript execution.

NOTE:  You cannot use the Save Session and Save Answer Table independently of each other. They are designed to work together to save answers to the Sessions Tables. They are also independent of Save Business Object, Save Bus Comp, and Save Field.

The Call Script Runs and Call Script Run Answers business components are based on the Script Sessions table and the Answers table, respectively.

You can use the business components to store answers provided by the user during a SmartScript session. They allow you control whether a session is created and which questions have their answers saved in the answers table.

The Call Script Runs business component saves the following values:

  • SmartScript name
  • Date and time the SmartScript started
  • Employee name if the SmartScript executes from an employee application
  • Contact name if the SmartScript is run from a customer application

In addition, the duration of the SmartScript execution is automatically saved as well as the language in which the SmartScript 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 might get a single session record and multiple answer records associated with that session's record for every Siebel SmartScript run.

Saving to a Business Component

You can use the answers provided during a SmartScript session to update the existing records or create new records in any business component. You can specify the location to which Siebel SmartScript saves the answer data by completing the following fields in the More Info form of the Questions view in the Administration - SmartScript screen:

  • Save Business Object
  • Save Bus Comp
  • Save Field

Fields that are mapped from drop-down lists must use pick applets. You can set the SmartScripts to either update an existing record or create a new one. The key logic occurs when a question is found that has a value specified in the Save Bus Comp and Save Field fields. If an active record is already set in that business component, then Siebel SmartScript determines that this is the record that you want to update. If an active record is not yet set in that business component, then a new record is created and the answers are 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 is saved to that field for the active record. If a pick applet is used, then it behaves 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 are not 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, do 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 Business Address business component of the Accounts business object. If the Business Address business component is not part of the Accounts business object, first add it, using Siebel Tools, to make it available. When setting up the question, enter Accounts in the Save Business Object field and Business Address (or any of the Address Multi Value Fields) in the Save Bus Comp 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. Navigate to the Questions view of the Administration - SmartScript screen, and create a new record.
  4. In the Save Business Object field, pick the parent business object from the picklist.
  5. In the Save Bus Comp field, pick the business component with which the multi-value field is associated.
  6. In the Save Field field, select the multi-value field that you want to save the data from the picklist.
Siebel SmartScript Administration Guide Copyright © 2014, Oracle and/or its affiliates. All rights reserved. Legal Notices.