CallFire XML Javascript
Java Script
CallFire enables you to use basic java script within your Callfire XML tags. The supported tags are [setvar tag], [stash tag], [if tag], [equal tag] and [notEqual tag].
Examples
|
|
The following example checks to see whether ${call.lastinput} ( is greater than 5700 and less that 6305 ) or ( greater than 102 and less than 300 )
<if expr='(${call.lastinput} > 5700 && ${call.lastinput} < 6305) ||
(${call.lastinput} > 102 && ${call.lastinput} < 300)'>
<goto>read-my-pin</goto>
</if>
A simple way to increment a variable might be the following:
<setvar varname="questions">${questions} + 1</setvar>
In built javascript functions are also available -- example isNAN(string):
<if expr="isNaN('${call.lastinput}') || '${call.lastinput}' == ''">
More JavaScript
For more information visit this list of built in functions!