diff --git a/docs/_includes/breadcrumb.html b/docs/_includes/breadcrumb.html index f6dd986..85090dd 100644 --- a/docs/_includes/breadcrumb.html +++ b/docs/_includes/breadcrumb.html @@ -22,7 +22,8 @@ {% endif %} - {% if page.parent == "Using NHS Notify" or page.mini_hub_topic == "Formatting" %} + {% if page.parent == "Using NHS Notify" or page.mini_hub_topic == "Formatting" or page.url contains + "/using-nhs-notify/personalising-your-messages" %}
  • Using NHS Notify
  • @@ -88,7 +89,8 @@ {% endif %} - {% if page.parent == "Using NHS Notify" or page.mini_hub_topic == "Formatting" %} + {% if page.parent == "Using NHS Notify" or page.mini_hub_topic == "Formatting" or page.url contains + "/using-nhs-notify/personalising-your-messages" %} Back to   Using NHS Notify diff --git a/docs/pages/using-nhs-notify/personalising-your-messages/cutom-data.md b/docs/pages/using-nhs-notify/personalising-your-messages/cutom-data.md new file mode 100644 index 0000000..8ea1a56 --- /dev/null +++ b/docs/pages/using-nhs-notify/personalising-your-messages/cutom-data.md @@ -0,0 +1,71 @@ +--- +layout: mini-hub +title: Custom data +nav_title: Personalising your messages +nav_order: 3 +permalink: /using-nhs-notify/personalising-your-messages/custom-data +section: Writing a message +mini_hub_topic: Personalising your messages +mini_hub_pages: + - title: Overview + url: /using-nhs-notify/personalising-your-messages + - title: Personal Demographic Service (PDS) data + url: /using-nhs-notify/personalising-your-messages/pds-data + - title: Custom data + url: + current: true + - title: Providing your own data + url: /using-nhs-notify/personalising-your-messages/providing-your-own-data + +previous_page: + title: Personal Demographic Service (PDS) data + url: /using-nhs-notify/personalising-your-messages/pds-data +next_page: + title: Providing your own data + url: /using-nhs-notify/personalising-your-messages/providing-your-own-data +published: true +--- + +You can add custom personalisation fields to use your own data that’s not available through the Personal Demographics Service (PDS). + +{% include components/inset-text.html + text='You can use your own data alongside PDS data to personalise the same message template. But you can only use custom data fields that do not already exist in PDS.' +%} + +You need to provide the data for your custom personalisation fields in your API or MESH request. Find out more about [providing your own custom data](https://notify.nhs.uk/using-nhs-notify/personalising-your-messages/providing-your-own-data). + +## Fields you cannot use + +If you use your own data, you cannot use the following personalisation fields: + +- any PDS personalisation fields +- emailAddress +- phoneNumber +- addressLine1 to addressLine7 +- middleNames +- namePrefix +- nameSuffix +- date +- clientRef +- recipientContactValue +- template + +{% include components/inset-text.html + text='Using these fields will cause custom personalisation to fail. This includes variations, like adding spaces, punctuation, and upper or lower case letters.' +%} + +You can add words or underscores to custom personalisation fields, to make them different to the fields to avoid. For example, if you want to include GP surgery phone number, your personalisation field could be: + +{% include components/inset-text.html + text='`((GP_phoneNumber))`' +%} + +## Adding personalised links + +To add personalised links and URLs, include personalisation fields for both the link text and the URL in your template. For example: + +{% include components/inset-text.html + text='`[((link_text))](((link_URL)))`' +%} + +If your NHS App message links to a service that requires users to sign in, your organisation must be set up with NHS login. Find out how to apply for NHS login (opens in a new tab). diff --git a/docs/pages/using-nhs-notify/personalising-your-messages/overview.md b/docs/pages/using-nhs-notify/personalising-your-messages/overview.md new file mode 100644 index 0000000..94af823 --- /dev/null +++ b/docs/pages/using-nhs-notify/personalising-your-messages/overview.md @@ -0,0 +1,58 @@ +--- +layout: mini-hub +title: Overview +redirect_from: /using-nhs-notify/personalisation +nav_title: Personalising your messages +nav_order: 1 +permalink: /using-nhs-notify/personalising-your-messages +section: Writing a message +mini_hub_topic: Personalising your messages +mini_hub_pages: + - title: Overview + url: /using-nhs-notify/personalising-your-messages + current: true + - title: Personal Demographic Service (PDS) data + url: /using-nhs-notify/personalising-your-messages/pds-data + - title: Custom data + url: /using-nhs-notify/personalising-your-messages/custom-data + - title: Providing your own data + url: /using-nhs-notify/personalising-your-messages/providing-your-own-data + +previous_page: + +next_page: + title: Personal Demographic Service (PDS) data + url: /using-nhs-notify/personalising-your-messages/pds-data +published: true +--- + +You can use NHS Notify to personalise messages with details like a recipient's name, appointment times, or reference numbers to your messages. + +You can add personalisation fields to: + +- NHS App messages +- emails +- text messages +- letters + +You can personalise messages using data from the Personal Demographic Services (PDS), or your own custom data. + +## Adding personalisation fields to message templates + +You’ll need to add personalisation fields to your message templates, to send personalised messages to recipients. + +Use double brackets to add personalisation fields to NHS App message, text message, or email templates. Do not include spaces in your personalisation fields. For example: + +{% include components/inset-text.html + text='`Hello ((fullName)), your NHS Number is ((nhsNumber)). Your appointment is on ((appointmentDate)) at ((gpSurgery)).`' +%} + +### Adding personalisation fields to letter templates + +Use single curly brackets with d. at the start to add personalisation to letter templates. For example: + +{% include components/inset-text.html + text='`Hello {d.fullName}, your NHS Number is {d.nhsNumber}. Your appointment is on {d.appointmentDate} at {d.gpSurgery}.`' +%} + +You can read personalisation instructions while you’re editing a template. diff --git a/docs/pages/using-nhs-notify/personalising-your-messages/pds-data.md b/docs/pages/using-nhs-notify/personalising-your-messages/pds-data.md new file mode 100644 index 0000000..e4fa7a6 --- /dev/null +++ b/docs/pages/using-nhs-notify/personalising-your-messages/pds-data.md @@ -0,0 +1,45 @@ +--- +layout: mini-hub +title: Personal Demographic Service (PDS) data +nav_title: Personalising your messages +nav_order: 2 +permalink: /using-nhs-notify/personalising-your-messages/pds-data +section: Writing a message +mini_hub_topic: Personalising your messages +mini_hub_pages: + - title: Overview + url: /using-nhs-notify/personalising-your-messages + - title: Personal Demographic Service (PDS) data + url: + current: true + - title: Custom data + url: /using-nhs-notify/personalising-your-messages/custom-data + - title: Providing your own data + url: /using-nhs-notify/personalising-your-messages/providing-your-own-data + +previous_page: + title: Overview + url: /using-nhs-notify/personalising-your-messages +next_page: + title: Custom data + url: /using-nhs-notify/personalising-your-messages/custom-data +published: true +--- + +NHS Notify uses the Personal Demographic Service (PDS) to fill 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. + +You can use the following PDS fields in your message template: + +- fullName +- firstName +- lastName +- nhsNumber +- date + +Make sure your personalisation fields in your template match the PDS personalisation fields. This includes using the correct order of upper and lower case letters. For example: + +{% include components/inset-text.html + text='`Hello ((fullName)), your NHS Number is ((nhsNumber)). Your appointment is on ((date)).`' +%} + +Learn more about the Personal Demographic Service (PDS) (opens in a new tab). diff --git a/docs/pages/using-nhs-notify/personalising-your-messages/providing-your-own-data.md b/docs/pages/using-nhs-notify/personalising-your-messages/providing-your-own-data.md new file mode 100644 index 0000000..8a2da72 --- /dev/null +++ b/docs/pages/using-nhs-notify/personalising-your-messages/providing-your-own-data.md @@ -0,0 +1,68 @@ +--- +layout: mini-hub +title: Providing your own data +nav_title: Personalising your messages +nav_order: 4 +permalink: /using-nhs-notify/personalising-your-messages/providing-your-own-data +section: Writing a message +mini_hub_topic: Personalising your messages +mini_hub_pages: + - title: Overview + url: /using-nhs-notify/personalising-your-messages + - title: Personal Demographic Service (PDS) data + url: /using-nhs-notify/personalising-your-messages/pds-data + - title: Custom data + url: /using-nhs-notify/personalising-your-messages/custom-data + - title: Providing your own data + url: + current: true + +previous_page: + title: Custom data + url: /using-nhs-notify/personalising-your-messages/custom-data +next_page: + +published: true +--- + +Your developer or technical team should include data for your custom personalisation fields in your API or MESH request. + +## If you use NHS Notify API + +Include a personalisation block for each message in your API request. + +For example, if you want to include `((gpSurgery))` and `((appointmentDate))` as custom personalisation fields, the personalisation block for one message will be: + +{% include components/inset-text.html + text='`personalisation: {`
    +`"gpSurgery": "The Health Centre, Knaresborough Road",`
    +`"appointmentDate": "15 January 2027"`
    +`}`' +%} + +To find out where to add this in your request, go to NHS Notify API (opens in a new tab). + +## If you use NHS Notify MESH + +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. + +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 are `((gpSurgery))` and `((appointmentDate))`, the column headings will be: + +{% include components/inset-text.html +text='`personalisation_gpSurgery` +`personalisation_appointmentDate`' +%} + +The CSV file you use in your MESH request is different to the CSV example data file for custom personalisation fields. + +Read more sending a message with NHS Notify MESH (opens in a new tab). + +## Example data + +After you request a proof, we’ll include example data in the proof we email to you. This allows you to check how personalisation will be displayed in your message. + +The data in personalisation fields can affect message cost and length. + +Find out how to [approve your messages before we send them]({% link pages/using-nhs-notify/approve-your-messages.md %}). diff --git a/project.code-workspace b/project.code-workspace index 4a1c033..2a7cc6f 100644 --- a/project.code-workspace +++ b/project.code-workspace @@ -93,6 +93,7 @@ "Codespaces", "endfor", "Nasar", + "personalisationexampledata", "preinstalled", "pythonist", "rossbugginsnhs",