Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send VA Profile data on Email Notification Delivery status #1770

Open
13 tasks
MackHalliday opened this issue May 1, 2024 · 2 comments
Open
13 tasks

Send VA Profile data on Email Notification Delivery status #1770

MackHalliday opened this issue May 1, 2024 · 2 comments

Comments

@MackHalliday
Copy link

MackHalliday commented May 1, 2024

User Story - Business Need

VA Profile is interested in tracking email bounces so that they might offer data to their partners regarding the quality of email data/the likelihood of delivery success. VA Notify needs to send VA Profile the delivery status of ALL email notifications so VA Profile can track this information.

  • Ticket is understood, and QA has been contacted (if the ticket has a QA label).

User Story

As a developer on the VA Notify team
I want to send real-time email delivery status updates to VA Profile
So that the VA system can improve the management and reliability of email data, thereby enhancing communication with veterans and maintaining the organization's email reputation.

Additional Info and Resources

Engineering Checklist

  • Create POST request method in the VAProfileClient class to send delivery status data to VA Profile. The request body should mirror our current callback structure
    "id":"6ba01111-f3ee-4a45-9d04-234asdfb6abbb9a",  -- this is the notification id
    "reference":null,  
     "to":"",  -- this is the recipient's contact info
     "status":"delivered",  -- this will specify the delivery status of the notification
     "created_at":"2023-01-10T00:04:25.273410Z",  
     "completed_at":"2023-01-10T00:05:33.255911Z",  
     "sent_at":"2023-01-10T00:04:25.775363Z",  
     "notification_type":"SMS",   -- this is the channel/type of notification
     "status_reason": "", -- populated if there's additional context on the delivery status
     "provider":"pinpoint"
    
  • Add the bearer token value in the secrets section of the task definitions that extracts values from the parameter store using valueFrom in the secrets section
  • Hard code the path to their endpoint (example here)
  • Modify process_ses_results Celery Task to use new POST method. The status of ALL email notifications should be sent to VA Profile.
  • Implement error handling for new feature
  • Add unit testing
  • Add a feature flag in the Celery Tasks Template for all environments, set to False
  • Update documentation

Acceptance Criteria

  • When ANY email delivery status is processed, it should trigger a POST request to VA Profile with accurate and complete delivery status data in the DEV/PERF environments
    • SMS delivery data should NOT trigger a POST request to VA Profile
    • Email status data prior to the delivery attempt should NOT trigger a POST request to VA Profile
  • The system should handle errors gracefully and log them appropriately.
  • The feature should work seamlessly with existing infrastructure, with minimal need for new development.
  • All changes should be well-documented

QA Considerations

  • Verify that a delivery status triggers the POST request to VA Profile. This probably requires checking the logs. Work with developer to understand the logging.
  • Attempt negative test cases.
  • Verify the feature flag and parameters
  • Take a look at the documentation.
@cris-oddball cris-oddball changed the title Add ability to send VA Profile data on Email Notification Delivery status Send VA Profile data on Email Notification Delivery status May 2, 2024
@cris-oddball
Copy link

@kalbfled
Copy link
Member

Clarification about TTL: We don't want to lookup the access token every time we need to make a request to VA Profile. We discussed using the TTL cache package for this purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants