Cancel a Reservation
If users don't want to make a reservation, they can also choose to cancel existing ones.
Existing Reservations
Add an element called
to the If you collapse the element, your application should look like:In
add 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 for
Make the name and the value This will save the number of reservations made.If
is 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 called
or In , create a actionCreate a
action that saves into a variable, Then create a action.In
incrementApplication So Far
To see the IVR application up until here, open beginning of this lesson.
in the package provided at the