Skip to content

VA Notify

Ki Mau edited this page Sep 12, 2022 · 37 revisions

VA Notify

Overview

VA Notify is the external service that Caseflow uses to notify appellants of status changes on an appeal. The process starts whenever a tracked event changes on an appeal. The Appellant Notification module will create a custom JSON payload that it sends to an SQS queue using a Ruby Gem called Shoryuken. The SQS queue will asynchronously start to make API calls to VA Notify with the custom payload created within the Appellant Notification module. VA Notify will then send a callback to Caseflow with a status based on receipt of the payload. Caseflow will then make a record of the notification within the Notifications table as well as the Notifications Event table. VA Notify will then check the appellant's communication preferences by querying another VA Service called VA Profile using the participant id of the appellant that it was sent by Caseflow. VA Notify will then use the template id and appeal id (UUID for AMA Appeals or Vacols ID for Legacy Appeals) that it received from Caseflow to generate a notification that it will send to the appellant based on their communication preferences.

Business Impact

Scope

Additional Information

Prepend

Prepend is a method that is baked into ruby. Prepend allows additional functionality to be added to methods that already exists in Caseflow without having to alter the original method definition. The benefit of this is that all tracked statuses can be housed in one singular directory rather than altering already existing method definitions directly within their original file. A good example of how this works can be seen while looking at the method docket_appeal. This method is defined within app/models/pre_docket_task.rb. Rather than changing the method definition directly within the class so that it will now notify the appellant using the Appellant Notification Module, we can simply add that functionality to it outside of the pre_docket_task class by using prepend. All it takes to do this is adding a prepend statement at the top of the pre_docket_task class. In this instance, that would look like prepend AppealDocketed. The AppealDocketed module that is being prepended houses the updated functionality of the original docket_appeal method that is defined in the pre_docket_task class. This method will have super in it so that it inherits the original functionality as well as our notification method AppellantNotification.notify_appellant(appeal, @@template_name). This allows aspects of Appellant Notification to easily be altered in one directory rather than having to hunt down the notification methods all throughout Caseflow.

Clone this wiki locally