diff --git a/projects/appointment-reminders-and-delius/README.md b/projects/appointment-reminders-and-delius/README.md index 4515740f75..a4550237e2 100644 --- a/projects/appointment-reminders-and-delius/README.md +++ b/projects/appointment-reminders-and-delius/README.md @@ -1,3 +1,35 @@ -# appointment-reminders-and-delius +# Appointment Reminders and Delius -// TODO Describe the service \ No newline at end of file +## Business Need + +- Sending appointment reminders to people on probation to help improve compliance with supervision activities +- Providing a method of automating the sending of SMS messages via GOV.UK Notify +- Standardising the process of sending SMS appointment reminders across regions + +## Workflows + +### Sending SMS Reminders Based on Delius Data + +The service will send appointment reminders to people on probation by combining the data in _Delius_ and the [GOV.UK Notify](https://www.notifications.service.gov.uk/) service. Data is gathered from Delius, validated and templated SMS messages are sent using the GOV.UK Notify API. + +![Workflow Map](./tech-docs/source/img/east-of-england-upw-reminders.svg) + +### Downloading CSV Data + +A CSV file of the appointment reminders that the service will send on a particular day can be accessed via an API endpoint + +## Interfaces + +### Scheduled Job + +- SMS messages are send via a scheduled job +- Telemetry is send to Application Insights for each SMS message sent + +### API Access Control + +API endpoints are secured by roles supplied by the HMPPS Auth client used in +the requests + +| API Endpoint | Required Role | +|-----------------------|--------------------------------------------------| +| /upw-appointments.csv | PROBATION\_API\_\_REMINDERS\_\_UPW\_APPOINTMENTS | diff --git a/projects/appointment-reminders-and-delius/tech-docs/diag/east-of-england-upw-reminders.d2 b/projects/appointment-reminders-and-delius/tech-docs/diag/east-of-england-upw-reminders.d2 new file mode 100644 index 0000000000..eae41899e9 --- /dev/null +++ b/projects/appointment-reminders-and-delius/tech-docs/diag/east-of-england-upw-reminders.d2 @@ -0,0 +1,79 @@ +# Appointment SMS Flow + +direction: down + +style { ...@../../../../script/style.style } +vars { ...@../../../../script/style.vars } +** { ...@../../../../script/style.all-style } + +data: Delius Data { + "" { + explanation: |md + Name, mobile number and appointment date + | + } +} + +deduplicate: Deduplication { + "" { + explanation: |md + Where there are multiple appointments for a mobile number\ + only send a single reminder + | + } +} + +validate: Validation { + validate_person: Person Validation { + explanation: |md + - The person is not in custody or on remand + - The person is not unlawfully at large + - The person is not Limited Access + | + } + + validate_comms: Communication Validation { + explanation: |md + - The mobile number is formatted correctly + - The person has not opted out of SMS contacts + | + } + + validate_activity: Activity Validation { + explanation: |md + - The person has an active unpaid work requirement + - The unpaid work requirement is not related to\ + Education, Training and Employment + - There is time remaining on the unpaid work requirement + - The appointment does not have an outcome + | + } +} + +ok: Validation OK +fail: Validation Fail + +send: Send SMS { + notify: GOV.UK Notify { + explanation: |md + Send SMS appointment reminder to person on probation + | + } +} + +end1: End { + shape: circle +} + +end2: End { + shape: circle +} + +data -> validate +validate -> ok: OK +validate -> fail: Fail + +ok -> deduplicate +deduplicate -> send +send -> end1 +fail -> end2 diff --git a/projects/appointment-reminders-and-delius/tech-docs/source/img/east-of-england-upw-reminders.svg b/projects/appointment-reminders-and-delius/tech-docs/source/img/east-of-england-upw-reminders.svg new file mode 100644 index 0000000000..77b7928bf6 --- /dev/null +++ b/projects/appointment-reminders-and-delius/tech-docs/source/img/east-of-england-upw-reminders.svg @@ -0,0 +1,888 @@ +Delius DataDeduplicationValidationValidation OKValidation FailSend SMSEndEndPerson ValidationCommunication ValidationActivity ValidationGOV.UK Notify

Name, mobile number and appointment date

+

Where there are multiple appointments for a mobile number
+only send a single reminder

+
    +
  • The person is not in custody or on remand
  • +
  • The person is not unlawfully at large
  • +
  • The person is not Limited Access
  • +
+
    +
  • The mobile number is formatted correctly
  • +
  • The person has not opted out of SMS contacts
  • +
+
    +
  • The person has an active unpaid work requirement
  • +
  • The unpaid work requirement is not related to
    +Education, Training and Employment
  • +
  • There is time remaining on the unpaid work requirement
  • +
  • The appointment does not have an outcome
  • +
+

Send SMS appointment reminder to person on probation

+
OKFail + + + + + + + + + + + + + + + + + + + + + +