Voice Notification
info
For sake of simplicity, we will assume our notification service is designed to call a person, announce their upcoming doctor appointment and request them to press 1 to acknowledge their appointment, or press 2 to have some call them to reschedule the appointment.
The CXML Document Response
In the below CXML document, the following elements are provided dynamically, based upon the token
received from the
previous step.
Element | Description |
---|---|
{$fullname} | The receipient full name. |
{$dayOfWeek} | The day of the week of the appointment, Eg. Monday. |
{$dayOfMonth} | The day of the month of the appointment, Eg. 12. |
{$nameOfMonth} | The name of the month of the appointment, Eg. March. |
{$year} | The year of the appointment, Eg. 2024. |
<Response>
<Say>Hello {$fullname}, this is an automatic reminder about your upcoming appointment.</Say>
<Gather action="https://example.com/processInput" loop="3">
<Say>Scheduled for {$dayOfWeek}, dated {$dayOfMonth} of {$nameOfMonth}, {$year}.</Say>
<Say>To confirm your appointment, press 1. To have a member of staff call you for rescheduling, press 2.</Say>
<Pause length="5" />
</Gather>
</Response>
Once the destination
picks up the call, the following CXML will be served to them waiting for this input. Once they
press a button on their keypad, that input will be submitted to the endpoint indicated by the action, which in our case
is set to https://example.com/processInput
(aka: Input Processor).