Cisco Cisco Unified Customer Voice Portal 10.0(1) User Guide
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)
33
menu normally. A tricky part of the rule is that it must deal with the day, month, and the year,
making sure that callers from previous years and future years are handled correctly as well. Since
the current state of the XML format does not allow date comparisons, a way must be determined
to make this restriction. The solution is to use multiple rules which progressively get more
restrictive in a sort of process-of-elimination manner. Since all conditions are to be handled, the
rule must include those who do not hear the changed message using the same scheme (there is no
need to use the default exit state). In English, the rules are:
making sure that callers from previous years and future years are handled correctly as well. Since
the current state of the XML format does not allow date comparisons, a way must be determined
to make this restriction. The solution is to use multiple rules which progressively get more
restrictive in a sort of process-of-elimination manner. Since all conditions are to be handled, the
rule must include those who do not hear the changed message using the same scheme (there is no
need to use the default exit state). In English, the rules are:
Rule Expression
Exit State
1
The year the last time the caller triggered the flag “account menu”
is less than 2004
is less than 2004
play changed
2
The year the last time the caller triggered the flag “account menu”
is greater than 2004
is greater than 2004
normal
Note that at this time, if the above two rules were not triggered, the caller triggered the flag in the
year 2004.
3
year 2004.
3
The month of the year the last time the caller triggered the flag
“account menu” is less than 6
“account menu” is less than 6
play changed
4
The month of the year the last time the caller triggered the flag
“account menu” is greater than 6
“account menu” is greater than 6
normal
Note that at this time, if the above two rules were not triggered, the caller triggered the flag in
June 2002.
5
June 2002.
5
The day of the month the last time the caller triggered the flag
“account menu” is less than or equal to 15
“account menu” is less than or equal to 15
play changed
6
The day of the month the last time the caller triggered the flag
“account menu” is greater than 15
“account menu” is greater than 15
normal
The Unified CVP decision element XML file would be named “IsCallerAWinner” and be saved
in
in
AUDIUM_HOME/applications/Example3/data/misc.
The content of the XML file will be:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE knowledge_base SYSTEM "../../../../dtds/DecisionKnowledgeBase.dtd">
<knowledge_base>
<rule name="NewMessageTest">
<exit_state name="play changed" conjugate="and">
<number operator="less">
<historical_data type="last_date_time" field="year">
<caller/>
<flag name="account menu"/>
</historical_data>
<constant_number value="2004"/>
</number>
</exit_state>
<!DOCTYPE knowledge_base SYSTEM "../../../../dtds/DecisionKnowledgeBase.dtd">
<knowledge_base>
<rule name="NewMessageTest">
<exit_state name="play changed" conjugate="and">
<number operator="less">
<historical_data type="last_date_time" field="year">
<caller/>
<flag name="account menu"/>
</historical_data>
<constant_number value="2004"/>
</number>
</exit_state>