4Working with Questions, Answers and Translations

Working with Questions, Answers, and Translations

This chapter explains how to create questions and answers in the Questions view of the Administration - SmartScript screen. It includes the following topics:

About Creating Questions

The question is the basic element of a SmartScript and is created first when you build a new SmartScript. You create questions in the Questions view of the Administration - SmartScript screen. Questions are stored separately from the SmartScript itself, and can be used more than once in a SmartScript as well as in multiple SmartScripts.

Questions can serve various functions in your SmartScripts such as:

  • Eliciting information. A call center agent can ask questions to elicit sales or service information from a customer. Over the Web, questions can be presented to a customer as a survey or a series of questions to isolate a problem. The answers given can then be stored for later use.

  • Providing information. A question can provide text for an agent to read to a customer, or a customer can read it on a Web site. Examples of this type of question are policy statements, legal disclaimers, and product descriptions. These types of questions do not have answers.

  • Guiding a process or question flow. A single question can determine which path the SmartScript is to follow. On the Web, a customer’s answer to a single question dictates the use of one form or another, or one part of a form rather than another. The answer to a call center agent’s question can lead that agent to a different series of questions.

Many of the fields in the More Info form of the Questions view in the Administration - SmartScript screen are related to storage of answer data (also known as question control data). The Answer Type and Must Answer fields are obvious examples. The fields labeled Save Business Object, Save Bus Comp, and Save Field all serve to define the location for answer data given in response to a question. The fields labeled Width, Height, Min Length and Max Length all refer to the user interface space provided for answers.

For more information about creating questions, see the following topics:

    Creating Questions

    This topic describes how to create a question.

    To create a question

    1. Navigate to Administration - SmartScript screen > Questions view.

    2. Create a new record, and enter the question’s attributes in the More Info form.

      The following table describes the attributes a question can have.

      Question Setting Description

      Name

      The question’s name is a label that identifies the subject of the question. When you build a page, you select each question by name.

      Answer Type

      Data type for the answer to this question:

      • String—Alphanumeric characters

      • Integer—Whole number only

      • Number—Numerals only

      • Currency—Numerals only

        Uses currency code and exchange date for currency conversion

      • Boolean—Yes or No answer; usually displayed as a check box

      • Date—Date only

      • Date & Time—Date and time

      • Time—Time only

      Answer Control

      The type of answer control you want to use:

      • Check box—Single-select (Boolean) and multiselect check boxes

      • Default

      The default answer control used depends on the associated answer type.

      • Dropdown—Displays the list of answer selections

      • None—No answer control; question text only

      • Radio Button– Single select list of items displayed as radio buttons

      Pick Only

      Indicates that the answer must be chosen from the list of answers attached to the question.

      Min Length and Max Length

      Used with Date, Integer, Number, Date & Time, and Time answer types to constrain the values that can be entered.

      These fields can also be used with String answer types to indicate the minimum and maximum number of characters (bytes) allowed in the string.

      Note the following:

      • The minimum restriction you specify for Min Length triggers only when you try to edit the question value irrespective of whether you are creating a new record or updating an existing one.

      • In Asian (double-byte) languages, each character requires two bytes. Therefore, the minimum or maximum string length the user is allowed to enter in an Asian language is one-half of the number entered in these fields.

      Auto Sub Parm

      Specifies a list of parameters that can be used to automatically substitute values into the question text. In the question text, if brackets ([ ]) appear around a word, the word is interpreted as a substitution parameter. This parameter might be a user parameter set in the SmartScript, a business component field, or a parameter pulled from an application, such as a CTI parameter. Any question text in brackets that is listed in the auto substitute parameters field is converted to the current value for that parameter.

      Note: The [BC.Field Name] works only if the SmartScript is positioned on the relevant Business Component. If the user has positioned on a business component by scripting behind the SmartScript, no data is retrieved. Example: [User.Last Name], [User.First Name], [Contact.Phone Number]

      Must Answer

      Indicates whether this question is optional, always required, or required only if it is reached:

      • Required only if reached—Means that if a user goes down a branch in the SmartScript where a question is displayed, the question must be answered before the user can proceed in the SmartScript.

      • Always required—Is the strictest answer setting, because the user cannot finish the SmartScript unless the designated questions are answered.

      Default Answer

      The default answer displayed for the question. This is one of the answers defined for the question. If the answer must be selected from a pick applet, then the default answer is not displayed.

      Width

      The width, in pixels, of the text box provided for answers.

      Height

      The height, in pixels, of the text box provided for answers.

      Search Spec

      Applies the entered search specification to make a specific record active in a business component. Search Spec can be used for many purposes. For example, a search spec can be used along with user parameters to search, for instance, in a particular business component for a record with some field value equal to an answer in a previous question (assuming the answer to the previous question had been saved to a user parameter). A search spec can also be used with Auto Substitute Parameters to insert field values into the text of a SmartScript question. Search Spec syntaxes are the same as those used in Siebel Tools. For more information on setting up Search specifications see Siebel Search Administration Guide. For more information on Siebel Tools, see Using Siebel Tools.

      Save Business Object

      The business object in which the answer to the question is stored.

      Save Bus Comp

      The business component in which the answer to the question is stored.

      Note that to save a question’s answer to a business component field, the business object, the business component, and the field name must be specified for the question. For more information, see Displaying Answers Within a SmartScript.

      Save Field

      The field in the business object or business component table that is to contain the answer data, or that is used to identify the specific record that contains the answer data.

      Note that special steps might be required to set up a save field. For more information, see Displaying Answers Within a SmartScript.

      Save User Parameters

      Specifies a field in a business component as a user parameter. The record that is set as active in that business component supplies the value. (Note that a Search Spec can set the record as active.) The result is that the field value from the active record is saved to the parameter.

      One common usage is to insert the answer to one question into the text of a subsequent question. An answer can be comprised of a field value or values picked from a business component. The field variable can then be inserted into the text of another question using the Auto Substitute Parameters field. The result is that the variable value is inserted into the question text.

      If any user property variables are entered in the Save User Parameter field, then the answer values or any field from any business component record or both can be saved to this variable. For example, you can select a particular record in the question (such as a contact) and then save that record's ZIP Code to the user parameter, even though the selected answer was the last name, not the ZIP Code.

      If the answer includes multiple values from a picklist, then each of the fields accepted from the selected record in the picklist can be saved to multiple user parameters by separating the properties by commas.

      Syntax: If you want to save the answer to a question to a user parameter, enter the name of the user parameter. It is also possible to save the value of a field in the current record, such as (User Parameter Name, [BC.FieldName].

      To save multiple fields, separate the user variables with a comma (,). For example, enter (User Parameter Name,[BC.field name]), (User Parameter Name2,[BC.field name]), (User Parameter Name3,[BC.field name])

      Save Currency Field

      The field in the business object or business component table that contains the currency setting.

      Pick Applet

      Indicates the pick applet that the end user uses to select and save the business component record data as the answer data. When the end user clicks a select button, the pick applet opens as a dialog box, or as a drop-down combo-box. The end user can save a row of data to the specified business component. The Save Field in the business component must have a mapping to the picklist.

      For more information, see Displaying Answers Within a SmartScript.

      Mvg Applet

      Indicates the multi-value group (MVG) applet to be used to save answer data to the specified business component when that data includes multi-value fields. The MVG applet must be mapped to the specified Save Field. For example, to save Project Team data, you might select the Project Team list applet. For more information, see Displaying Answers Within a SmartScript.

      Detail Applet

      Indicates the Detail applet that is used to save answer data of a specific configuration and format to the specified business component. The Detail applet must be mapped to the specified Save Field. For more information, see Displaying Answers Within a SmartScript.

      Save Answer Table

      Indicates whether the answer is to be saved to the generic answer table.

      Currency

      The currency code used to identify the saved currency data, if such data is saved.

      Replication Level

      Indicates different levels of replication for Siebel Remote: All, Regional, and None. The default state is All.

      Displaying Answers Within a SmartScript

      You can define each question in a SmartScript to contain answer controls or be informational in nature. Informational questions do not require answer controls; they usually provide instructions, information, or dialog to the user. You use answer controls when you want the user to provide responses to questions. individual SmartScript entries and answers; questions

      If you want to limit the possible answers that a user might select from, you have the option of defining these answer options within the SmartScript definition as Question Answers, or reusing an existing Pick applet or MVG applet already defined in Siebel Tools.

      Note: SmartScripts do not support the use of association applets.

      In the simplest case, users select answers to a question from a drop-down list of answers that you define specifically for that question, using the Answer subview of the Questions view in the Administration - SmartScript screen. These drop-down lists of answers are defined with respect to a unique question and are an extension of the question definition.

      To use a drop-down list, select the Pick Only check box in the Questions view.

      Note: By default, the Pick Only column does not appear. You must display it.

      To use single or multiselect pick applets, or detail applets, do not select Pick Only.

      To use radio buttons or multiselect check boxes, your answers must be set up as part of the SmartScript definition.

      The following sections list Question Answer options.

        Information Text

        A question can be set up simply to display as informational or instructional text without any solicitation of a user answer to the question. This is useful for providing guidance to a user to answer subsequent questions or to display dynamically provided text using Text Substitution.

          Text Box

          A simple input control for users is a text box, where the user does not have the option of selecting from a fixed list of answer options, but instead types free text.

            Drop-Down Lists

            If the answers to a question are simple, single-value answers, then you can create a simple drop-down list by defining each answer option in the Answers form in the SmartScript definition. You define a unique domain of answers for the question. Fields that are based on LOVs also display the LOV values in a drop-down list, based on the save field value.

              Radio Buttons

              You can display your answer choices as radio buttons in employee or customer applications. Radio buttons are similar to drop-down lists, because the user can choose only a single selection from a fixed list of answer options.

                Multiselect Check Boxes

                You can define answer options for a question, then have these options display as multiselect check boxes. You must include your answers as part of your SmartScript definition, then choose Check Box for your answer control in order to have your answer options display with check boxes. If you select Boolean for your answer type, only one check box appears.

                  Pick Applets

                  Any question can employ a Pick applet for users to select answers to that question. For a question to use a Pick applet or MVG applet, you must set the question to save the selected record to the appropriate field in the business component. To do this, you enter values for the following parameters:

                  • Save Business Object

                  • Save Bus Comp

                  • Save Field

                  You cannot define branching for answers selected from Pick applets. You must configure a Pick applet or MVG applet in Siebel Tools to save to the Save Field in the entered business component.

                  Note: The listed applets that appear in each dialog box are not necessarily all valid. Valid applets must include a field that maps to the Save Field in the Save Bus Comp. Selecting an appropriate applet requires some familiarity with Siebel Tools and the business components that SmartScript must be linked to. For more information on working with applets, see Using Siebel Tools.

                    Detail Applets

                    Some applets have a detail applet defined for a control or list column. These are specialized applets that operate on that control or list column in a specific way. Usually these are pop-up applets that allow end users to enter data that is configured or formatted for a specific purpose.

                    The detail applets that are most commonly used are the Currency Popup applet and the File Popup applet (SmartScript). If you use the Currency Popup applet, the agent sees an icon next to the question’s input box at run time. Clicking this icon causes the applet to pop up, allowing the agent to specify the currency when entering an amount. Without this detail applet, a calculator appears, and the currency cannot be changed from one answer to the next. For a File Popup applet (SmartScript), the user can add a file to the record.

                    Note: Branching from a question can only be defined for answers that are defined as part of the SmartScript definition and not those selected from pick applets, or based on the list of values. If a user selects multiple responses to a question that uses multiselect check boxes, the default branch is used.

                      Answer Types and Answer Control Choices

                      The following table describes Answer Types and the Answer Control choices you have for each type.

                      Table Answer Types and Answer Control Choices

                      For This Answer Type... Choose from One of These Answer Controls
                      Check box Default Drop-Down None Radio Button

                      String

                      Check box (if answer exists)

                      Drop-down (if Pick Only is selected and answers exist)

                      Text Box (if Pick Only is not selected)

                      Pick/MVG/Detail Applet (if they are defined for the question)

                      Drop-down (if answers exist)

                      Question text only

                      Radio Button (if answers exist)

                      Integer

                      Box with icon for number applet

                      Box with icon for number applet

                      Box with icon for number applet

                      Question text only

                      Box with icon for number applet

                      Number

                      Box with icon for number applet

                      Box with icon for number applet

                      Box with icon for number applet

                      Question text only

                      Box with icon for number applet

                      Currency

                      Box with icon for number-currency applet

                      Box with icon for number-currency applet

                      Box with icon for number-currency applet

                      Question text only

                      Box with icon for number-currency applet

                      Boolean

                      Single select check box

                      Single select check box

                      Single select check box

                      Question text only

                      Single select check box

                      Date

                      Box with icon for Date applet

                      Box with icon for Date applet

                      Box with icon for Date applet

                      Question text only

                      Box with icon for Date applet

                      Date-Time

                      Box with icon for Date-Time applet

                      Box with icon for Date-Time applet

                      Box with icon for Date-Time applet

                      Question text only

                      Box with icon for Date-Time applet

                      Time

                      Box with icon for Time applet

                      Box with icon for Time applet

                      Box with icon for Time applet

                      Question text only

                      Box with icon for Time applet

                      Creating Answers

                      You define answers to questions in the Answers subview of the Questions view in the Administration - SmartScript screen. You do not need to define answers if one or both of the following apply:

                      • Question presented is information for the end user

                      • Answer options come from a business component

                      If the answer consists of words, you first define the answer in the base language. If you are required to provide a translation, you can then provide Answer Translations text in the required languages, as needed for each answer. Answer translations are optional. However, if you provide one translated answer within a SmartScript, you must translate every subsequent answer.

                      If an answer consists of numeric values (for example, where Answer Type is integer, number, or currency) do not translate the values, as long as the unit of measure is understandable to users who speak the target language. For information on creating and translating answers see Fundamentals of Creating SmartScripts.

                      To create an answer

                      1. Navigate to Administration - SmartScript screen > Questions view.

                      2. Select the question for which you want to define answers.

                        If Pick Only is selected for the question, it can have more than one answer. You must specify all valid answers.

                      3. Navigate to the Answers subview, and create a new record.

                      4. Complete the fields as described in the following table.

                        Answer Form Field Entry

                        Number

                        Provide a number to determine the display order for this answer under this question. Lower-numbered answers are displayed first. Recommendation: Assign numbers that are multiples of ten (10, 20, 30...) to allow space for later additions and changes.

                        Value

                        Define a name for this answer that is unique within the context of the question.

                        Currency

                        (Optional) If the answer includes monetary amounts, click the select button to open the Pick Currency Code dialog box. Select the currency information appropriate for the country or region, and click OK. The appropriate symbol for the currency appears with this answer.

                        The new answer definition appears in the Answers subview.

                      5. Repeat Step 3 and Step 4 to add another answer.

                        Translating Answers describes how to add translate answers.

                        Translating Answers

                        When the Answer Type for a question is String, and the Pick Only check box is selected, you might have to translate the answers so that they are displayed in the same language as the corresponding question translation.

                        Note: You do not require answer translations if you deploy the SmartScript in one language. If a SmartScript does not use translations, the language-independent answer value will be used for all translations. However, if you translate answers within your SmartScript, you must translate every question with answers into all the languages into which the SmartScript is translated.

                        To create a translation for an answer

                        1. Navigate to Administration - SmartScript screen > Questions view > Answers subview.

                        2. Select the answer you want to translate.

                        3. Navigate to the Answer Translations list, and create a new record.

                        4. Complete the necessary fields.

                        5. Repeat Step 1 to Step 4 for each additional language in which the answer must display.

                          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.

                                  Question Events Logic Sequence

                                  The following illustrates the logical order and structure of how Siebel SmartScript uses VB code and search specs, creates new records, and does text substitution. The following table provides a description of each label in the following figure.

                                  For more information on using Siebel VB or eScript to extend the SmartScripts, see Extending Scripts with Siebel VB and Siebel eScript.

                                  Logical Sequence of Question Events
                                  Note: Each business component can have only one active record for a single user session, but there may be many active records in multiple business components for a single user session.

                                  Table Description of Labels in the Previous Figure

                                  Label Description

                                  1

                                  Question_Enter

                                  2

                                  Checks if a search spec exists for the question?

                                  If yes, Siebel SmartScript proceeds to step 2.a.i. If not, Siebel SmartScript proceeds to step 2.b.

                                  2.a.i

                                  Checks if the Save Bus Comp field contains a value.

                                  2.a.ii

                                  Checks if the business component specified in the Save Bus Comp field contains an active value?

                                  2.a.iii

                                  Creates a new record in the business component and makes it active.

                                  2.b

                                  Executes search on business component in the Save Bus Comp field.

                                  This locates a record ID that becomes active in the business component.

                                  3

                                  Performs text substitution on the question text before it displays. Any parameters in the Auto Sub Parm field that also appear in the question text convert to the values specified by the parameters.

                                  4

                                  After a user answers a question, if the Save Bus Comp field has a value, the active record saves the user’s answer.

                                  5

                                  If the Save User Parameter field references a parameter, the answer is saved to that parameter.

                                  6

                                  All question leave events execute. For example, Question_Preleave, Question_Prebranch, and so on.