Building an “Appointment Reminder and Phone Tree” using Amazon Connect!
The Phone Tree Concept
Phone Tree’s are have a wide range of use cases from emergency notification alerts, to social function meeting announcements and even appointment reminders! The generic functionality of this “Phone Tree” application, however, is similar in each use case. Generally, we want to place an outbound phone call to numbers that are in a database, play a recorded announcement, prompt and collect digits, update the contact list and even allow the caller to be transferred to a live agent, BOT or message center.
Example Application: meeting alert and dinner reservation!
In this example we want to contact all the members of the club and inform that that a dinner meeting is planned for a specific data and time. We want to know how many members will attend both the dinner and the meeting. The recorded announcement might be something like ‘The White Hat Hacker club will meet this Friday evening at the clubhouse at 7PM. Dinner will be served at 6PM and a reservation is required. Please press 1 if you are planning to attend the meeting and the dinner, press 2 if you are attending the meeting only, or press 3 to indicate you will not be in attendance at this meeting”. We also want to report the results of this survey to the meeting management via an email when all contacts have been notified.
This functionality could easily become an appointment reminder for a medical clinic. The clinic wants to alert all patients that have an appointment for tomorrow to be reminded of that appointment. This would use the same Phone Tree application and work the same, but the message might be a bit different: “This is Doctor VoIP’s office reminding you that you have an appointment tomorrow. Please press 1 to confirm the appointment or Press 2 to speak with a scheduling co-ordinator”.
Basic Configuration elements:
To get his application working we are using two major contact flows, a dynamoDB table containing the numbers to be dialed and three lambda functions. The lambda functions include the outbound dialer API, the reset database and the update database functions. The contact flows are used to validate the credentials of the dialer administrator, reset the database for fresh calls and to initialize the dialer function. The second contact flow is the contact flow that plays the outbound announcement, prompts and collects digits and then updates the database.
- DynamoDB Table – Minimally the table contains the number to be dialed and the status code. The dialer looks through the table list for entries that have a status code of zero. The table is updated with a new code based on the digits collected from the caller, or it marks the table with a status code of 3 to indicate the caller was contacted but did not enter any digits.
- Lambda dialer function ( DrVoIP-InitiateOutboundCampaign) (i.e. – reads the database and once the caller is dialed, transfers the caller to the contact flow that plays the announcement and collects the responses.
- Update database function – each phone call requires the database status code to be updated,
- Reset the database to zero function – Sometimes the list may be used more than once. For this reason we want to clear the current status code before initializing the dialer. Clearing the database resets all entries to a status code of zero.
- Contact flow Authorize Dialer – this is a simple contact flow that first asks the caller to input their ID number and PIN. This is done to validate the caller is authorized to initialize the dialer. Once validated, the application asks the caller to press 1 to initialize the database to zero or press 2 to initialize the dialer. Pressing 1 launches the reset database function to mark all entries with a zero status code. Press initializes the dialer and enables all entries with a status code of Zero to be contacted.
- Contact flow Announcement – this simple contact flow plays the announcement to the called party and prompts them to enter a digits in response. The digit is used by the update database function to set the status code equal to the digit entered by the caller.
- SNS – Simple Notification System is used to send a summary of the dialer results to anyone subscribed to the SNS notification. In this application we are using SNS to send an email to the meeting managers with a count of dinner reservations!
The application described above, works well and gets the job done! Sweet and simple, but what can we do to improve this application? Currently the outgoing announcement is hard coded in a ‘Play Prompt’ contact flow step. We have the option of enabling this to be a contact attribute that reads in a new prompt each time! Optionally, we could implement a “record to file” solution enabling someone to call in to the authorization contact flow and record a new announcement!
The dialer database is also manually maintained. It would be useful to enable either the table to be uploaded or to have a web administration interface so that folks do not have to have access to the AWS Management console to make use of the application. If you are using a CRM package, it might be better to have linkage to an external database.
Give us a call and we can implement this application or talk about building you a modified version! – DrVoIP