department-of-veterans-affairs / notification-api

Notification API
MIT License
16 stars 9 forks source link

#2009 - IIR - Update VAPRO Contact Lookup to Filter by Valid Phone Numbers #2010

Closed AdamKing0126 closed 2 months ago

AdamKing0126 commented 2 months ago

Description

VA-IIR 900

Contact Information coming from the V3 Profile API endpoint includes metadata about a telephone number's type (Mobile, Landline, VOIP, etc).

This PR includes a check against that metadata, in order to prevent SMS messages from being sent to landline or other undeliverable telephone numbers.

With the feature flag enabled, we will attempt to send SMS messages to these telephone classifications:

    {
      "classificationCode": 0,
      "classificationName": "MOBILE"
    },
    {
      "classificationCode": 5,
      "classificationName": "PREPAID"
    },
    {
      "classificationCode": 2,
      "classificationName": "VOIP"
    }

We will not attempt to send SMS messages to the following classifications. We will instead raise a NoContactInfoException:

   {
      "classificationCode": 3,
      "classificationName": "INVALID"
    },
    {
      "classificationCode": 4,
      "classificationName": "OTHER"
    },
    {
      "classificationCode": 1,
      "classificationName": "LANDLINE"
    }

If the classification code is not present in the data returned by Vet360, we will attempt to send the SMS message.

issue 2009

How Has This Been Tested?

Checklist