Oracle - Employee Salary Information

Oracle - Employee Salary Information

Organisations can utilize the Xtend IVR system to automate their employee salary information. Employees can call IVR and directly retrieve information related to their salary. Apart from reducing the workload of the staff this approach provides a faster way for accessing the salary details.

Download the evaluation version of Xtend IVR and install the telephony application in your system. Run the sample script from the Script Editor. Click here to refer the code.

The automated attendant will work as given below:

  • IVR waits for the call
  • Caller dials the number, IVR accepts the call and plays the Welcome message
  • IVR asks the employee to enter the Employee Number and Department Number
  • Validates the entries in the database and informs the salary to the employee
Download the source file zip download for the Employee Salary Information using Oracle


$db = "Provider=MSDAORA.1;User ID=scott;Password=tiger;Data Source=xtendora;
							Persist Security Info=False"
				

$retrycount = 2
MAIN:
	display "Waiting for call . . ."
	
	
	answer 1
	
	
	play "Welcome.wav"
	play "silence.wav"
	
ACCEPT_ACCNO:
	display "Accept employee number"
	play "silence.wav"
	$retry = $retrycount
	while $retry > 0
		play "empno.wav"
		$EmpNo = Input(4,5)
		if $EmpNo = ""
			
			if $retry = $retrycount
				play "advice.wav"
			endif
		else
			break
		endif
		$retry -= 1
	endwhile
	if $EmpNo = "" then goto GOODBYE
	
ACCEPT_PIN:
	display "Accept DEPT number"
	play "silence.wav"
	$retry = $retrycount
	while $retry > 0
		play "department.wav"
		$DeptNo = Input(2,5)
		if $DeptNo <> ""
			break
		endif
		$retry -= 1
	endwhile
	if $DeptNo == "" then goto GOODBYE
	
	display "Validating User"
	
	
	$sql = format("select * from EMP where EMPNO = %d and DEPTNO = %d",$EmpNo,$DeptNo)
	$dbalias = db.RunSQL($db, $sql)
	if $dbalias.eof
		play "notfound.wav"
		goto GOODBYE
	endif
	display $dbalias.ENAME
	play "salary.wav"
	
	
	$wave = Money2Wav($dbalias.SAL)
	play $wave
	wait 0

GOODBYE:
	
	display "Terminating Call"
	play "silence.wav"
	play "goodbye.wav"
	hangup
	goto MAIN


ONHANGUP:
	hangup
	goto MAIN


ONSYSTEMERROR:
	log $error
	display $error
	hangup
	goto MAIN