You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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"
You can read personalisation instructions while you’re editing a template.
25
24
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.
27
26
28
-
## Personal Demographics Service (PDS) personalisation fields
27
+
## PDS personalisation fields (automatic data)
29
28
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 <ahref="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.
31
30
32
-
To use PDS personalisation fields in your templates, choose from the following list:
31
+
You can use the following PDS fields:
33
32
34
33
- fullName
35
34
- firstName
@@ -38,83 +37,89 @@ To use PDS personalisation fields in your templates, choose from the following l
38
37
- date
39
38
40
39
{% 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.'
42
41
%}
43
42
44
-
## Custom personalisation fields
43
+
## Custom personalisation fields (your data)
45
44
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.
47
46
48
-
### If you're using NHS Notify API
47
+
### Sending custom personalisation data in your request
49
48
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.
51
50
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.
53
54
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:
57
56
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
+
}`
59
61
60
-
### If you're using NHS Notify MESH
61
-
62
-
Include the personalisation fields as columns in your CSV file.
62
+
Read the <ahref="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
+
%}
63
65
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.
65
69
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.
For example, if your personalisation fields were `((gpSurgery))` and `((appointmentDate))`, the column headings would be:
71
73
72
-
### Providing example data
74
+
`personalisation_gpSurgery` and `personalisation_appointmentDate`
73
75
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.
75
77
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 <ahref="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
+
%}
77
81
78
-
Download and fill in our [example personalisation data spreadsheet]({% link assets/personalisationexampledata/personalisation-example-data-nhs-notify.xlsx %}).
82
+
### Providing example personalisation data
79
83
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.
81
85
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.
83
87
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.
87
89
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:
89
91
90
92
{% include components/inset-text.html
91
93
text='
92
94
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)'
96
98
%}
97
99
98
-
You can decide how many characters to use for each length.
100
+
Follow these rules for your example data:
99
101
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
101
106
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
+
%}
103
114
104
115
### Fields to avoid for custom personalisation
105
116
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:
@@ -124,13 +129,11 @@ If you want to use custom personalisation, do not use the following personalisat
124
129
- template
125
130
126
131
{% 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.'
128
133
%}
129
134
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:
0 commit comments