Skip to content

Commit a4e1e97

Browse files
authored
Content changes and new CSV files (#142)
1 parent f6bf024 commit a4e1e97

File tree

3 files changed

+67
-58
lines changed

3 files changed

+67
-58
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Personalisation field,Short length data example,Medium length data example,Long length data example
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Personalisation field,Short length data example,Medium length data example,Long length data example
2+
gpSurgeryName,New Surgery,"The Health Centre, Knaresborough Road",Church Avenue and Park Grove Medical Group Surgery
3+
gpSurgeryAddress,"1 New Lane, LS1 1AB","The Health Centre, Knaresborough Road, Knaresborough, HG1 1AB","Church Avenue and Park Grove Medical Group Surgery, 1 New Lane, Leeds, West Yorkshire, LS1 1AB, United Kingdom"
4+
gpSurgeryPhone,0300 123 1111,0300 123 2222,0300 123 3333
5+
appointmentDate,1 January 2027,2 January 2027,3 January 2027

docs/pages/using-nhs-notify/personalisation.md

Lines changed: 61 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,25 @@ permalink: /using-nhs-notify/personalisation
1010
section: Writing a message
1111
---
1212

13+
## Placing personalisation fields in your template
14+
1315
You can send personalised messages by adding personalisation fields to a single template.
1416

15-
Use double brackets to add a personalisation field to your content. Do not include spaces in your personalisation fields. For example:
17+
Use double brackets to add a personalisation field to your template. Do not include spaces in your personalisation fields. For example:
1618

1719
{% include components/inset-text.html
18-
text='Hello ((fullName)), your NHS Number is ((nhsNumber))'
20+
text='`Hello ((fullName)), your NHS Number is ((nhsNumber)). Your appointment is on ((appointmentDate)) at ((gpSurgery)).`'
1921
%}
2022

21-
You can use:
22-
23-
- [Personal Demographics Service (PDS) personalisation fields](#personal-demographics-service-pds-personalisation-fields)<!-- markdownlint-disable-line -->
24-
- [custom personalisation fields](#custom-personalisation-fields)
23+
You can read personalisation instructions while you’re editing a template.
2524

26-
You can see personalisation instructions while you’re editing a template.
25+
You can use [Personal Demographics Service (PDS) personalisation fields](#pds-personalisation-fields-automatic-data) and [custom personalisation fields](#custom-personalisation-fields-your-data) in the same template.
2726

28-
## Personal Demographics Service (PDS) personalisation fields
27+
## PDS personalisation fields (automatic data)
2928

30-
NHS Notify uses the [Personal Demographics Service (PDS)](https://digital.nhs.uk/services/personal-demographics-service) to find and populate certain personalisation fields for each recipient. This happens automatically when you [tell us who you want to message]({% link pages/using-nhs-notify/tell-us-who-you-want-to-message.md %}) using recipients' NHS numbers.
29+
NHS Notify uses the <a href="https://digital.nhs.uk/services/personal-demographics-service" target="_blank">Personal Demographics Service (PDS)</a> to populate the personalisation fields in your template. This happens when you [tell us who you want to message]({% link pages/using-nhs-notify/tell-us-who-you-want-to-message.md %}) using recipients' NHS numbers.
3130

32-
To use PDS personalisation fields in your templates, choose from the following list:
31+
You can use the following PDS fields:
3332

3433
- fullName
3534
- firstName
@@ -38,83 +37,89 @@ To use PDS personalisation fields in your templates, choose from the following l
3837
- date
3938

4039
{% include components/inset-text.html
41-
text='Make sure your personalisation fields exactly match the PDS personalisation fields. This includes using the correct order of upper and lower case letters.'
40+
text='Make sure your personalisation fields match the PDS personalisation fields. This includes using the correct order of upper and lower case letters.'
4241
%}
4342

44-
## Custom personalisation fields
43+
## Custom personalisation fields (your data)
4544

46-
You can add custom personalisation fields that use your own personalisation data.
45+
Use custom personalisation fields when you want to provide your own data that is not available through PDS.
4746

48-
### If you're using NHS Notify API
47+
### Sending custom personalisation data in your request
4948

50-
Include a personalisation block in your API request.
49+
When you go live, you can provide the data for your custom personalisation fields in your API or MESH request.
5150

52-
For example, if you wanted to include 'practice' as a personalisation field, the personalisation block would be:
51+
{% include components/details.html
52+
heading='If you use NHS Notify API'
53+
text='Include a personalisation block for each message in your API request.
5354

54-
{% include components/inset-text.html
55-
text='"practice": "PRACTICE_NAME",'
56-
%}
55+
For example, if you wanted to include `((gpSurgery))` and `((appointmentDate))` as custom personalisation fields, the personalisation block for one message would be:
5756

58-
Read the [API documentation](https://digital.nhs.uk/developer/api-catalogue/nhs-notify#post-/v1/message-batches) to find out where to put this in your request.
57+
`personalisation: {
58+
"gpSurgery": "The Health Centre, Knaresborough Road",
59+
"appointmentDate": "15 January 2027"
60+
}`
5961

60-
### If you're using NHS Notify MESH
61-
62-
Include the personalisation fields as columns in your CSV file.
62+
Read the <a href="https://digital.nhs.uk/developer/api-catalogue/nhs-notify#post-/v1/message-batches" target="_blank">API documentation (opens in a new tab)</a> to find out where to put this in your request.
63+
'
64+
%}
6365

64-
The column names should start with 'personalisation\_', followed by the same wording as the personalisation fields in your template.
66+
{% include components/details.html
67+
heading='If you use NHS Notify MESH'
68+
text='Include the custom personalisation fields as column headings in the CSV file you use in your request. Put the personalisation data for each message in the rows underneath, with one row per message.
6569

66-
For example, if you wanted to include 'practice' as a personalisation field, the column name would be:
70+
The column heading should start with `personalisation_` followed by the same wording as the personalisation field in your template.
6771

68-
{% include components/inset-text.html
69-
text='nhsNumber,requestItemRefId,personalisation_practice'
70-
%}
72+
For example, if your personalisation fields were `((gpSurgery))` and `((appointmentDate))`, the column headings would be:
7173

72-
### Providing example data
74+
`personalisation_gpSurgery` and `personalisation_appointmentDate`
7375

74-
The data used in your personalisation fields can affect the formatting and length of your messages. This could make some messages cost more than expected.
76+
The CSV file you use in your MESH request is different to the CSV example data file for custom personalisation fields.
7577

76-
You need to give us example data if you use custom personalisation. This helps us show you what your templates will look like with different lengths of data in your personalisation fields.
78+
Read more about <a href="https://digital.nhs.uk/developer/api-catalogue/nhs-notify-mesh/sending-a-message" target="_blank">how to create your request with NHS Notify MESH (opens in a new tab)</a>.
79+
'
80+
%}
7781

78-
Download and fill in our [example personalisation data spreadsheet]({% link assets/personalisationexampledata/personalisation-example-data-nhs-notify.xlsx %}).
82+
### Providing example personalisation data
7983

80-
The personalisation fields in your message content must match the fields in the 'personalisation field' column of your spreadsheet.
84+
You must provide example data if you use custom personalisation. This means you can check how your templates will look during [proofing]({% link pages/using-nhs-notify/approve-your-messages.md %}), as the data in personalisation fields can affect message cost and length.
8185

82-
For each personalisation field, you need to provide examples that are:
86+
You do not need to do this if you only use PDS fields in your template.
8387

84-
- short
85-
- medium
86-
- long
88+
Download and fill in the [example data file]({% link assets/personalisationexampledata/personalisation-blank-example-data-nhs-notify.csv %}). You can also download a [completed example file]({% link assets/personalisationexampledata/personalisation-completed-example-data-nhs-notify.csv %}) to check how to format your data.
8789

88-
For example, if you had ((hospital_address_line)) as a personalisation field, you might choose the following example data:
90+
For each personalisation field, provide short, medium and long examples. For example, if your personalisation field was `((gpSurgery))`, you could use the following example data:
8991

9092
{% include components/inset-text.html
9193
text='
9294

93-
- Hospital A (short)
94-
- Hospital ABCDE (medium)
95-
- Hospital ABCDEFGHIJKLMN (long)'
95+
- New Surgery (short)
96+
- The Health Centre, Knaresborough Road (medium)
97+
- Church Avenue and Park Grove Medical Group Surgery (long)'
9698
%}
9799

98-
You can decide how many characters to use for each length.
100+
Follow these rules for your example data:
99101

100-
If the information for a field will always be the same length, give us 3 different examples that are all that same length.
102+
- the personalisation fields in your template must exactly match the fields in the 'personalisation field' column of your spreadsheet
103+
- decide the number of characters for your short, medium and long examples - there are no set lengths
104+
- if a field is always a fixed length, such as a phone number, provide 3 different examples of that fixed length
105+
- your example data does not need to be real user data
101106

102-
Your example data does not need to be real data.
107+
### Adding personalised links
108+
109+
To add personalised links and URLs, include personalisation fields for both the link text and the URL in your template. For example:
110+
111+
{% include components/inset-text.html
112+
text='`[((link_text))](((link_URL)))`'
113+
%}
103114

104115
### Fields to avoid for custom personalisation
105116

106-
If you want to use custom personalisation, do not use the following personalisation fields:
117+
If you use custom personalisation, do not use the following personalisation fields:
107118

108-
- [PDS personalisation fields](#personal-demographics-service-pds-personalisation-fields)
119+
- any [PDS personalisation fields](#pds-personalisation-fields-automatic-data)
109120
- emailAddress
110121
- phoneNumber
111-
- addressLine1
112-
- addressLine2
113-
- addressLine3
114-
- addressLine4
115-
- addressLine5
116-
- addressLine6
117-
- addressLine7
122+
- addressLine1 to addressLine7
118123
- middleNames
119124
- namePrefix
120125
- nameSuffix
@@ -124,13 +129,11 @@ If you want to use custom personalisation, do not use the following personalisat
124129
- template
125130

126131
{% include components/inset-text.html
127-
text='Custom personalisation will not work if you use these fields. This includes any variations, for example, if you add spaces, punctuation, and upper or lower case letters.'
132+
text='Using these fields will cause custom personalisation to fail. This includes any variations, for example, if you add spaces, punctuation, and upper or lower case letters.'
128133
%}
129134

130-
You can include extra words in your custom personalisation fields to make them different.
131-
132-
For example, if you wanted to include GP practice phone number, your personalisation field could be:
135+
You can include extra words in your custom personalisation fields to make them different to the fields to avoid. For example, if you wanted to include GP surgery phone number, your personalisation field could be:
133136

134137
{% include components/inset-text.html
135-
text='((GP_phoneNumber))'
138+
text='`((GP_phoneNumber))`'
136139
%}

0 commit comments

Comments
 (0)