Cisco Cisco Unified Customer Voice Portal 11.0(1) User Guide

Page of 107
C
HAPTER 
2:
 
V
OICE
XML
 
S
ERVER 
C
OMPONENTS IN 
D
ETAIL
 
 
V
OICE
XML
 
S
ERVER 
U
SER 
G
UIDE 
 
 
 
FOR 
C
ISCO 
U
NIFIED 
C
USTOMER 
V
OICE 
P
ORTAL 
R
ELEASE 
4.0(1) 
 
 
 
 
 
31
<?xml version="1.0" encoding="ISO-8859-1"?> 
<!DOCTYPE knowledge_base SYSTEM "../../../../dtds/DecisionKnowledgeBase.dtd"> 
<knowledge_base> 
   <rule name="CalledFromAni"> 
      <exit_state name="say_welcome_back" conjugate="and"> 
         <boolean check_existence="no" value="true">          
             <user_info> 
                <called_from_ani/> 
             </user_info>  
         </boolean> 
      </exit_state> 
     <exit_state name="say_welcome" conjugate="and"> 
         <boolean check_existence="no" value="false">          
             <user_info> 
                <called_from_ani/> 
             </user_info>  
         </boolean> 
      </exit_state> 
  </rule> 
</knowledge_base> 
XML Decision Example #2 
An application named “Example2” randomly chooses two letters of the alphabet and gives a 
prize to the caller whose name begins with either letter. The letters are chosen by an action 
element named “GetRandomLetter” and stored in element data named “letter1” and “letter2”.  
A decision element named “IsCallerAWinner” would be needed which has three exit states: 
    For a user whose name begins with either letter. 
    For users whose name does not begin with the letters. 
    For users whose name is not in the records (this could be an error or could prompt the 
application to ask the user to register on the website).  
Even if the application assumes that all users will have their names on file, it is prudent to add 
this third exit state just to make sure. In this example, the default exit state will be set to when the 
users do not match. 
In English, the rules are: 
Rule  Expression 
Exit State
The caller’s name begins with the value stored in the element 
“GetRandomLetter” with the variable name “letter1” or begins with the value 
stored in the element “GetRandomLetter” with the variable name “letter2” 
is a 
winner 
The caller’s name does not begin with the value stored in the element 
“GetRandomLetter” with the variable name “letter1” and does not begin with 
the value stored in the element “GetRandomLetter” with the variable name 
“letter2” 
not a 
winner 
The caller’s name does not exist 
no name