Smart Script
Smart Script
ADMINISTRATION GUIDE
VERSION 7.5.3
12-FRKILG
JUNE 2003
Siebel Systems, Inc., 2207 Bridgepointe Parkway, San Mateo, CA 94404
Copyright © 2003 Siebel Systems, Inc.
All rights reserved.
Printed in the United States of America
No part of this publication may be stored in a retrieval system, transmitted, or reproduced in any way, including
but not limited to photocopy, photographic, magnetic, or other record, without the prior agreement and written
permission of Siebel Systems, Inc.
Siebel, the Siebel logo, TrickleSync, TSQ, Universal Agent, and other Siebel product names referenced herein
are trademarks of Siebel Systems, Inc., and may be registered in certain jurisdictions.
Other product names, designations, logos, and symbols may be trademarks or registered trademarks of their
respective owners.
U.S. GOVERNMENT RESTRICTED RIGHTS. Programs, Ancillary Programs and Documentation, delivered
subject to the Department of Defense Federal Acquisition Regulation Supplement, are “commercial computer
software” as set forth in DFARS 227.7202, Commercial Computer Software and Commercial Computer Software
Documentation, and as such, any use, duplication and disclosure of the Programs, Ancillary Programs and
Documentation shall be subject to the restrictions contained in the applicable Siebel license agreement. All
other use, duplication and disclosure of the Programs, Ancillary Programs and Documentation by the U.S.
Government shall be subject to the applicable Siebel license agreement and the restrictions contained in
subsection (c) of FAR 52.227-19, Commercial Computer Software - Restricted Rights (June 1987), or
FAR 52.227-14, Rights in Data—General, including Alternate III (June 1987), as applicable. Contractor/licensor
is Siebel Systems, Inc., 2207 Bridgepointe Parkway, San Mateo, CA 94404.
Proprietary Information
Siebel Systems, Inc. considers information included in this documentation and
in Siebel eBusiness Applications Online Help to be Confidential Information.
Your access to and use of this Confidential Information are subject to the terms
and conditions of: (1) the applicable Siebel Systems software license
agreement, which has been executed and with which you agree to comply; and
(2) the proprietary and restricted rights notices included in this documentation.
Contents
Introduction
How This Guide Is Organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Chapter 1. Overview
Benefits of SmartScripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Scripting Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
SmartScript Screens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
The Employee’s Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
The Customer Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
The SmartScript Administration Screens . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Creating Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Translating Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Creating Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Translating Answers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Creating Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Translating Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Creating Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Translating Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
About the Script Designer and Page Designer . . . . . . . . . . . . . . . . . . . . 38
Adding Questions and Branches to Pages . . . . . . . . . . . . . . . . . . . . . . . . . . 39
Adding Pages and Branches to Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Releasing Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Unreleasing Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
GetHelpText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
GetLabelText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
GetQuestion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
StartQuestion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
Methods Used with Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Standard SmartScript Question Procedure . . . . . . . . . . . . . . . . . . . . . . .121
Question_Enter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Question_PreLeave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Question_PreBranch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Question_Leave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Other Preprogrammed SmartScript Question Methods . . . . . . . . . . . . . 124
AnswerType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
CurrencyFieldName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
GetCurrentCurrencyCode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
GetCurrentExchangeDate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
GetCurrentValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
GetHelpText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
GetInitialCurrencyCode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
GetInitialExchangeDate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
GetInitialValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
GetPriorCurrencyCode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
GetPriorExchangeDate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
GetPriorValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
GetQuestionEnable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
GetQuestionText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
GetSaveBusComp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
GetSaveBusObj . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
HasDefaultAnswer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
MustAnswer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
OriginalQuestionText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
SaveBusCompName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
SaveBusObjName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
SaveFieldName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
SetCurrentValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
SetQuestionEnable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
SetQuestionText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
SubstituteText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
WasAnswered . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
Sample Siebel VB and Siebel eScript Methods . . . . . . . . . . . . . . . . . . . . 140
Dynamic Questions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Finding a Contact . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
Complex Branching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143
Calling Siebel Assignment Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
Index
This guide provides an overview of Siebel SmartScript and its use from an employee
perspective. The primary focus of this guide is to provide configuration and
administration instructions to allow you to set up Siebel SmartScript on your Siebel
application.
Although job titles and duties at your company may differ from those listed in the
following table, the audience for this guide consists primarily of employees in these
categories:
Call Center Persons responsible for setting up and maintaining a call center.
Administrators Duties include designing and managing Computer Telephony
Integration (CTI), SmartScripts, and message broadcasts.
Database Persons who administer the database system, including data
Administrators loading, system monitoring, backup and recovery, space
allocation and sizing, and user account management.
Marketing Persons responsible for setting up and maintaining a marketing
Administrators department. Duties include designing and managing campaigns,
product marketing information, and product distribution lists.
Siebel Application Persons responsible for planning, setting up, and maintaining
Administrators Siebel applications.
Siebel Application Persons who plan, implement, and configure Siebel applications,
Developers possibly adding new functionality.
Siebel System Persons responsible for the whole system, including installing,
Administrators maintaining, and upgrading Siebel applications.
Revision History
Siebel SmartScript Administration Guide
Version 7.5.3
Topic Revision
“Formatting Question Text Using HTML Revised for 7.5.3: Added text about
Tags” Information label text and the way in which
you customize this text.
Topic Revision
“Overview of Migration from Pre-Siebel 7 Added a note indicating that browser scripts
Releases of SmartScript” are not supported in SmartScripts.
Additional Changes
Added new heading structure to make HTML navigation easier.
Benefits of SmartScripts
Siebel SmartScript offers these fundamental benefits:
■ Reduced training time. SmartScript guides even inexperienced users through a set
process. Users are prompted with what questions to answer or ask, and what
information to read.
■ Intuitive graphical user interface. SmartScript Designer is a visual tool that allows
a script administrator to create scripts by graphically manipulating script
elements to define a workflow. Technical programming skills are not required;
however, an analyst who does have programming skills can use Siebel VB or
Siebel eScript to enhance and extend the capabilities of SmartScripts.
■ Personalized Interaction. Both the questions that are asked, and the logic of the
script can be adjusted based on customer information or on answers provided
previously in the script. This allows each experience using the script to be
personalized and effective.
■ Efficient modification and reuse of scripts. Scripts are built of modular elements:
questions, pages of questions, answers, branching instructions. An element,
such as a page of questions—or even an individual question—can be used in
multiple scripts or in multiple language translations for a single script.
Prerequisites
To use SmartScript effectively, you should fulfill the following prerequisites:
■ If you want to deploy SmartScript within a multilingual call center, you need
translations for all script elements in each language in which the script will
be run.
Scripting Terminology
You should be familiar with the terms listed in Table 1 to understand scripting.
Term Definition
script The object that contains all subsidiary content and procedural elements
for directing the workflow for an interaction. It consists of a name and
a collection of pages, plus the branches needed to move between pages.
page Logical grouping of questions within a page which will display together
to the user.
translation Text string used to display script elements in languages other than the
original, so that scripts can be used in multilingual call centers. Screen
appearance is determined by the type of script element (page, question,
and so forth) to which the translation string is assigned. The maximum
length of a translated string is 2000 characters.
branch Transfers of control inside a SmartScript that define the display and
processing sequence of pages or questions.
page section Logical grouping of questions within a page which will display together
to the user at one time.
Script Designer Script Designer and Page Designer are visual tools that allow a script
and Page administrator to create scripts by graphically manipulating script
Designer elements as the script flow is being defined.
Script Sessions Any script can have its questions and answers saved to a common
Table answer table. This table is modeled with a parent table which displays
the script name, position ID, contact ID, StartDate-Time, and campaign
ID. The child table shows name-value pairs. This table is useful for later
analysis of script sessions and answers.
SmartScript Screens
SmartScript provides administrative views, which you use to define and manage
SmartScripts, and run-time user views, which display SmartScripts that have been
set up for employees or customers.
Topics include:
If a script is not launched by an incoming phone call by way of Siebel CTI, or called
by Siebel VB or Siebel eScript, the agent must click the SmartScript screen tab to
invoke SmartScript. When an agent opens SmartScript, a list appears from which
the agent clicks on a hyperlink to select a script and a language. Only active scripts
that have been translated into the selected language and are valid for the user’s
organization will be displayed.
Once a script has been opened, users can read or answer questions, move to the
next or previous set of questions, cancel or finish a script, or finish it to be
restarted later.
SmartScript Explorer
After the agent opens a script, a hierarchical view of the script, called the
SmartScript Explorer, is displayed on the left side of the screen.
The SmartScript Explorer allows viewing and navigating through a script in a more
dynamic, flexible way. It includes the standard Windows + and – icons that signify
whether additional information can be displayed below the icon. Different icons
represent different things:
■ Green check mark icons signify questions that you have answered satisfactorily.
On the right side of the screen is the SmartScript Player in which questions and
information text will be generated automatically based on the answers provided
earlier in the script. Answer fields are represented by standard Siebel controls such
as text boxes, pick applets, and drop-down list boxes.
By default, as the script is executed, the SmartScript Explorer displays a list of the
questions on the current page as well as the status of those questions. As the agent
records answers to questions and selects the next button, the SmartScript Explorer
automatically reflects these developments.
Customer Dashboard
Displayed along the top of the agent’s SmartScript screen is a text box called the
SmartScript Customer Dashboard, which displays persistent data acquired from
the script or from an outside source, such as Siebel CTI or a database query. The
Customer Dashboard can, for example, display agent statistics such as average call
time and call-queue status, as well as callers’ answers to particularly important
questions, such as those that elicit the customer’s name or account number. This
data is displayed no matter which page of a SmartScript is current. See Chapter 9,
“Modifying the Dashboard” for overview information on updating the Customer
Dashboard from previous releases of Siebel applications. See Siebel Tools Reference
for more detailed instructions about the Customer Dashboard.
SmartScript Buttons
The following buttons appear in the SmartScript user interface of employee
applications.
■ Finish Later: Allows the user to resume a SmartScript at the point where it was
left off. Users can resume scripts from the My Saved Sessions view.
Because the SmartScript user may be unfamiliar with script or scripting, the
SmartScript screen does not display an explorer, a dashboard, or the Finish Later
button.
SmartScript uses objects that are generically called elements to create the business
process flow. The SmartScripts Administration screen contains views used to create
and configure all the elements contained in a script, including questions, answers
and translations. For more information on working with elements, see Chapter 2,
“Fundamentals of SmartScript Creation.”
SmartScript Elements
Questions are the main element, or object, inside a SmartScript and include such
attributes as answers and data indicating how a question should display. Questions
are joined together with branches and groups of questions are contained inside
pages. Scripts are the broadest element and contain groups of pages. Every aspect
of each script element—from text properties, to branches, to events invoking related
views in your Siebel application—can be modified without affecting other elements.
SmartScript also contains event handlers that support Siebel VB and Siebel eScript
methods and interactions with outside processes. For more information, see
Chapter 7, “Extending Scripts with Siebel VB and Siebel eScript.”
Figure 1 displays each script element and its place within the hierarchy of elements.
Scripts
Scripts are the highest-order containers of script elements.
NOTE: Both conceptually and procedurally, the process of defining a script and
adding pages to it closely resembles the process of creating a page and adding
questions to that page.
Pages
Pages are groups of questions that are displayed together in a view when a script is
executed. Pages should contain related questions, and questions should proceed in
the order required by the workflow. Because pages are stored separately from
the script itself, they can be used more than once in a script and can be used in
multiple scripts.
Questions
There are two forms of question script elements: questions and information
questions.
Questions elicit information from the caller or Web user. Questions also provide
information about policies, options, and product descriptions.
Answers
Answers are script elements that represent answers to questions. Answers appear
as data entry fields or as any of several types of UI elements including check boxes,
drop-down lists, or picklists. Questions and answers are linked by a one-to-many
relationship.
Branches
Branches are transfers of control inside a SmartScript that determine the display
sequence of pages or questions. All movement within a script must be explicitly
defined using branches. There are two types of branches in SmartScript: script
branches and page branches. Script branches transfer control from a question in one
page to a question in another page, while page branches transfer control from one
question to any other question within a single page.
Most SmartScripts contain questions with multiple mutually exclusive answers. For
example, a question may ask whether a customer is making a deposit to, rather than
a withdrawal from, an IRA account. Those possibilities require different subsequent
questions; therefore, you must create a separate branch for each possibility.
At other times, a SmartScript user may need to interrupt the expected flow of a
script. For example, if a loan agent makes a call to offer a credit card, only to find
that the target works for a competing bank, it makes no sense to continue with the
standard script; the call should be ended as quickly, and as smoothly as possible by
branching to the end of the script.
CAUTION: There are no built-in safeguards to prevent your creating branches that
result in closed loops of questions. Therefore, you must test all your branches to be
sure that they have an exit.
■ In a particular business component field. For more information, see Siebel Tools
Reference.
Questions that accept answers, but do not store them, can be used to determine
which branch should be followed. For example, a consumer information center
might both supply information about rebate offers and answer questions about
product safety. The question of which of these topics is the reason for a call may
not be relevant to the particular call record, but the answer will probably determine
which pages of the script should be displayed.
NOTE: The “Save Session” parameter 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 Bus Object. There is no setting that affects when answers are saved to the Save
BusComp fields.
■ Create answers
■ Create pages
■ The writing style should be conversational, that is, worded so as to seem part of
a natural dialogue between the agent and an interested customer or prospect.
■ A script should be general enough to address the needs of all potential customers
or prospects, without forcing them into preexisting categories that may not
match their needs.
Creating Questions
You create questions in the SmartScript Question Administration view. Because
questions are stored separately from the script itself, they can be used more than
once in a script and can be used in multiple scripts.
See Chapter 3, “Working with Questions, Answers, and Translations,” for more
information on creating questions.
To create a question
1 Navigate to Site Map > SmartScript Administration > Questions.
2 Click New, and in the More Info form, enter the question’s attributes.
Table 2 details the attributes a question can have. Table 3 on page 31 shows the
question answer types you have to choose from.
Answer Type Data type for the answer to this question. See Table 3 for a list of
answer types.
Answer Control Indicates which answer control you will use to display your
question, such as radio button, drop-down list and so on. For more
information on answer controls, see “Displaying Answers Within a
SmartScript” on page 55.
Pick Only Indicates that the answer must be chosen from the list of answers
attached to the question.
If this box is not checked, you may still use a picklist, but agents may
enter answers that are not on the list.
Save Answer Table If the script session is being saved, selecting this flag will also save
this question and answer to the answer table.
Table 3 describes the data types that are available as answer types for SmartScript
questions.
Currency Numerals only; uses currency code and exchange date for currency
conversion
Translating Questions
You can translate questions displayed to a SmartScript user into any supported
language. If you are going to translate questions into other languages, you must be
sure to translate all questions within the script into that same language, as failure
to do so may results in the script failing.
See Chapter 3, “Working with Questions, Answers, and Translations,” for detailed
information on creating question translations.
NOTE: Every question in the script must have a translation in the same language or
languages in order to execute.
Creating Answers
You create answers in the SmartScript Questions Administration view.
To create an answer
1 Navigate to Site Map > SmartScript Administration > Questions.
2 In the Questions list, select the question for which you will be adding an answer.
3 Click the Answers view tab, and click New.
4 Enter a display order for this answer under this question.
Lower-numbered answers are displayed first. You may want to number the
initial display order by tens to allow space for later additions and changes.
5 Enter the text or value for the answer, and its currency, if applicable.
The answer record is automatically saved as a child to the question. Repeat the
above steps to add another answer to this question.
NOTE: Answers are saved to the business component only after the script completes.
For more information see Chapter 3, “Working with Questions, Answers,
and Translations.”
Translating Answers
It is good practice to translate answers when the answer type for a question is a
string, so that answers can be displayed in different languages. This step is not
required for scripts only deployed in one language and optional for scripts deployed
in multiple languages. If you do create answer translations, then when the script
runs in a particular language, it will look for and use the answer translation as the
answer label.
See Chapter 3, “Working with Questions, Answers, and Translations,” for detailed
information on creating answer translations.
Creating Pages
You create pages in the SmartScript Page Administration view.
To create a page
1 Navigate to Site Map > SmartScript Administration > Pages.
2 Click New, and enter the name for the page in the Name field.
The value you enter into the name field will aid in administration, in drop-down
lists as an identifier when you build pages into scripts. This entry does not
appear in the UI.
3 Click in the First Question field, and click the select button.
4 In the Pick Question pop-up window, select the first question that you want
available in the page.
Translating Pages
Page translations are titles shown in specified languages for the individual page tabs
displayed in the SmartScript agent’s view. Page translations must be specified for all
languages in which the script will be run.
NOTE: Because the questions and answers receive their own translations, the only
item to translate on a page is its title.
Creating Scripts
Scripts are the highest-order elements that are used in SmartScript. They are
assembled from pages containing questions. Questions, in turn, comprise question
translations and answers. Branches between elements create the structure of the
script, within which the elements are displayed. You can define scripts in the
SmartScript Administration view.
4 Click in the First Page field, and click the select button.
The Pick Page pop-up window appears.
5 Use one of the following methods to select the first page to be displayed in the
script:
■ Click New to add a new first page, and an empty row will be added to the list.
■ Finished. The session record and answers are saved only when the script is
completed normally and the agent clicks Finish. This is the default setting.
■ Finished/ Timeout. The session record and answers are saved when the script
is completed normally and the agent clicks Finished or when the session
times out.
■ Never. The session record and answers for the script are never saved.
NOTE: Only answers to questions that are marked Save Answer Table are saved.
8 Set the other values for the script. See the following table for parameter
descriptions.
Parameter Description
BusComp SmartScripts that will be invoked from the Script button on the
Account, Contact, or Opportunity screens should have this field
set to one of those business components. When the Script
button is selected, the SmartScript which has the BusComp
value equal to the business component of the current view will
invoke automatically.
Estimated duration Reference field for how long a script is expected to take to
complete.
9 Attach other pages to the script. See “Adding Pages and Branches to Scripts” on
page 41 for details.
Translating Scripts
Script translations are translations to different languages of the individual Script
titles displayed in the Choose SmartScript dialog box, which appears when you first
choose the agent’s SmartScript screen.
NOTE: Because the questions, answers, and pages receive their own translations, the
only item to translate in a script is its title.
6 Click in the Label field, and enter the text you want to translate.
7 Click in the Dashboard text, and enter the text and parameters to be displayed
in the Dashboard. See Chapter 9, “Modifying the Dashboard,” for details.
The SmartScript Script Designer and the Page Designer screens are similar. Both
screens feature a list at the top of the screen—the Script Designer displays a list of
scripts, and the Page Designer displays a list of pages. At the bottom of the screen
is the Designer view workspace. The palette provides page or question icons
(depending on which designer view) and branch icons in both views which allow
you to join the different elements. You drag script elements onto the workspace to
create your scripts.
Once you drag an element into the workspace, you can move it to any location.
Pages and questions are connected with branches by dragging the branch into the
designer and making sure the ends of the branch connect to the connection points
on the question or page node. A connection is made when the branch and node
touch displays a large box. In the workspace, you can double-click on pages or
questions that have branches to or from them. Double-clicking on a page in the
Script Designer takes you to the Page Designer, where you can further define the
page. Double-clicking on a question in the Page Designer takes you to the
SmartScript Question Administration view, where you can further define the
question. You can double-click on branch icons to change the question from which
it is branching. (To change the question to which a branch is pointing, you must
disconnect the branch and reconnect it.)
The four points displayed on each element icon on the workspace are called
connection points. Use the connection points to attach branches to elements. From
the shortcut menu (right-click) you can add points to a branch. You can drag the
points on branches to reshape the branch. This feature is useful when two branches
are overlaying each other in the workspace.
In the workspace, the shortcut menu (right-click) provides changes to the way the
designer is viewed, such as zoom, and will persist until you navigate to another
view. These options are described in Table 4.
Connection Points Turns the connection points displayed on elements on and off.
Autosize Extends the workspace after you drag an object to the extents of the
workspace.
NOTE: If you arrived at this view from the Script Designer, the page you double-
clicked on is already selected in the Pages list applet.
4 Drag and drop the question icon from the Page Designer palette to the
workspace.
5 Select a question type from the list and click OK. Add the next question in the
page designer using the same technique.
6 To connect these two questions with a branch, drag the branch icon from the
Page Designer palette to the workspace and align the arrowless end of the
branch with a connection point on the question from which you want to branch.
If you select a question with multiple answers, SmartScript gives the option of
selecting an answer for which the branch will be used, or a default branch. A
default branch covers the case when a user’s answer is not covered by another
branch. If you choose not to create a default branch, SmartScript requires you to
choose an answer to branch from.
7 Drag the arrow end of the branch to align it with a connection point on the
question to which you want to branch.
8 Repeat the above steps to continue adding required branches and questions to
the page.
3 Drag the page icon from the Script Designer palette to the workspace.
The Page Pick dialog box appears.
3 The Branches list appears, displaying all branches between pages in the script.
Use this display to make sure that all the necessary branches have been added.
Releasing Scripts
Once you have completed and tested your script, you are ready to release it. Though
it is optional to release a script, it is recommended to release it to improve its
loading speed. Scripts should only be released when you are ready for production,
otherwise you must rerelease scripts after each change made in order for the change
to be visible when testing.
Releasing a script saves (or more properly, caches) a precompiled version of the
SmartScript definition and all associated code (VB or JavaScript). Releasing saves
the release-compiled script to a file on the file system. It also updates the
SmartScript definition to indicate that a release file exists, and to create a pointer to
the release file in its server location.
When a user invokes a released script, the SmartScript engine will look for a release
copy of the script on the server. If the SmartScript engine does not find a release
copy of the script on the server, it will copy a release copy of the script from the file
system to the server and then execute the script from there. If a released version of
the script does not exist on either the server or the file system, an error is raised. If
a script is not released, SmartScript must compile and execute the script from the
server, which causes the script to load slower.
When you release a script, you must select the translation of the script you want to
release. If a script has multiple translations, you must release each translation
individually.
The following is an overview of the release process and how it will work in your
environment:
1 The released file is created and put on the Siebel File system under the
FileSystem root directory; there is no subdirectory. This released file is saved as
a .SAF file, which is compressed in the same manner as all other Siebel
FileSystem files are compressed.
2 If a client starts the SmartScript, the compiled version is downloaded from the
Siebel FileSystem to the server machine (into the [siebsrvrdir]
\ServerDataSrc\files\sscript directory). The file is renamed as .ssc file.
3 If a client starts the SmartScript again, the file is read from server machine
without accessing FileSystem.
To release a script
1 Navigate to Site Map > SmartScript Administration > Scripts.
2 In the Script list, select the script you want to release.
3 Click the Translations view tab, and select the translation you want to release.
4 Click the Scripts menu, and select Release.
After a script is released, a check mark appears in the Released field of the
translation record.
NOTE: When you release a script, only the translation you selected is released.
Unreleasing Scripts
Unreleasing a script erases the pointer to the script file. The result is that each
subsequent execution of the script is compiled from the database every time you
run the script. Unreleased mode is the same as development mode.
To unrelease a script
1 Navigate to Site Map > SmartScript Administration > Scripts.
2 In the Script list, select the script to unrelease.
3 Click the Translations view tab, and select the translation to unrelease.
NOTE: This does not delete the actual script, only the released or compiled version
of the script.
Creating Questions
The question is the basic element of a SmartScript, and is thus created first when
you build a new SmartScript. You create questions in the Questions Administration
view. Questions are stored separately from the script itself, and can be used more
than once in a script as well as in multiple scripts.
■ Eliciting information. Questions can be asked by a call center agent to elicit sales
or service information from a customer. Over the Web, questions can be
presented to a customer as a a survey or a series of questions to isolate a
problem. The answers given may then be stored for later use.
■ Guiding a process or question flow. A single question can determine which path the
script will 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 Questions Administration form 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 Camp, and Save Field all serve to define the location for answer data given in
response to the question. The fields labeled Width, Height, Minimum and
Maximum all refer to the user interface space provided for answers.
To create a question
1 Navigate to Site Map > SmartScript Administration > Questions.
2 Click New, and in the More Info form, enter the question’s attributes.
Table 5 details attributes a question can have.
Answer Control The type of answer control you would like to use.
■ Check box – single-select (Boolean) and multiselect check
boxes
■ Default– Siebel 2000 and Siebel 7 logic for displaying
answer controls
■ Dropdown– displays 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.
Minimum and Used with Date, Integer, Number, Date & Time, and Time
Maximum values 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 that 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
will actually be half the number entered in these fields.
Default Answer The default answer displayed for the question. This is one of
the answers defined for the question. If the answer is to be
selected from a pick applet, then the default answer will not
be shown.
Width The width, in pixels, of the text box provided for answers.
Height The height, in pixels, of the text box provided for answers.
Save Business Object The business object in which the answer to the question will
be stored.
Save Bus Comp The business component in which the answer to the question
will be stored.
Note that to save a question’s answer to a business
component field, the business object and the business
component and the field name must be specified for the
question. See “Displaying Answers Within a SmartScript” on
page 55 for details.
Save Field The field in the business object or business component table
that is to contain the answer data, or that will be used to
identify the specific record that will contain the answer data.
Note that special steps may be required to set up a save field.
See “Displaying Answers Within a SmartScript” on page 55
for details.
Save User Parameters Specifies a field in a BC as a user parameter. The record that
is set as active in that BC 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
BC 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 will contain the currency setting.
Pick Applet Indicates the pick applet that the end user will use to select
and save 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” on page 55.
Detail Applet Indicates the Detail applet that will be 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” on page 55.
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.
NOTE: Once you have decided to translate into a particular language, you must
translate all questions in the script to that language. If you do not translate every
question within the SmartScript, your script may not run properly.
6 Click the Question field, then type the text of the question in the chosen
language.
NOTE: Every question in the script must have a translation in the same language in
order to execute.
For each additional language in which the question will be displayed, return to
Step 3. Each translation is saved to the database with the question.
If you want to limit the possible answers a user may select from, you have the
option of defining these answer options within the SmartScript definition as
Question Answers, or reusing an existing pick or MVG applet already defined in
Siebel Tools.
In the simplest case, users select answers to a question from a simple drop-down
list of answers that you define specifically for that question, using the Answer list
menu options. These drop-down lists of answers are defined with respect to a
unique question, and are actually an extension of the question definition.
To use a drop-down list, you chose the Pick Only option in the Question Form. To
use single or multiselect pick applets, or detail applets, you would not check Pick
Only.
To use radio buttons or multiselect check boxes, your answers must be set up as
part of the SmartScript definition.
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 to select from a fixed list of answer options, but instead can enter 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
script definition. You define a unique domain of answers for the question. Fields
which are based on LOV's will 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 in that a only a single
selection can be chosen by the user from a fixed list of answer options.
Pick Applets
Any question can employ a pick applet for users to select answers to that question.
In order to set up a question with a pick applet or MVG applet, it must be set to save
the selected record to the appropriate field in the business component. Therefore,
the save Business Object, save Bus Comp, and save field must all be entered.
Branching cannot be defined for answers selected from pick applets. The pick applet
or MVG applet selected must be set up 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 Buscomp.
Selecting an appropriate applet requires some familiarity with Siebel Tools and the
buscomps to which SmartScript must be linked. For guidelines on working with
applets, see Siebel Tools Reference.
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 very 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 Attachment applet. If you use the Currency Popup applet, the agent sees an
icon next to the question’s input box at runtime. 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. In the case of a file attachment applet,
the user will be able to add a file to the record.
NOTE: Branching from a question can only be defined for answers that are defined
as part of the script definition and not those selected from pick applets or based on
LOV's. In the case of branches defined on a question using multiselect check boxes,
if multiple answers are selected by a user, the default branch will be used.
String Check box (if answer Drop-down (if Pick Drop-down (if Question Radio Button (if
exists) Only selected and answers exist) text only answers exist)
answers exist)
Text Box (if Pick Only
not selected)
Pick/MVG/Detail
Applet (if defined for
the question
Integer Box with icon for Box with icon for Box with icon Question Box with icon
number applet number applet for number text only for number
applet applet
Number Box with icon for Box with icon for Box with icon Question Box with icon
number applet number applet for number text only for number
applet applet
Currency Box with icon for Box with icon for Box with icon Question Box with icon
number-currency number-currency for number- text only for number-
applet applet currency applet currency applet
Boolean Single select check Single select check Single select Question Single select
box box check box text only check box
Date Box with icon for Date Box with icon for Date Box with icon Question Box with icon
applet applet for Date applet text only for Date applet
Date-Time Box with icon for Box with icon for Box with icon Question Box with icon
Date-Time applet Date-Time applet for Date-Time text only for Date-Time
applet applet
Time Box with icon for Box with icon for Box with icon Question Box with icon
Time applet Time applet for Time applet text only for Time applet
Creating Answers
To define an answer for a question, use the Answers Administration form in the
SmartScript Administration Questions screen.
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 different required languages, as needed for each answer.
Answer translations are optional, but be aware, if you provide one translated
answer within a script, you must translate every subsequent answer.
To create an answer
1 Navigate to Site Map > SmartScript Administration > Questions.
2 In the Questions list, select the question for which you want to define answers.
If Pick Only is checkmarked for the question, can have more than one answer,
and as a result, you must specify all valid answers.
4 Complete the fields, which are described in Table 7, and then click Save.
Number Provide a number that will 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 will include 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 will appear
with this answer.
The new answer definition appears in the Answers list. The answer record is
automatically saved as a child of the question. To add another answer to this
question, repeat Step 3 on page 59 and Step 4.
If answer translations are needed, you may want to define a placeholder row for
each translation in the Answer Translations list. Establish a policy and a
procedure for providing translation text.
Translating Answers
When the Answer Type for a question is String and the Pick Only field is
checkmarked, you may need to translate answers so that they can be displayed in
the same language as the corresponding question translation.
NOTE: Answer translations are not required if you are deploying the SmartScript in
one language. If no translations are used within a script, the language-independent
answer value will be used for all translations. However, if you do translate answers
within your script, you must translate every question with answers into the full set
of languages into which the script is translated.
6 Click in the Answer field, type the text of the answer, and then click Save.
This is the text that will actually display to the user when they run the
SmartScript in that language.
Repeat this procedure for each additional language in which the answer must be
displayed. Each answer translation is linked to the answer, which is in turn linked
to a corresponding question.
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.
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.
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.
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.
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.
NOTE: As a general rule, you should always un-release or re-release your released
scripts after the upgrade process.
■ VB and eScripts. Any VB or eScript that has been written inside SmartScript
should be supported after the upgrade since it runs on the server. Any upgrade
issues with upgrading the code are generic to the application and are discussed
in the upgrade guide for the operating system you are using. For information on
VB and eScripts see Chapter 7, “Extending Scripts with Siebel VB and
Siebel eScript.”
■ Text Formatting. Any question, page, script, or answer text can be formatted
using HTML tags. However, the Styles feature from previous releases is no longer
supported. See Chapter 5, “Customizing a SmartScript User Interface,” for more
information.
■ Dashboard. The SmartScript dashboard has been replaced with the customer
dashboard which is available throughout the application. The active clock
showing current time elapsed is only available for customers using SmartScript
along with CTI. See Chapter 9, “Modifying the Dashboard,” for more
information.
■ Establish the business object information for the script and the questions
■ Select the correct picklist applet information for the reconstituted script
NOTE: Script Wizards appear only in the SmartScript Administration Script Wizard
view.
You may import Script Wizards from a different environment, but all Script
Wizards must be upgraded before they can run in the post-Siebel 7 environment.
5 From the Show drop-down list, select Scripts, and in the Scripts form, check that
the BusComp field in the script is the same as the business component on which
the script button that invokes the SmartScript is based.
6 In the Questions view, open the first question in the script, and complete the
Save BusObj field.
NOTE: If the answer field is a currency field you must add a Save Currency Field
to make sure that the field is updated.
8 Check all other details in the script to make sure that nothing has been omitted
and that it functions properly.
It is recommended that you verify and test the Script Wizard-based script as you
would any new script.
NOTE: Entering the business component at the script level will allow the new
SmartScript to be automatically executed from the script buttons on the Account,
Opportunity, and Contact profile views.
Two other important ways in which the SmartScript user interface is designed are
listed below.
Determining which questions should appear on the same page is a design decision
that involves many factors. You have to consider a question’s relationship to
questions that precede and follow it, the need for branching logic, and many other
requirements. In addition to the rules and design decisions you explicitly apply
within a script to organize questions into pages, SmartScript itself applies rules that
determine whether a question can appear on a given page. For example, if the
definition of a question includes a certain type of VB event, the question may have
to appear on the next page. To get the results you want, you must allow for and
work with these implicit page break rules.
On another level, SmartScript allows you to apply and modify HTML formatting
code to determine the way question and page data is displayed. You can work with
HTML formatting on two levels, as follows:
■ To change the design and layout of the page, you work with the HTML template.
SmartScript displays at once to the user all of the questions in a page section.
A page section is a logical subset of all of the questions between page breaks. Page
breaks are dynamically determined by SmartScript based on the following rules:
■ A branch leads from a question to a new page or the end of the script.
For example, if a question has dynamic text substitution defined for it where the
answer of the previous question determines the text for the question, then clearly
there must be a page break between these questions. Or, a question may have code
executed when the question is completed to check some values in the question
answer before moving to the next question.
SmartScript’s implicit page break rules are based on the options used to define a
question. As you work with these options, you should always consider their effects
with respect to information flow and page design. It is often possible to put off a
question that will cause a mandatory page break until you actually want the page
to end. Or, it is often possible to move the location of VB or eScript code to a
different location in the script in order to limit page breaks.
NOTE: You can manipulate SmartScript’s implicit page break rules and exploit them
to change the way questions are arranged into pages. For example, it is possible to
add null or comment VB code that triggers a certain type of page break without
including code that actually causes any other effect.
■ To change the design and layout of the page, you work with the HTML template.
Example:
NOTE: Question labels are bold by default with the exception of Information
questions. To change the default behavior of SmartScript, including bolding the text
of Information questions, you must alter the Web Template:
CCSmartScriptPlayerApplet.swt.
Adding Images
You can also add images to your SmartScript by putting image reference HTML tags
into your question translations. You need to provide an explicit path to an image file
like a GIF or JPEG and this image will display when that question translation text
is rendered inside the SmartScript player applet.
Example:
<img src="\\goliath\images\explosion.gif">
Adding URLs
URLs can be added to questions to provide links to static, non-SWE-generated
HTML pages. This is done by adding a URL reference tag inside the question
translation text. These URLs should always be opened in a separate browser and
should not reference Siebel pages.
Example:
Formatting Example
You can use standard HTML in the question translation text to customize your
scripts. The following text was copied directly from the Question field in the
Translations form under the Questions view:
<b> Step 1:</b>Click the Add button to add a new data source. <BR>
<BR> <img src =
“\\main\demofile\demo38\my_images\SmartScriptImages\SmartScript_
buildX\DB2_Client_Connector_CreateDataSrc.gif”>
Your server administrator can provide you with the correct locations for images,
applets, stylesheets, and so on, if you wish to use such elements in a SmartScript.
Typically, you would change the template to make changes to the fundamental page
design and layout. Much of the page design standard is based on tables, so making
changes to table, row, and column parameters is relatively easy.
In Figure 3, questions are displayed from top to bottom in a single column. Each
question starts directly below the preceding question and extends across the width
of the single column. If you want to display a number of short fields side by side to
make your page into a shorter form, you could modify the template to display data
in two or more columns.
This template refers to a standard SmartScript page layout, the largest elements of
which are represented in Figure 3. The template establishes the formatting for
several dynamically generated tables.
NOTE: Question and question control (answer) pairs always use the same format
determined in the Web template and repeat this format for all subsequent questions.
This means that all question-answer pairs must keep the same format.
NOTE: When you incorporate the SmartScript Player Applet (Player Only) into a
custom view, set the Applet Mode property of the View Web Template Item to Edit.
Otherwise, unexpected behavior may occur, such as data not displaying correctly.
■ Missing translations
The Verify Wizard will also attempt to clean up dangling references and remove
unreachable branches. These are problems which may occur when making
deletions to an existing SmartScript. If you have these problems, they may cause a
script to fail to execute or export but will be cleaned up with the Verify Wizard.
You should not choose this option if you still are editing the script and plan on
making revisions. Otherwise, Script elements with which you are still working
may be deleted.
To invoke the Verify Wizard, click the Scripts List menu on the SmartScript
Administration screen, and select Verify. The Wizard checks all the items that you
select for verification. You must select Clean up dangling references and Remove all
Unreachable Branches to execute these actions.
To verify a script
1 In the SmartScript Administration screen, click the menu button, and then
select Verify.
The Wizard starts and displays the Verify Intro view, in which you select the
items to be verified.
2 Make your selections by clicking the check boxes, and then click Next.
The Wizard checks the page branches and displays a list of any pages that
cannot be reached.
4 Click Next.
The Wizard displays a summary of all errors found and indicates which were
fixed automatically. Optionally, you can view a tree-structured display of the
objects in the script.
5 Note any errors found so you can correct them, and then click Finish.
Be sure to verify your script again after you have made corrections, in case you
have missed some errors or introduced new ones.
When your script has been verified with no errors, run it several times, using
different answers at the various branch points to make sure that it behaves as
you intended.
SmartScript Diagnostics
You can enable SmartScript diagnostics through event logging. To turn on
SmartScript logging, set the event log level for GenericLog to 3 or 4.
For level 3:
For level 4:
2 Click the SmartScripts menu, and choose All SmartScripts to see all available
SmartScripts.
Use Siebel Tools to add the SmartScript player to a view. See Siebel Tools Reference
for information. Use the SmartScript View Administration View to add SmartScripts
to a view.
CTI parameters (from the telephone switch) can be processed and used within a
SmartScript. These can be accessed through Siebel VB or Siebel eScript using the
GetParameter function against the SmartScript object. Or, they can be used for text
substitution just like any user parameter.
RunSmartScript
This function invokes a SmartScript programmatically.
Argument Description
Argument Description
viewName Name of the view to be displayed if it is not the agent’s SmartScript view
Examples
Siebel VB and eScript Example
InvokeMethod “RunSmartScript”, “Pentium II Script”, “”, “ENU”, “USD
OLE Example
Dim errCode as Integer
Dim Args(4) as String
Args(0) = “Pentium II Script”
Args(1) = “”
Args(2) = “ENU”
Args(3) = “USD”
Applet.InvokeMethod “RunSmartScript”, Args, errCode
RunCallScript
This function is similar to RunSmartScript in that it programmatically invokes a
SmartScript. However, it positions the script on the currently active record from the
applet from which the script was invoked. This can be invoked by filling in the
Method invoked property of the button to be RunCallScript. Alternatively, an
administrator can invoke it through VB in order to pass in the additional
parameters.
Argument Description
Examples
Siebel Applet Button Examples
Function WebApplet_PreInvokeMethod (MethodName As String) As IntegerSub
if MethodName = “MyRunCallScript” then
InvokeMethod “RunCallScript”, “Pentium II Script”,””,”ENU”,”USD”
WebApplet_PreInvokeMethod = Cancel Operation
else
WebApplet_PreInvokeMethod = ContinueOperation
end if
End Function
NOTE: These methods operate on the SmartScript you have currently running.
Resume SmartScript
Syntax Resume SmartScript viewName, appletName
Argument Description
viewName Name of the view to be displayed if it is not the agent’s SmartScript view
Usage You could create a SmartScript that has one SmartScript question start another
SmartScript in the current language.
CurLang = GetCurrentValue
Script.Finish
If CurLang = "English" THEN
TheApplication.InvokeMethod "RunSmartScript","HSN-New Customer",,"ENU",
"USD"
else
End Function
For example, the eCampaigns application sends customers a marketing email with
a URL link to an SmartScript called Buyer’s Profile, which collects information
about the customer. Clicking on the Buyer’s Profile link invokes the SmartScript.
To make this change in Siebel Tools, identify the SmartScript Player applet being
used in the application and then change the user property for the business
component on which this applet is based.
Activating Fields
If you are using VB or eScript to read records from a BusComp, you will need to
programmatically call ActivateField when you are working with a field that is not
used in your SmartScript Questions. It is recommended that you call ActivateField
when you have changed the user property in the business component. If you have
not changed the user property, you need not perform this task.
NOTE: Siebel eScript functions work in the same manner as standard JavaScript
functions, and thus requires the trailing parenthesis () even when the function has
no 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 five Siebel VB and eScript procedures, 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. See Table 8 for a list of these procedures.
Name Role
Script_PreFinish A pre-event function called when the user clicks the Finish button.
Script_Finish A post-event function called after the script has been finished, but
before data is saved, to allow any last-minute cleanup or post-
processing.
Script_Save An event function called before the normal script state has been
saved to business components and the answer table and after the
Script_Finish function has been run.
Each question element is configured with four such procedures. Other elements
do not have Siebel VB or Siebel eScript procedures associated with them. These
procedures can contain methods which can be used to further control the workflow
of a script. See Table 9 for a list of these procedures.
Table 9. Standard Siebel VB and Siebel eScript Events Used in SmartScript Ques-
tions
Name Role
Question_Enter A post-event function called after the question has been entered
and all pre-question processing is complete.
Question_PreLeave A pre-event function called on the question before the user leaves
it by jumping or proceeding (but not by Undo or Backup).
■ SmartScript
■ SmartScriptPage
■ SmartScriptQuestion
■ SmartScriptAnswer
5 In the Scripts applet below, enter your required code, then select Save Record
from the Scripts menu.
NOTE: Each script has the option of using Siebel VB or Siebel eScript (JS).
However, every script method for a given script has to use the same language.
4 Click in the Program Language field and chose the program language, then
choose Save Record from the Programs menu.
5 In the Scripts applet below, enter your required code, then select Save Record
from the Scripts menu.
Script_Open
Script_Open allows updating of the Dashboard. It also can be used to position
the database on the appropriate record when saving answers to a BusComp.
Syntax Script_Open
Usage Script_Open allows setting variables for use for complex branching, use in later
questions, or in the dashboard. It can also be used to create a new record and
populate some values using code.
Script_Cancel
Script_Cancel handles post-processing when a script is canceled.
Syntax Script_Cancel
Usage This post-event is called to allow any last-minute cleanup or post-processing when
the script is canceled. Script_Cancel will not be called if Cancel is called from the
Script_Open event. If an error is raised during the Script_Cancel procedure, the error
will be rolled back.
Script_PreFinish
Script_PreFinish is called when a script is finished.
Syntax Script_PreFinish
Usage Script_PreFinish is called when the user requests (by clicking the Finish button)
that the script be finished. This is a good place to check additional constraints on
the script that were not set up through configuration. Script_PreFinish is declared
as an integer.
Script_Finish
Script_Finish allows cleanup after a script is finished.
Syntax Script_Finish
Usage Script_Finish is a post-event that is called to permit any last-minute cleanup or post-
processing after the script has been finished. If an error is raised during the
procedure, it is displayed to the user, but the script remains finished.
Script_Save
Script_Save can be used to save states not stored by normal means.
Syntax Script_Save
Usage Script_Save is an event called before the normal script state has been saved to
business components and the answer table, and after Script_Finish has been called.
This is a good place to save additional states collected by the SmartScript and not
stored by the normal mechanisms.
Cancel
Cancel cancels the current script.
Syntax Cancel
Usage The Cancel method stops the SmartScript’s execution. This method only cancels the
SmartScript’s execution; it does not take you back to the original view or, as with
the Cancel button, take you to the specified OnCancel view.
CurrentPage
CurrentPage returns the current page of the executing SmartScript.
Syntax CurrentPage
CurrentQuestion
CurrentQuestion returns the current question of the executing SmartScript.
Syntax CurrentQuestion
Usage The CurrentQuestion method returns the current question of the executing
SmartScript. This will always return a question object if the script is actively
executing. CurrentQuestion is declared as a SmartScriptQuestion object.
ExecutionState
ExecutionState returns the current state of a running SmartScript.
Syntax ExecutionState
Not available 0
ssInitializing 1
ssRunning 2
ssFinished 3
ssCanceled 4
Usage ExecutionState returns 0 if the SmartScript object has not been set up for execution
(used when listing available SmartScripts).
Finish
Finish causes the current script to be finished.
Syntax Finish
Usage The Finish method causes the currently running script to be finished. The collected
answers are saved as appropriate. This method can fail if the user has not answered
all the questions that require answers (must answer questions).
GetCampaignId
GetCampaignId returns the campaign identification string.
Syntax GetCampaignId
Usage GetCampaignId returns the campaign ID as set up by launching a script from Siebel
Campaigns, Siebel CTI, or the SetCampaignID method. This information,
if available, is stored in the SmartScript session for calls.
See Also GetCampContactId on page 106, GetContactId on page 107, and SetCampaignId on
page 113.
GetCampContactId
GetCampContactId returns the campaign contact identification string.
Syntax GetCampContactId
Usage GetCampContactId returns the campaign contact ID for the campaign contact as set
up by launching a script from Siebel Campaigns, Siebel CTI, or the
SetCampContactID method. This information, if available, is stored in the
SmartScript session for calls.
See Also GetCampaignId on page 106, GetContactId on page 107, and SetCampContactId on
page 113.
GetContactId
GetContactId returns the contact identification string.
Syntax GetContactId
Usage GetContactId returns the contact ID as set up by launching a script from Siebel
Campaigns, Siebel CTI, or the SetContactID method. This information, if available,
is stored in the SmartScript session for calls.
See Also GetCampaignId on page 106, GetCampContactId on page 106, and SetContactId on
page 114.
GetLabelText
GetLabelText returns the translation of the current script name in the current
language.
Syntax GetLabelText
Usage GetLabelText is used when displaying script names, as in the Choose SmartScript
dialog box.
GetPage
GetPage returns a page of the script by name.
Syntax GetPage(name)
Argument Description
Usage This method returns a page of the script when the page name is specified. This
name is the non-translated name set during authoring, not the label of the page tab
displayed for a particular language. GetPage is declared as a SmartScriptPage object.
GetParameter
GetParameter retrieves a value that has been assigned to a specified user parameter,
a CTI switch parameter or a system parameter.
Syntax GetParameter(ParameterName)
Argument Description
Usage GetParameter can be used to retrieve a value assigned to a user parameter. The
parameter name in this case must be prefixed with User. Usually a value is stored
by using the SetUserParameter function.
GetParameter can be used to retrieve the current setting of a Siebel CTI switch
parameter. The parameter name in this case must be prefixed with CTI. CTI switch
parameters are set when SmartScript is invoked through Siebel Communications
Server. For more information, see Siebel Communications Server Administration
Guide.
This parameter can be used to retrieve the value of a system parameter. Table 10
lists the system parameters.
System.RecordFound Set to TRUE if there are records returned from the search spec
defined on the question; set to FALSE otherwise.
GetParameter("CTI.ANI")
GetQuestion
GetQuestion returns a question of the script by name.
Syntax GetQuestion(name)
Argument Description
Usage This method returns a question of the script by name. This name is the non-
translated name set during authoring, not the question text displayed for a
particular language. GetQuestion is declared as a SmartScriptQuestion.
GetSessionId
GetSessionId returns a row ID of the session table where the script answers will be
stored.
Syntax GetSessionId
Returns The row ID of the session table where the script answers will be stored according
to the script's admin settings (Save Session column on the script and Save Answer
Table flag on the script's questions). It returns a string. It will be empty if the script
is not set to save session, or if GetSessionId is called from incorrect events (see
below for the list of correct events).
Usage GetSessionId is declared as a string. This method should be called from either
Script_Finish or Script_Save events.
OriginalDashboardText
OriginalDashboardText returns the actual text in the dashboard field for the
currently running translation.
Syntax OriginalDashboardText
Usage This method returns the configured value of the Dashboard text (Descriptive Text).
SetCampaignId
SetCampaignId sets the campaign ID, if gathered through script execution.
Syntax SetCampaignId(ID)
Argument Description
Usage SetCampaignId sets the campaign ID, if gathered through script execution.
This information is stored in the SmartScript session.
See Also GetCampaignId on page 106, SetCampContactId on page 113, and SetContactId on
page 114.
SetCampContactId
SetCampContactId sets the campaign and contact ID, if gathered through script
execution.
Syntax SetCampContactId(ID)
Argument Description
Usage SetCampContactId sets the campaign and contact ID, if gathered through script
execution. This information is stored in the SmartScript session.
SetContactId
SetContactId sets the contact ID.
Syntax SetContactId(ID)
Argument Description
Usage SetContactId sets the contact ID, if gathered through script execution.
This information is stored in the SmartScript session.
See Also GetContactId on page 107, SetCampaignId on page 113, and SetCampContactId on
page 113.
SetUserParameter
SetUserParameter assigns a value to a specified user parameter.
Argument Description
Usage SetUserParameter is used most commonly to store the value of a user parameter,
which can be called in another subroutine by using GetUserParameter. It can also be
used to assign a system parameter, obtained with GetParameter, to a user parameter.
SetUserParameter is declared as a string.
else
ContactBC.NewRecord NewBefore
end if
StartPage
StartPage returns the configured name of the start page on the SmartScript itself.
Syntax StartPage
Returns The configured name—the original name before any translation—of the start page
of the current SmartScript, as a SmartScriptPage object.
StartQuestion
StartQuestion returns the configured name of the starting question on the
SmartScript itself.
Syntax StartQuestion
Returns The configured name—the original name before any translation—of the first
question of the current SmartScript, as a SmartScriptQuestion object.
SubstituteText
Syntax SubstituteText(text, “variable”, “value”)
Argument Description
value The new text string to be inserted in the original block of text in place of
variable.
Returns The original block of text with the new value substituted for the variable, as a string.
Usage This method substitutes a single string in the Text, found as [Variable] with the
Value, and returns the changed text. In the text variable, the variable and the value
are enclosed in square brackets.
NOTE: This method can be executed only once each time the method is called,
because the entire string “[text]” is replaced with the value in place of the variable.
However, the method can be called repeatedly to translate multiple values in one
question or translation.
Siebel VB The phrase “Are you calling from your car?” would be rendered as “Are you
Example telephoning from your carriage?” if the function was configured to translate from
US English to “Victorian” English as follows:
if (Victorian) then
else
end if
NOTE: The GetDashboardText and SetDashboardText methods will not affect the
displayed values in the Customer Dashboard. See Chapter 9, “Modifying the
Dashboard,” for details on how to affect the customer dashboard values.
GetHelpText
If any help text is present, GetHelpText returns the help text for the current page in
the current language.
Syntax GetHelpText
Returns The language-specific help text associated with the page, as a string.
Usage Help text may be used as reference help text which can be captured and displayed
to a user using VB within a question text.
GetLabelText
GetLabelText returns the translation of the current page name in the current
language.
Syntax GetLabelText
Returns The translation of the name of the current page of the current SmartScript in the
current language, as a string.
Usage GetLabelText returns the language-specific translation for the page name.
This shows up in the page tab and can be used in error messages or other user
interactions.
GetQuestion
GetQuestion returns the text of the specified question.
Syntax GetQuestion(QuestionName)
Argument Description
GetQuestion returns the text of a question on the page when the question name is
specified. This name is the non-translated name set during authoring, not the
question text displayed for a particular language.
Script
Script returns the name of the script containing the page.
Syntax Script
Returns The name of the script containing the current page, as a SmartScript object.
StartQuestion
StartQuestion returns the starting question on the current page.
Syntax StartQuestion
4 Click in the Program Language field and select the program language from the
drop-down list, then choose Save Record from the Programs menu.
5 In the Scripts applet below, enter your required code, then select Save Record
from the Scripts menu.
NOTE: Each question has the option of using Siebel VB or Siebel eScript (JS). Every
question method has to use the same language per question. This means that the
languages can be different for different questions, but within the same question,
the languages must be the same.
Question_Enter
Question_Enter is called when the processing of a question is complete.
Syntax Question_Enter
Usage This post-event is called after the question has been entered and all pre-question
processing is complete. This is a good place to change the question text or set the
current value.
Question_PreLeave
Question_PreLeave is a pre-event called by certain methods before the user leaves
a question.
Syntax Question_PreLeave
Usage This pre-event is called on the question before the user leaves it by jumping or
proceeding (but not by Undo or Backup). This allows question-specific validation
to be performed.
End Function
Question_PreBranch
Question_PreBranch lets a question be replaced, for purposes of choosing a branch,
by the results of this function.
Syntax Question_PreBranch(answer)
Argument Description
Usage Question_PreBranch replaces the answer to a question by the results of this method.
It is declared as an integer. The normal branching logic of matching answers to
branches is performed, unless that event is overridden by this function. The final
value of the Answer argument is compared against the answers given to determine
which branch is to be taken out of this question. This allows programmatic
processing to determine branching (among preconfigured branches), regardless of
the actual stored answer. The value returned in the parameter will not be stored as
the answer to the question, but will be used to choose the answer used for
branching.
For example, if the caller supplies a bank account number, the function would
evaluate the number to determine what type of account it is and would branch to
questions for that type of account. The answer stored in the database, however,
would be the actual account number given.
Question_Leave
Question_Leave is called after branching from the question.
Syntax Question_Leave
Usage Question_Leave is called on the question after branching has been determined and
all built-in validations have been performed.
AnswerType
AnswerType returns the data type of the answer.
Syntax AnswerType
ssString 1
ssInteger 2
ssNumber 3
ssCurrency 4
ssBoolean 5
ssDate 6
ssTrue 7
ssDateTime 8
ssInformation 9
Usage AnswerType returns the data type of the answer that the current question collects.
Each data type is represented as an integer in the return value. AnswerType is
declared as an integer.
CurrencyFieldName
CurrencyFieldName returns the name of the field in which the currency code
is stored.
Syntax CurrencyFieldName
Returns The name of the field in which the currency code is stored, as a string.
Usage CurrencyFieldName returns the configured field name in which the currency code
is stored. It is declared as a string. This method can be used only with questions
that accept currency values (AnswerType = ssCurrency).
GetCurrentCurrencyCode
GetCurrentCurrencyCode returns the most recent currency code.
Syntax GetCurrentCurrencyCode
Returns The currency code entered in response to the current question, as a string.
Usage GetCurrentCurrencyCode returns the current currency code entered by the user for
a question if it is a currency question. The currency code may have changed many
times as the user worked through the script. GetCurrentCurrencyCode is declared
as a string.
GetCurrentExchangeDate
GetCurrentExchangeDate returns the exchange date for the most recent currency
question.
Syntax GetCurrentExchangeDate
Returns The current currency exchange date entered in response to the current question,
as a string.
Usage GetCurrentExchangeDate returns the current currency exchange date entered by the
user for this question (if a currency question). This may have changed many times
as the user worked through the script. GetCurrentExchangeDate is declared as a
string.
GetCurrentValue
GetCurrentValue returns the current answer to the current question.
Syntax GetCurrentValue
Returns The current value entered in response to the current question, as a string.
Usage GetCurrentValue returns the current value entered by the user for this question. This
may have changed many times as the user worked through the script.
GetCurrentValue is declared as a string.
Script.Finish
TheApplication.InvokeMethod "RunSmartScript", "Voicemail", "",
"ENU", "USD"
end if
See Also GetInitialValue on page 128, GetPriorValue on page 130, and SetCurrentValue on
page 136.
GetHelpText
If any help text is present for it, GetHelpText returns the help text for the current
question in the current language.
Syntax GetHelpText
Returns The language-specific help text associated with the question, as a string.
Usage Help text may be used as reference help text which can be captured and displayed
to a user using VB within a question text.
GetInitialCurrencyCode
GetInitialCurrencyCode returns the currency code for the question before the script
was executed.
Syntax GetInitialCurrencyCode
Usage GetInitialCurrencyCode returns the currency code for the question (if it is a currency
question) before the user started executing the script. This value is usually Empty
unless the value came from a business component field or was set up by Siebel VB
or Siebel eScript in a Script_Open procedure. GetInitialCurrencyCode is declared as
a string.
GetInitialExchangeDate
GetInitialExchangeDate returns the exchange date of a currency question before the
script was executed.
Syntax GetInitialExchangeDate
Returns The initial currency exchange date for a currency question, as a string.
Usage This function returns the initial currency exchange date for this question (if it is a
currency question) before the user started executing the script. This value is usually
Empty unless the value came from a business component field or was set up by
Siebel VB or Siebel eScript in a Script_Open procedure. GetInitialExchangeDate
is declared as a string.
GetInitialValue
GetInitialValue returns the value of an answer before the script was executed.
Syntax GetInitialValue
Usage GetIntialValue returns the value for the question before the user started executing
the script. This value is usually empty unless the value came from a business
component field or was set up as a Default Answer in the SmartScript Question
Administration view or by Siebel VB or Siebel eScript in a Script_Open procedure.
It is declared as a string.
GetPriorCurrencyCode
GetPriorCurrencyCode returns the currency code entered the previous time the
question was reached.
Syntax GetPriorCurrencyCode
Usage This method returns the currency code for the question (if it is a currency question)
before the user reached it most recently. This will be either the same value as
returned by GetInitialCurrencyCode, if the user has never entered the question,
or the value as returned by GetCurrentCurrencyCode, after the user left it the last
time. The function is usually used only for the current question.
GetPriorCurrencyCode is declared as a string.
GetPriorExchangeDate
GetPriorExchangeDate returns the exchange date code used the previous time a
question was reached.
Syntax GetPriorExchangeDate
Returns The previous exchange date code for the question, as a string.
Usage GetPriorExchangeDate returns the currency exchange date for this question (if a
currency question) before the user reached it most recently. This will be either the
same value as returned by GetInitialExchangeDate, if the user has never entered the
question, or the value as returned by GetCurrentExchangeDate, after the user left it
the last time. This function is usually used only for the current question.
GetPriorExchangeDate is declared as a string.
GetPriorValue
If the user has reached the question more than once, GetPriorValue returns the
previous answer.
Syntax GetPriorValue
Usage GetPriorValue returns the value for this question before the user reached it most
recently. This will be either the value returned by GetInitialValue, if the user has
never entered the question, or the value returned by GetCurrentValue, after the user
left it the last time. This function is usually used only for the current question.
GetPriorValue is declared as a string.
GetQuestionEnable
The GetQuestionEnable method returns the enable state of the current question.
Syntax GetQuestionEnable
Returns TRUE if the question is enabled and FALSE if the question field is disabled.
Usage The GetQuestionEnable method returns the enable state of the current question.
When the question is enabled, the user can modify the question's answer. If the
question is disabled, the question's answer is read-only.
end if
GetQuestionText
GetQuestionText returns the text of a question.
Syntax GetQuestionText
Usage GetQuestionText returns the displayed question text. (The original configured
text can be retrieved with OriginalQuestionText.) It is declared as a string.
QuestionText = GetQuestionText
End Sub
GetSaveBusComp
GetSaveBusComp returns the business component configured to store the answer.
Syntax GetSaveBusComp
Returns The instance of the business component in which the answer is to be stored,
as a BusComp.
Usage GetSaveBusComp returns the instance of the business component used to store the
answer in. If no field and business component are configured on this question, it
returns nothing. GetSaveBusComp is declared as type BusComp.
Set BC = Q.GetSaveBusComp
BC.NewRecord NewBefore
GetSaveBusObj
The GetSaveBusObj method returns the business object configured to store the
answer.
Syntax GetSaveBusObj
Returns The instance of the business object in which the answer is to be stored, as a BusObj.
Usage This function returns the instance of the business object used to store the answer.
If no business component or business object is configured on this question, it
returns a null set. GetSaveBusObj is declared as type BusObj.
HasDefaultAnswer
HasDefaultAnswer returns a Boolean value indicating whether or not the question
has a default answer.
Syntax HasDefaultAnswer
Returns TRUE if the question is configured with a default answer, FALSE if not.
MustAnswer
MustAnswer returns a value indicating whether or not the question is required.
Syntax MustAnswer
Usage This function returns one of three values indicating whether the question is set to
optional, required, or answer if reached.
OriginalQuestionText
OriginalQuestionText returns the original text of the question.
Syntax OriginalQuestionText
Usage This function returns the configured value of the question text. (The actual value
displayed is obtained through GetQuestionText.)
Orig = Question.OriginalQuestionText
Lname = Script.GetParameter ("PersonName")
SetQuestionText Text
Page
Page returns the name of the current page.
Syntax Page
Script
Script returns the name of the script containing the question. It is declared as type
SmartScript.
Syntax Script
Returns The name of the script containing the current question, as a SmartScript.
SaveBusCompName
SaveBusCompName returns the name of the business component that stores
the answer.
Syntax SaveBusCompName
Returns The name of the business component in which the answer is to be stored, as a
string.
Usage This method returns the configured business component in which the answer is
stored. This must be specified if a field is specified through SaveFieldName.
SaveBusObjName
SaveBusObjName returns the name of the business object that stores the answer.
Syntax SaveBusObjName
Returns The name of the business object in which the answer is to be stored, as a string.
Usage This function returns the configured business object in which the answer is stored.
This must be specified if a business component and field are specified through
SaveBusCompName and SaveFieldName, respectively. It is declared as a string.
SaveFieldName
SaveFieldName returns the name of the field that stores the answer.
Syntax SaveFieldName
Returns The name of the field in which the answer is to be stored, as a string.
Usage SaveFieldName returns the configured field name in which the answer value is
stored. This may not be present for all questions, as not all questions store their
answers in a field. (Some questions do not save answers at all.) It is declared as a
string.
SetCurrentValue
SetCurrentValue is a procedure to set the value for the answer to a question.
Argument Description
CurrencyCode The currency code for the currency in which the answer is to be
expressed, if the question is a currency question.
ExchangeDate The exchange date for the currency, if the question is a currency
question.
Usage The SetCurrentValue procedure sets the value for the question as though the user
had entered it. All validation and branching is activated. If the question is a
currency question (that is, the answer type is “Currency”), the currency code and
exchange date should also be specified in the function’s parameters. The currency
code and exchange date parameters are optional.
SetQuestionEnable
SetQuestionEnable sets the enable state of the current question.
Syntax SetQuestionEnable(Enabled)
Argument Description
Usage The SetQuestionEnable method sets the enable state of the current question. When
the question is enabled, the user can modify the question's answer. If the question
is disabled, the question's answer is read-only.
SetQuestionText
SetQuestionText changes the displayed text for a question.
Syntax SetQuestionText(text)
Argument Description
Usage This procedure changes the displayed question text. Note that no automatic
substitutions in the question text are supported.
else
end if
SetQuestionText(QuestionText)
SubstituteText
See “Other Preprogrammed SmartScript Methods” for a description and a VB
example of this method.
WasAnswered
WasAnswered returns a Boolean value indicating whether the question was
answered.
Syntax WasAnswered
Usage WasAnswered returns TRUE if the user answered this question or accepted a default
answer and FALSE otherwise. The exceptions to this are Information questions and
questions with an answer type of Boolean with no default answer; these questions
will return TRUE even if the agent merely passes through them.
Dynamic Questions
The following sample code implements dynamic insertion of an answer into a
question text. Specifically, it inserts the caller’s title and last name, as determined
by previous questions, into the target question. The question might be entered into
SmartScript as follows:
Siebel VB Code
Sub Question_Enter
Dim MM as String
Dim LastName as String
Dim Q as SmartScriptQuestion
Dim Text as String
Text = OriginalQuestionText
Text = SubstituteText (Text, “Contact.M/M”, MM)
Text = SubstituteText (Text, “Contact.Last Name”, LastName)
SetQuestionText (Text)
End Sub
var MM;
var LastName;
var Q;
var Text;
Finding a Contact
The following Siebel VB and Siebel eScript code samples look for the current caller
in the database.
Siebel VB Code
Sub Script_Open
ContactBC.ActivateField "Id"
ContactId = GetParameter("ContactId")
ContactBC.SetViewMode 3
ContactBC.SetSearchSpec "Id", ContactId
ContactBC.ExecuteQuery ForwardBackward
ContactExists = ContactBC.FirstRecord()
else
ContactBC.NewRecord NewBefore
end if
End Sub
var FirstQuestion;
var ContactBC;
var ContactId;
var ContactExists;
ContactBC.ActivateField ("Id");
ContactId = GetParameter ("ContactId");
if (ContactId != "")
{
ContactBC.SetViewMode (3);
ContactBC.SetSearchSpec ("Id", ContactId);
ContactBC.ExecuteQuery (ForwardBackward);
ContactExists = ContactBC.FirstRecord ();
if (!ContactExists)
{
ContactBC.NewRecord (NewBefore);
}
}
else
{
ContactBC.NewRecord (NewBefore);
Complex Branching
The following sample code demonstrates complex branching, setting branching
activity (and the answer to a question) based on whether a contact existed or a new
one was created. The code relies on the preceding sample for data acquisition and
database querying.
Siebel VB Code
Function Question_PreBranch (Answer As String) As Integer
ContactBC = GetSaveBusComp
ContactExists = ContactBC.FirstRecord()
if ContactExists then
Answer = “Y”
else
Answer = “N”
end if
Question_PreBranch = ContinueOperation
End Sub
var ContactBC;
var ContactExists;
if (ContactExists)
{
Answer = "Y";
else
Answer = "N";
} return (ContinueOperation);
Siebel VB Code
Function Question_PreLeave() As Integer
Script.Finish
End Function
Script().Finish ();
TheApplication().InvokeMethod ("RunSmartScript",
return (ContinueOperation);
Siebel VB Code
Dim SRBC as BusComp
NOTE: Before this function is called, the Save BusObj and the SaveBusComp
business components must have been specified for the current question, and an
instance of the business object must have been queried or created.
Topics include:
■ “Exporting Scripts”
■ “Importing Scripts”
Exporting Scripts
You can export scripts using a menu option available in the Scripts list on the
SmartScript Administration screen. When you export a script, all the elements
required for a script are copied to the destination file. When this file is imported into
another Siebel database, the script should have all the elements required to execute
successfully. Any conflicts with existing elements in the new database are resolved
during the import process.
To export a script
1 Navigate to Site Map > SmartScript Administration
2 Select the script you want to export in the Scripts list, then click the Scripts menu
and select Export Script.
3 In the Export dialog box, select the appropriate options regarding the data you
are exporting.
4 Click the hyperlink, and then select the location where you want the file saved.
5 In the Save As dialog box, enter the name of the file in which the script will be
stored.
You may use any file name, and it will have no impact on the SmartScript
definition that will be imported from this file. It may be necessary to select open
from the first window, and then save from the second window. You should
always make sure that the file is saved with the extension .sss.
Importing Scripts
You can import scripts using a menu option available in the Scripts list on the
SmartScript Administration screen. The import process checks many characteristics
of script elements for error conditions. For example, it checks references to make
sure that questions specified as branch destinations have been defined. When the
import process has finished, a log file listing any errors can be viewed by clicking a
link.
The import process transfers everything that does not cause an error or a conflict
from the .sss file into the database. When you import a script, the script to be
created or updated will be based on the script name for the exported script, not the
file name for the script or the name of the selected script when the Import button
is selected.
NOTE: When importing a SmartScript into a local SQL Anywhere Database in which
pages for the importing SmartScript already exist, delete the preexisting pages to
make sure that duplicate page branches are not created. This is necessary only
when importing into an SQL Anywhere Database.
Once a SmartScript has been imported, verify it by using the Verification Wizard,
and then perform normal testing.
To import a script
1 Navigate to Site Map > SmartScript Administration.
2 Click the Script menu and select Import Script.
3 In the Import Script form, click the select button, the fill in the required
information, then click Add.
If the “In Case of Error” drop-down appears, select how you want to handle
conflict resolution. See “Resolving Conflicts Encountered During Import” on
page 150 for details.
These options determine how SmartScript handles the conflict or error. You can add
the element, skip the import of that element, or update the existing element in the
database.
If errors or conflicts were encountered, SmartScript creates a log file. This log file
can be viewed when the import process has finished by clicking a link. Review the
conflicts and errors reported there and correct each element as necessary, using the
appropriate SmartScript Administration view.
If the contents of a picklist that appears in both the exporting and importing
databases are different, a conflict will occur. The contents of the picklist should be
updated to match in the databases prior to exporting the script.
For more information about modifying and configuring the Customer Dashboard,
see Siebel Tools Reference.
Example
The employee on an outbound telemarketing campaign logs into a predictive dialer
using the Siebel Communication toolbar. Upon logging into the campaign, the
predictive dialer begins contacting individuals and filters out answering machines,
no answers, and busy signals.
While the employee is greeting the caller, SmartScript opens and the appropriate
SmartScript for the campaign appears. By the time the employee has concluded
greeting the caller, the initiated SmartScript page is read and the employee has the
appropriate data to continue the interaction.
If at any point in time, the employee forgets key information about the customer or
contact (for example, name, phone number, and so on), the employee can refer to
the Dashboard.
If a call center employee regularly needs additional information about the contact,
the Dashboard can be customized to provide access to different views, so that the
employee can navigate to information related to the active customer.
If the caller gets accidentally disconnected, the employee can initiate an outbound
call to reestablish the connection.
■ Designing the customer dashboard layout with Siebel Tools. The customer
dashboard displays an applet based on a special VBC.
For more information about working with Siebel Tools, see Siebel Tools Reference.
■ Make sure that updated parameters are configured in Siebel Tools to reflect
the updated changes. See “To make sure updated parameters are configured in
Siebel Tools” on page 156 for instructions.
4 From the Show drop-down list, select Scripts, and then click the Translations
view tab.
5 In the Dashboard Text field in the Translations list, enter the names of the
variables from each question enclosed by brackets. For example: [Fname].
This notifies the SmartScript to pass this parameter to the dashboard. Only
parameters that have been configured in the Dashboard Business Service should
be entered in this field. You must also make sure that the SmartScript Player is
configured to notify the dashboard. The default state is TRUE. For more
information see Siebel Tools Reference.
6 Click Save.
3 Click on the Business Server User Properties to see the current dashboard
configuration.
4 Make sure that the parameters you entered in “To update to the Customer
Dashboard” match identically the values in this list.
This list is specifically used for updating the dashboard from a SmartScript.
You may also update the dashboard from a SmartScript using Siebel VB or Siebel
eScript. You must call the Persistent Customer Dashboard business service and
pass the appropriate parameters.
5 To commit your changes, click anywhere outside the modified row, or move
outside the row with the UP or DOWN arrow.
<swe:form name="SmartScriptForm">
<tr>
<td width="66%">
<td width="33%"> </td>
</tr>
</table>
<tr>
<td>
<tr class="AppletBlank">
<td colspan="5">
<tr>
<td class="AppletTitle"><nobr><swe:control
id="SSPageLabel"/></nobr></td>
<swe:control id="6">
</swe:control></td>
<span class=required>*</span>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="AppletStyle1">
<tr>
<td class="AppletBorder">
<tr>
<swe:error>
<tr>
<td width=20%> </td>
<swe:this property="FormattedHtml"/></td>
<td width=5%> </td>
</tr>
<tr>
<td colspan="3">
</swe:error>
</table>
Count = Dynamic: Denotes that the number of times the tag should
iterate its contents. This is dynamically determined at runtime
depending on the number of questions that need to be displayed.
<swe:control id="SSInfoQuestion">
<tr>
<td width=20%> </td>
<td width=5%> </td>
</tr>
<tr>
</table>
</swe:control>
<swe:control id="SSQuestion">
<tr>
<td width=20%> </td>
<td width=75%>
<div class="scLabel">
<swe:this property="RequiredIndicator"/>
<swe:this property="DisplayName"/>
</div>
<span class="scField">
<swe:this property="FormattedHtml"/></span>
</td>
<td width="5%"> </td>
</tr>
</table>
</swe:control>
</swe:for-each>
<!-Page Divider-->
<tr>
<td width=20%> </td>
<td width=75%> </td>
<td width=5%> </td>
</tr>
<tr>
<td> </td>
<td>
<tr>
<swe:control id="4">
</td>
</swe:control>
<swe:control id="3">
</td>
</swe:control>
<swe:control id="1">
</td>
</swe:control>
<swe:control id="5">
</td>
</swe:control>
<swe:control id="2">
</td>
</swe:control>
</tr>
</table>
</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</swe:form>
</table>
</swe:form>