For the MVP of this project, we would like to configure an SMS notification system that will allow users to receive notifications about events pertaining to specific pieces of legislation they care about.
There will be two primary components of the system - a conversational "bot" interface via SMS, and a background notification system that sends out periodic updates.
- User texts
hello
to a Twilio number for the notification system - User receives a welcome message detailing the commands that can be sent to the system
- User texts
list
to see the types of data they can subscribe to - User texts
subscribe bill
to subscribe for notifications on a specific piece of legislation. The system responds by asking for their state of residence. - User texts in "mn"
- System prompts for the name of the piece of legislation
- User texts "HF 20210"
- User is now subscribed for updates on House File 90210 in the MN state legislature
- (meta) - A Notify binding is created with a tag
bill;mn;hf90210
- User texts
unsub
to unsubscribe from a notification - The system responds with a numbered list of subscriptions
- The user texts back in the number of the subscription they want to cancel
- The system removes notifications on that particular subscription by removing the tag for the Notify binding. (meta - think the binding needs to be deleted and re-created for this)
The system will periodically poll open states for new information related to pieces of legislation and upcoming events (hearings, committees, etc). When the system determines what information is new since the last time the API was polled, It will construct a Notify tag dynamically in the format:
<subscription type>;<state/other data>;<bill ID>
That batch of notifications is sent to Notify, who then determines which of the subscribed users to send a Notification to.