Cancel a Reservation
If users don't want to make a reservation, they can also choose to cancel existing ones.
Add an element calledto the If you collapse the element, your application should look like:
Inadd a action called . This will call a Java method that will query a database for the number of rooms reserved by this caller. You can write your own method if you wish. Fill in the information similar to below. Remember that the caller ID is saved in the variable, .
Add another action forMake the name and the value This will save the number of reservations made.
Ifis equal to 0, the program will transition this person to the element. Otherwise, if is greater than 0, transition this person to a menu element. This element will handle cancellations.
Keep or Cancel
will read out the first reservation. Add a variable in called with a value of 0. This will keep track of which reservation the program is currently on. The first item starts at 0. First, retrieve it from the database with a action. Fill in the information similar to below if you are using our Java files.
Create and set three other variables.
For the prompt, it will read out the variables we just saved. The program will tell the caller the room and time of the reservation. We can put the variables into the prompts because actions are executed before prompts. Then, tell them to press 1 to cancel or 2 to continue.
Now, create two prompt elements calledor In , create a action
Create aaction that saves into a variable, Then create a action.
Application So Far
To see the IVR application up until here, open beginning of this lesson.in the package provided at the