When an operator searches an NPT, Community Alerts looks up that team in local SQL. Pinpoint is not called. The chosen NPT ids are expanded through BoundaryRelations to distinct postcodes. Recipients are watch locations whose postcode is in that set, not the subscriber’s home postcode. Distinct subscribers are then sent to Notify.
flowchart LR search[Search NPT in SQL] select[Store selected NPT ids] expand[Expand via BoundaryRelations] match[Match watch postcodes] notify[Distinct subscribers to Notify] search --> select --> expand --> match --> notify
| Step | What happens | System |
|---|---|---|
| 1. Search |
The operator types an NPT code or name. Community Alerts looks up Boundaries where BEAT_CODE or BEAT_NAME contains that text
|
Community Alerts |
| 2. Select | The operator ticks one or more NPT rows. The app stores those boundary ids, not postcodes | Community Alerts |
| 3. Expand |
For each selected NPT, read BoundaryRelations where that NPT is the parent. Collect each child boundary’s POSTCODE. Uppercase, strip spaces, and keep the distinct values
|
Community Alerts |
| 4. Match watches |
Find AlertLocations whose Postcode is in that set. Apply watch-type and coordinator rules. Ignore deleted subscribers
|
Community Alerts |
| 5. Recipients | Distinct subscribers from those watch locations. Queue email, SMS, or voice via Notify | Community Alerts, then Notify |
A subscriber has a home postcode, used for the address and login check. Alerts do not use that.
Each subscriber can have many watch locations. Each watch location is a postcode string. That string is compared to the expanded NPT postcode list.
There is no link from a subscriber record to an NPT. If someone lives in one NPT but watches postcode BS1 5AH, they are alerted when the NPT that contains BS1 5AH is selected, not when their home NPT is selected.
Users think they are searching an NPT. The system is searching a list of postcodes that overlapped that NPT polygon when the boundary data was last built.
Overlap uses Intersects, not “wholly inside”, so a postcode that straddles two NPTs can appear in both.
Settlement and LPA can use the same expansion in the database. Operators cannot choose them in the current send-alert search.