Skip to main content

Case detail placeholders

The following placeholders may be used to embed case details within email templates, the case ribbon, dashboard columns, and case form external redirects.

General

The account title

{{ account.title }}

The case reference

{{ case.reference }}

The type of the case

{{ case.type.title }}

The title of the current status the case has (e.g. Open, Closed, etc)

{{ case.status.title }}

The current date and time (when email is processed)

{{ 'now'|date('<format>') }}

See below for date <format> values.

Dates

When using a date placeholder, you must specify the format to output the date in using the |date('<format>') modifier. Any valid PHP date format string is supported in place of <format>.

Formatting examples:

FormatOutput
Y-m-d2018-02-07
d/m/Y07/02/2018
Y-m-d H:i:s2018-02-07 13:23:45
jS \\of F Y7th of February 2018
l jS \\of FThursday 7th of February
l \\a\\t g:iaThursday at 1:23pm

The date and time the case was created

{{ case.createdAt|date('<format>') }}

The date and time the case was last transitioned to a final status

{{ case.completedAt|date('<format>') }}

The date and time the case was last updated

{{ case.updatedAt|date('<format>') }}

Field values

When referencing a case field value within a placeholder, there are two different formats to use depending on the name of the field.

When the field name does not contain any hyphens and does not start with a number:

{{ case.values.field_name.value }}

When the field name contains hyphens or starts with a number:

{{ case.values['123-hyphenated-field-name'].value }}

This is because hyphens or numbers at the start of the name will cause the template to error if the name is not contained within the ['']. The following examples all use the latter format for hyphenated field names but the alternative format can be used if the field name is compatible.

Text fields

Including Text, Textarea, Telephone, Email and Url types.

The field label

{{ case.values['field-name'].label }}

The value of the given field name for the case

{{ case.values['field-name'].value }}

Choice fields

Show a choice field label

{{ case.values['choice-field-name'].label }}

Show the value of the choice for the case

{{ case.values['choice-field-name'].value }}

Get the label of a specific choice in a multi choice field

{{ case.values['multi-choice-field-name']['choice-name'].label }}

Get the value of a specific choice in a multi choice field

{{ case.values['multi-choice-field-name']['choice-name'].value }}

Date fields

The value of a date field

{{ case.values['date-field-name'].value|date('<format>') }}

See Dates above for details of valid <format> values

Case dates

The value of the case date

Note that in a previous version of this documentation we recommended the use of .date after the case date name.

This has now been removed, as it will result in the loss of timezone information from the date. This meant that dates may have appeared incorrectly even if the correct timezone was specified to |date(...).

{{ case.dates['case-date-name']|date('<format>') }}

See Dates above for details of valid <format> values

Address linked to the case

The first address linked to the case, output on a single line

{{ case.addressRelationships[0].address.summary }}

The postcode of the first address linked to the case

{{ case.addressRelationships[0].address.postCode }}

Person linked to the case

If sign in is optional for a case type then there might not be a customer record attached to a case.

It is therefore necessary to include placeholders for the first and last name fields captured on the case, instead of the person linked to the case, for example:

Dear {{ case.values['resident_first_name'].value }} {{ case.values['resident_last_name'].value }}

If sign-in is not optional then there will always be a customer record linked to the case, and so the placeholder for the person linked to the case can be used:

Dear {{ case.personRelationships[0].person.fullName }}

The full name of the first Person linked to a case

{{ case.personRelationships[0].person.fullName }}

The title of the first Person linked to a case

{{ case.personRelationships[0].person.title }}

The first name of the first Person linked to a case

{{ case.personRelationships[0].person.forename }}

The middle names of the first Person linked to a case

{{ case.personRelationships[0].person.middleNames }}

The last name of the first Person linked to a case

{{ case.personRelationships[0].person.surname }}

The primary telephone number of the first Person linked to a case

{{ case.personRelationships[0].person.telephonePrimary }}

The secondary telephone number of the first Person linked to a case

{{ case.personRelationships[0].person.telephoneSecondary }}

The email address of the first Person linked to a case

{{ case.personRelationships[0].person.email }}

The email address of the user account for the first Person linked to a case

{{ case.personRelationships[0].person.user.email }}

The primary address of the first Person linked to a case, output on a single line

{{ case.personRelationships[0].person.primaryAddress.summary }}

Organisation linked to the case

If there is an organisation record linked to the case, the placeholders for the organisation linked to the case can be used.

The name of the first Organisation linked to a case

{{ case.organisationRelationships[0].organisation.name }}

The reference of the first Organisation linked to a case

{{ case.organisationRelationships[0].organisation.reference }}

The address of the first Organisation linked to a case

{{ case.organisationRelationships[0].organisation.address.summary }}

The primary telephone of the first Organisation linked to a case

{{ case.organisationRelationships[0].organisation.telephonePrimary }}

The secondary telephone of the first Organisation linked to a case

{{ case.organisationRelationships[0].organisation.telephoneSecondary }}

The VAT number of the first Organisation linked to a case

{{ case.organisationRelationships[0].organisation.vatNumber }}