-
Notifications
You must be signed in to change notification settings - Fork 9
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
API can accept VA identifiers #190
Comments
Co-authored-by: Filip Fafara <[email protected]>
if there is no "to" field, the notification can still be processed
…the notification using the va_identifier_type as the key
If we want to move models into a directory and have each be it's own file, these are some instructions. Basically, we would need to change where we call To note: if you try creating a directory "models," the app thinks you're trying to reference the |
…pe to id_type, and va_identifier_value to id_value for consistency across DB, model, and code
… and recipient identifiers present
merged to master! 🤞 |
things to finish off before Review:
when in QA:
|
…removes old openapi doc used to brainstorm the recipient identifier schemas
…f the env variable is equal to the string True, since env var is always a string, not a boolean move the feature flag out of config, directly referencing environment variables from accept_recipient_idenifiers_enabled()
Co-authored-by: Marisa Hoenig <[email protected]> Co-authored-by: Filip Fafara <[email protected]> Co-authored-by: Saman Moshafi <[email protected]> Co-authored-by: Jasmin Smith <[email protected]>
While mobbing, we tested in VAEC dev and staging. With feature toggle on in dev and feature toggle off in staging, we saw the expected behavior and logs. We still need to test in VAEC staging now that we turned the toggle on, but I'm moving this to review. |
Two potential issues discovered during testing:
|
@jsmithVA For the celery logs, these were just filler messages to be changed later. I think including the request-id, if wanted, can be included in the card that actually queries VA Profile/MPI. |
Link to test plan document:here |
Error message issue will be handled under issue 258 |
…2.3.1" This reverts commit 38b0998.
Value Statement:
As a consumer of VANotify
I want to send a notification using a recipient's VA identifiers
So that I don't have to find the recipient's contact details myself
Example
Acceptance Criteria
1. Valid
sms
requestsGIVEN a service and template have been configured on VANotify
WHEN I make a request to send an
sms
notificationAND I don't specify
phone_number
AND I do specify
va_identifier
THEN the API does not reject the request as invalid
2. Valid
email
requestsGIVEN a service and template have been configured on VANotify
WHEN I make a request to send an
email
notificationAND I don't specify
email_address
AND I do specify
va_identifier
THEN the API does not reject the request as invalid
3. Invalid requests
GIVEN a service and template have been configured on VANotify
WHEN I make a request to send a notification
AND I don't specify contact information
AND I don't specify
va_identifier
OR I specify
va_identifier
, but it does not contain bothtype
andvalue
THEN the API rejects the request as invalid
4. Specific
identifier_type
sGIVEN a service and template have been configured on VANotify
WHEN I make a request to send a notification
AND I specify
va_identifier
AND
va_identifier.type
is not one of:PID
,ICN
,VA_PROFILE_ID
THEN the API rejects the request as invalid
5. Persisting identifiers
GIVEN a service and template have been configured on VANotify
WHEN I make a request to send a notification
AND I specify
va_identifier
THEN the
notification_id
,va_identifier_type
, andva_identifier_value
should be persisted in a new table, callednotification_identifiers
recipient_identifiers
6. Don't send it just yet
GIVEN a service and template have been configured on VANotify
WHEN I make a request to send a notification
AND I don't specify contact information
AND I specify
va_identifier
THEN the notification is not sent - notification delivery will come in a later story
7.
VA_PROFILE_ID
GIVEN a service and template have been configured on VANotify
WHEN I make a request to send a notification
AND I don't specify contact information
AND I specify
va_identifier
AND
va_identifier.type
isVA_PROFILE_ID
THEN a Celery task
lookup_contact_info
should be enqueuedAND that task, upon execution, should log some information about the notification, and a message indicating that we should lookup contact information
8. Other VA identifiers
GIVEN a service and template have been configured on VANotify
WHEN I make a request to send a notification
AND I don't specify contact information
AND I specify
va_identifier
AND
va_identifier.type
is notVA_PROFILE_ID
THEN a Celery task
lookup_va_profile_id
should be enqueuedAND that task, upon execution, should log some information about the notification, and a message indicating that we should lookup VA Profile ID
9. Contact info AND identifiers
GIVEN a service and template have been configured on VANotify
WHEN I make a request to send a notification
AND I specify contact information
AND I specify
va_identifier
THEN the notification is sent as normal
AND the identifiers are persisted
AND no tasks to lookup contact information are enqueued (because we've already got the contact information! hooray)
Checklist:
notification_schemas.py
, change API to acceptva_identifier
, as described abovepost_notifications.py
, persist those new parameters if providedrecipient_identifiers
Add schema forRecipientIdentifiersHistory
, which should be linked toNotificationsHistory
Migration to create new tablerecipient_identifiers_history
When notification is moved to-> Because recipient information is not stored in NotificationHistory, we will not carry over RecipientIdentifiers information into a history table.notifications_history
, the matching recipient identifiers should move to history tableto
column inNotification
nullable. Since that's where we store the recipient, and we won't have contact information yetpost_notifications.py
, enqueue the appropriate new Celery task if the new parameters have been providedAssumptions:
Additional Info/Resources:
Out of Scope:
lookup_vet360_id
andlookup_contact_info
don't need to anything for now - they should just log, so we know they're runningOpen Questions:
What should be the name for the new table, which stores VA identifiers?-notification_identifiers
, why notWhat values of- seemingly:identifier_type
should the API accept?PID
,ICN
,VA_PROFILE_ID
List of documentation that needs to be updated- just openapi and postman collectionConfirm reject if more than one identifier is sent- not possible given the API designConfirm if email and identifiers provided, then the email will take precedence. Both values must be stored in the table- added AC9 - if a consumer gives us contact info AND identifiers, we just send the notification, but persist everything they sent usInclude updating User Flows (need to validate and then delete OOS)- hell yeswe have special behaviour forVA_PROFILE_ID
- if the consumer provides that, we can go straight to VA Profile, without going to MPI. is this the case for any other identifiers?The text was updated successfully, but these errors were encountered: