Membership notification system using AWS Pinpoint SMS!

The Challenge!

We had a voice notification system setup to alert member of our “club” about meetings and special events.  It consisted of a Dynamodb table that listed the phone numbers of the club membership; several lambda functions to access and update the database and an Amazon Connect instance to drive the telephone network requirements.   It worked well and got the job done.   Administrators would call up the application, enter a security authorization code, reset the database, record a new greeting and have a message delivered to every member within minutes.  The only complaint was having to maintain the membership database.  Members came and went and someone had to keep the database updated!

The Solution

Text had an interesting advantage!  Members would be able to add or delete themselves from the database themselves.  You would add yourself to the notification list by texting the work JOIN to the published notification number.  If you wanted to leave the list, simply send the word STOP to the same number and you would be removed.     This seem like a perfect solution, creating a self healing application that  would free if not eliminate the need for administrators.

AWS Pinpoint SMS to the rescue

Some of the components we used in the voice notification system were still required.  The dynamodb table and lambda were still critical components.  We did not need to use Amazon Connect for the telephone interface as AWS Pinpoint had an SMS interface.  We also needed to add SNS so that an incoming SMS message would trigger the lambda function to parse the message.     Pinpoint at the time we implemented the first version of the product did not have a facility for testing the application.   SMS spam has become such an issue, that you are now required to register your “campaign” and have the carrier approve it before you can send your fist text message.  There is now a newer version of Pinpoint SMS that has a test facility, but you are still required to obtain approval for your planned usage of the SMS functionality by carrier.   The process is frustrating and may take more than 30 days to complete, so be forewarned!

Bells and Whistle Options

Members would send the word JOIN to be added to the notification list, but who could send messages to the list?  The goal was to eliminate dependence on an administrator to send SMS messages that might originate from different parts of the organization.   To accomplish this, we created a SEND option!  We defined an environmental parameter that was the “secret password” and if this word was the first word in the incoming text message, Lambda would strip it off and forward the rest of that incoming message to the membership list.  (How kool is that)?   In our next version, we added the ability to customize the JOIN message to include firstName and lastName.

 

 

 

Amazon Connect Emergency Notification System

Emergency Notification?

There are a number of use cases for an application that can process a list of contacts to be notified by voice message of an impending event.  The event may be an emergency or  a notification of a community activity of interest to the list subscribers.   Even an appointment reminder falls into this category, so it is not necessary to have an actual ’emergency’ to have a requirement to mass notify a subscriber or customer group.

Basic Functional Spec

We had need of a “campaign dialer” like a solution and we found that all the parts we needed were available in AWS and Amazon Connect.   We hammered out a basic functional statement that had the following features:

  • The application requires the admin to authenticate;
  • A facility exists to record a new message to be played by the dialer;
  • The Dialer had to be able to simultaneously dial a large number of list members by contact group code;
  • The called individuals could enter a response code  to enable a transfer or follow up action (press 1 to transfer to an agent, Press 2 to reschedule,  etc.)
  • All contacts would be coded as notified even if they hung up, to eliminate redials.
  • A facility exists to reset the database in preparation of a new campaign.

The resulting solution contained the following modules:

  • Dialer Setup Module: (Authorization to use the notification system; Menu to reset database,  record new outbound voice message and initiate outbound campaign
  • DynamoDB table to contain the subscriber or customer list with associated fields to support the application (subscriber name, zip code, result code, etc.)
  • Lambda functions to read/write subscriber database and record audio to prompt file
  • Administrator notification of campaign dialer status through SNS

The solution is coded with four contact flows that enable group alerts to be sent simultaneously.  The AWS services used include Amazon Connect, DynamoDB, Lambda, Kinesis and optionally SNS. Depending on your contact center soft limits, the dialer will contact a minimum of 50 subscribers per phone call.  The following video details the configuration and the entire application is available in the DrVoIP.com store including the lambda functions and sample DB configurations.