Skip to content

Commit

Permalink
Rule library
Browse files Browse the repository at this point in the history
This commit relates to adding a post for the rule library and updating the title on the home page
  • Loading branch information
spencer-phil committed Mar 4, 2025
1 parent 82103e2 commit de2ff69
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 1 deletion.
Binary file added app/images/rule-library/addrule1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/rule-library/addrule2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/rule-library/library1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/rule-library/library2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
homepage: true
layout: product
title: A design history for the Select People for Invitations service
title: A design history for the Select People for Invitation (SPI) service
description: A permanent record of how the service has developed over time.
pagination:
data: collections.all
Expand Down
50 changes: 50 additions & 0 deletions app/posts/2025-03-04-rule-library.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: Rule library
description: An easier way to add rules
date: 2025-03-04
tags:
- service
- prototype
- content
- user research
- rules
---

## Exec summary
Overall the rule library value was considered to add significant value, but we plan to revisit it in the future as we believe there are some improvements that we can make - in particular to do with rules involving ages and dates.

## What are rules?
As shown in the diagram on the [brief description of this service](/what-is-this-service/), the way SPI works is by removing people from an initial dataset (the cohorts of eligible people), so that the people remaining are the ones we want to contact at that particular time.

The way we remove people from an invitation batch is by applying "rules" such as:
- don't invite people who are resident in a care home (because they have alternative vaccination arrangements)
- don't invite people outside of certain ICBs (because we're inviting where there is good appointment capacity)
- don't invite people who are too old or too young (usually people outside of the elgible age range shouldn't be in our base cohorts in the first place, but sometimes PDS records are corrected inbetween the cohorts being generated and the invitations being sent, so someone might have initially appeared eligible, but in fact they aren't)

Rules are also used to define which message content and communication channels should be used, e.g.
- Send people under 16 version 1
- Send people over 16 version 2
- send people with a braille preference the braille letter

## How do users add rules without the library
We initially designed the service with a highly flexible interface for constructing rules. This was so that for the MVP it was possible to construct any type of rule that was required. Feedback confirmed what we suspected, which is that although the flexibility is useful (and was the right thing to do for MVP), it is also relatively complicated.
![UI for building a rule](addrule1.jpg)

As can be seen in the image below the lists of options available for configuring rules are lengthy, and detailed knowledge is required to know which operators to use with which attributes to acheive the desired outcome. Additionally the syntax for comparators, though powerful, isn't always discoverable or intuitve e.g. for dates it's possible to use advanced features like offsets.
![UI for building a rule, showing long list of attributes](addrule2.png)

## How can users add rules using the library
The idea of the library was that it could potentially have 3 types of benefit:
1. a quick way to add frequently used rules
2. confidence that rules are constructed correctly and will work as expected
3. a way to learn about how rules are constructed, and the ability to copy a library rule as the basis to create a custom rule​

We worked with the current users to understand which rules would be most useful to them in the library. We then came up with a simple design for choosing rules from the library.
![List of library rules](library1.png)

After a rule has been chosen, the user is taken to the normal "rule builder" page, with the values pre-populated. They will need to adjust some parameters e.g. in this case the "~X~" which represents the number of years.
![The rule builder with the library values prepopulated](library2.png)

This approach was found to work reasonably well and allowed us to release value quickly by reusing screens and building on functionality which already exists. Users found it clear how to select rules from the library, though some usability issues were noted around having to manually find the right parts of strings to update on the pre-populated "rule builder" page.

Overall the rule library value was considered to add significant value, but we plan to revisit it in the future as we believe there are some improvements that we can make - in particular to do with rules involving ages and dates.

0 comments on commit de2ff69

Please sign in to comment.