MESSAGE CODES

MESSAGE CODES

MESSAGES CODES are used to define the content of communication messages sent by the system (emails, SMS...)

Property

Value

Comments

Property

Value

Comments

#CODE:ID_STANDARD_CODE

#MESSAGE

 

#CODE:ID_CODE

e.g. "ACCOUNT.PASSWORD_RESET.EMAIL.SUBJECT"

 

#CODE:ID_LANGUAGE

"ES"|"IT"|"EN"

Available languages....

#CODE:CODE_DESCRIPTION

 Description of ID_CODE (e.g. "Account password reset")

Communication message #CODE:ID_CODE

Customization of messages

TWIG Scripting

The CODE_DESCRIPTION of each message is a template that is processed to render a text which will finally be sent to a user via a specific communication channel (email, sms). The processing of the message us done using TWIG scripting.

There exists a set of predefined variables that are available to the TWIG engine to format the message. The values assigned to the variables depend on the type of message as explained in next sections.

Examples of messages using TWIG scripting

The following template can be used to send an SMS message to a user that wants to reset his password:

Template

Rendered text

Comments

Template

Rendered text

Comments

In order to reset your password use this code: {{reset_token}}

In order to reset your password use this code: 988766

We have used the reset_token variable in the template. This variable is replaced by the platform with corresponding token value. 

{% if name %}
<p>Dear {{ name }},</p>
<p></p>
{% endif %}
<p>You have requested to have your password reset for your account.</p>
<p></p>
<p>Please visit this url to reset your password. </p>
<p></p>
<p>{{ reset_password_url }}</p>
<p></p>

<p>Dear John Martin,</p>
<p></p>
<p>You have requested to have your password reset for your account.</p>
<p></p>
<p>Please visit this url to reset your password. </p>
<p></p>
<p>https://www.linkcareapp.com/password</p>
<p></p>

This is a more complex example where apart of using variables name and reset_password_url, TWIG scripting has been used format the message depending on the existence of the name variable. If it is defined, then a greeting heading will be included.

Communication channels

Messages are sent by one or more communication channels (e.g. email, SMS, etc.), and each channel may have different requirements. For example, when sending an email it is necessary to indicate the 'subject' and the 'body' of the message, but when sending a SMS it is only necessary to indicate the body.

For this reason each MESSAGE CODES requires multiple definitions to fit the requirements of each channel type. The generic format of a MESSAGE CODE name is:

{CODE}.{CHANNEL}[.PART]

Where 

  • CODE: The name of the MESSAGE CODE

  • CHANNEL: Communication channel used to send the notification

    • EMAIL

    • SMS

    • PUSH_NOTIFICATION

    • WEBALERT

  • PART: Some communication channels may have more than one text that must be configured. For example, when sending an email, it is necessary to specify the text of the subject and the body of the email

The following table shows the possible combinations of {channel} and {part}:

{CHANNEL}

{PART}

Comments

{CHANNEL}

{PART}

Comments

EMAIL

  • SUBJECT

  • BODY

The content of the BODY of an email accepts HTML.

SMS



Must be plain text.

PUSH_NOTIFICATION

  • SUBJECT

  • BODY

Must be plain text.

WEBALERT

  • SUBJECT

  • BODY

Accepts HTML.

Web alerts are sent to those clients that have subscribed to the alert service (see alert_subscribe () API function)

Introduced in API version 2.7.15

HIS

  • BODY

Accepts HTML.

Messages sent to users that have been imported from one external HIS using the interoperability capabilities

Introduced in API version 2.7.30

ACCOUNT MESSAGE CODES

Messages sent by the system related with a user's account

Predefined variables FOR TWIG scripting

Variable name

Description

Used in

name

Name of the person to whom the message is sent

ACCOUNT.SEND_CODE

ACCOUNT.PASSWORD_RESET

ACCOUNT.SEND_CODE

code

Code used to validate user accounts

ACCOUNT.SEND_CODE

poster

name of the person sending the request

ASSOCIATE.INVITATION.

reset_password_url

LC2 link to reset the password

ACCOUNT.PASSWORD_RESET

reset_token

Token required by the platform to reset the password

ACCOUNT.PASSWORD_RESET

url

The URL value depends on the type notification

ACCOUNT.SEND_CODE

ASSOCIATE.INVITATION.

ID_CODE

CODE_DESCRIPTION (EN)

COMMENTS

ID_CODE

CODE_DESCRIPTION (EN)

COMMENTS

ACCOUNT.PASSWORD_RESET

*.EMAIL.SUBJECT

Account password reset

Message sent when a user requests a password reset for his ACCOUNT.

API functions involved:

*.EMAIL.BODY

{% if name %}
<p>Dear {{ name }},</p>
<p></p>
{% endif %}
<p>You have requested to have your password reset for your account.</p>
<p></p>
<p>Please visit this url to reset your password. </p>
<p></p>
<p>{{ reset_password_url }}</p>
<p></p>
<p>If you received this email in error, you can safely ignore this email.</p>

*.SMS

In order to reset your password use this code: {{ reset_token }}

ACCOUNT.SEND_CODE

*.EMAIL.SUBJECT

Use the following code to validate your new account: {{ code }}

Message sent when a user creates a new ACCOUNT to indicate the validation code

API functions involved:

*.EMAIL.BODY

{% if name %}
<p>Dear {{ name }},</p>
<p></p>
{% endif %}
<p>Use the following code to validate your account: {{ code }}</p>
<p></p>
<p>Please visit this url to validate the account:</p>
<p></p>
<p>{{ url }}</p>
<p></p>
<p>If you received this email in error, you can safely ignore this email.</p>

*.SMS

Use the following code to validate your new account: {{ code }}

EVENT MESSAGE CODES

EVENT MESSAGE CODES are used to send notifications related with the creation of EVENT OBJECT, or when its status changes.

Predefined variables FOR TWIG scripting

Variable name

Description

Used in

event_type

description of the EVENT type. In customized EVENTS it is the name of the EVENT TEMPLATE

All EVENT messages

event_url

hyperlink to the EVENT in LC2

All EVENT messages

opening_remarks

Text of the first message that is included in the EVENT

All EVENT messages

poster

name of the person sending the request

All EVENT messages

issuer

name of the issuer of the request

All EVENT messages

program

Name of the PROGRAM. Used in EVENTS that are bound to a PROGRAM

All EVENT messages

requester_team

name of the TEAM sending the request

All EVENT messages

target

name of the person to which the request is addressed

All EVENT messages

target_team

name of the TEAM to which the message is addressed

All EVENT messages

task_url

Used in EVENTS that are bound to a TASK. For example, an EVENT of type REPORT are usually bound to a TASK that contains a REPORT.

The TASK to which the EVENT is referred is defined as a parameter in FORMULA EVENT_INSERT()

All EVENT messages.

url

The URL value depends on the type EVENT:

  • EVENT.TEAM_REQUEST: hyperlink to the Team Administration Dashboard in LC2

  • EVENT.TEAM_INVITATION: hyperlink to the Team Administration Dashboard in LC2

  • EVENT.PROFESSIONAL_INVITATION: hyperlink to the SIGN_UP screen in LC2

  • EVENT.CASE_INVITATION:

    • hyperlink to the SIGN_IN screen in LC2 if the CASE invited already exists

    • hyperlink to the SIGN_UP screen in LC2 if the CASE invited is new

  • EVENT.ASSOCIATE_INVITATION:

    • hyperlink to the SIGN_IN screen in LC2 if the ASSOCIATE invited already exists

    • hyperlink to the SIGN_UP screen in LC2 if the ASSOCIATE invited is new

  • EVENT.TEAM_REQUEST

  • EVENT.TEAM_INVITATION

  • EVENT.PROFESSIONAL_INVITATION

  • EVENT.CASE_INVITATION

  • EVENT.ASSOCIATE_INVITATION

password

A temporary password that can be used by a new User to log in the platform. This variable only has a value when the notification is sent to a user that never logged in the platform before, and allows to sign-up using the temporary password (which will be required to be changed after the first login)

  • EVENT.CASE_INVITATION

  • EVENT.ASSOCIATE_INVITATION

Predefined EVENT type MESSAGE CODES

There exist a list of predefined EVENT types that can be used discretionally (normally by means of calls to the API function event_insert () or the FORMULA EVENT_INSERT()). These EVENT types have a predefined message template.

The MESSAGE CODES for these messages have the following format:

EVENT.{EV_CODE}.{CHANNEL}[.PART]

Where EV_CODE depends on the type of EVENT. The following table shows the relation between the predefined EVENT types and the corresponding EV_CODE:

Event type

{EV_CODE}

Description ( value of the event_type TWIG variable)

Event type

{EV_CODE}

Description ( value of the event_type TWIG variable)

EVENT:SOCIAL

SOCIAL

Social issue

EVENT:CARE

CARE

Care issue

EVENT:ADMIN

ADMIN

Administrative Issue

EVENT:TECH

TECH

Technical Issue

EVENT:ENROLL_REQ

ENROLL_REQ

Enrollment Request

EVENT:OPINION_REQ

OPINION_REQ

Opinion Request

EVENT:CALL

CALL

Call

EVENT:REPORT

REPORT

Report

EVENT:CASE_INVITATION

CASE_INVITATION

Invitation

EVENT:NEW_CASE_INVITATION

NEW_CASE_INVITATION

Invitation

ID_CODE

CODE_DESCRIPTION (EN)

COMMENTS

ID_CODE

CODE_DESCRIPTION (EN)

COMMENTS

SOCIAL, CARE, ADMIN, TECH, ENROLL_REQ, OPINION_REQ, CALL

EVENT.*.EMAIL.SUBJECT(1)

You have a pending {{ event_type }} notification.

API functions involved:

EVENT.*.EMAIL.BODY(1)

<p>An event has been assigned to you.</p>
<p></p>
<p>{{ opening_remarks }}</p>
<p></p>
<p>Created by {{ poster }}</p>
<p></p>
<p><a href="{{ url }}">{{ url }}</a></p>

EVENT.*.SMS(1)

You have a pending {{ event_type }} notification.

EVENT.*.PUSH_NOTIFICATION.SUBJECT(1)

You have a new message

EVENT.*.PUSH_NOTIFICATION.BODY(1)

{{opening_remarks}}

EVENT.*.WEBALERT.SUBJECT(1)(2)

New notification

EVENT.*.WEBALERT.BODY(1)(2)

{{opening_remarks}}

EVENT.*.HIS.BODY(1)(3)

You have a new message in the PHM: {{opening_remarks}}

EVENT.REPORT

*.EMAIL.SUBJECT

You have a new report available

API functions involved:

*.EMAIL.BODY

<p>You have a new report available.</p><br/><p>{{ opening_remarks }}</p><p><a href="{{event_url}}">Click here to access the report</a></p>

*.SMS

You have a new report available

*.PUSH_NOTIFICATION.SUBJECT

You have a new report available

*.PUSH_NOTIFICATION.BODY

{{opening_remarks}}

*.WEBALERT.SUBJECT(2)

You have a new report available

*.WEBALERT.BODY(2)

{{opening_remarks}}

*.HIS.BODY(3)

A new report is available for you in the PHM. Open your “medical records” section form you PHM to find your new report.

CASE_INVITATION

EVENT.CASE_INVITATION.EMAIL.SUBJECT

You have been invited to participate in {{program}} platform

API functions involved:

This message is sent when an invitation is sent to an existing CASE (one that already existed in the platform and can sign-in with his account)





EVENT.CASE_INVITATION.EMAIL.BODY

<p>{{target}}, ha estat invitat participar a la plataforma {{program}}</p>{% if opening_remarks %}<p style="white-space:pre-wrap;">{{opening_remarks}}</p><p></p>{% endif %}<p><a href="{{url}}">Veure l'invitació</a></p>

EVENT.CASE_INVITATION.SMS

{% if target != "" %} {{target}}, you {% else %} You {% endif %}have been invited to participate in {{program}} platform. View the invitation: {{url}}

EVENT.CASE_INVITATION.WEBALERT.SUBJECT

Invitation for accessing {{program}} platform

EVENT.CASE_INVITATION.WEBALERT.BODY

You have been invited to participate in {{program}} platform. {% if opening_remarks %}{{opening_remarks}}{% endif %}

EVENT.CASE_INVITATION.AIMED.BODY(3)

You have been invited to participate to the {{program}} care plan in the PHM

NEW_CASE_INVITATION

EVENT.NEW_CASE_INVITATION.EMAIL.SUBJECT

You have been invited to participate in {{program}} platform

API functions involved:

This message is sent when an invitation is sent to a new CASE (one that didn't exist in the platform and must sign-up)

EVENT.NEW_CASE_INVITATION.EMAIL.BODY

<p>{{target}}, you have been invited to participate in {{program}} platform</p>{% if opening_remarks %}<p style="white-space:pre-wrap;">{{opening_remarks}}</p><p></p>{% endif %}<p><a href="{{url}}">View the invitation</a></p>

EVENT.NEW_CASE_INVITATION.SMS

{% if target != "" %} {{target}}, you {% else %} You {% endif %}have been invited to participate in {{program}} platform. View the invitation: {{url}}

EVENT.NEW_CASE_INVITATION.WEBALERT.SUBJECT

Invitation for accessing {{program}} platform

EVENT.NEW_CASE_INVITATION.WEBALERT.BODY

You have been invited to participate in {{program}} platform. {% if opening_remarks %}{{opening_remarks}}{% endif %}

(1) Currently message types SOCIAL, CARE, ADMIN, TECH, ENROLL_REQ, OPINION_REQ, CALL have the same description

(2) Introduced in API version 2.7.15

(3) Messages for sending notifications using the messaging system provided by a HIS connection (see HIS INTEGRATION). Only for users that have been imported from an external HIS. Introduced in API version 2.7.30

Customized EVENT MESSAGE CODES

Sometimes is necessary to create our own customized EVENT TEMPLATES. A customized EVENT TEMPLATE is a TASK TEMPLATE added to a PROGRAM whose WORKPLAN has been assigned to the stage "EVENT".

To insert customized EVENTS in an ADMISSION it is necessary to invoke the FORMULA EVENT_INSERT() filling the parameter event_code with the TASK_CODE defined in the EVENT TEMPLATE.

All customized EVENT MESSAGE CODES have the same pattern:

EVENT.NOTIFICATION.{CHANNEL}[.PART]

The description assigned to the event_type TWIG variable is the title of the TASK TEMPLATE (instead of the hard-coded description of predefined EVENTS)

ID_CODE

CODE_DESCRIPTION (EN)

COMMENTS

ID_CODE

CODE_DESCRIPTION (EN)

COMMENTS

EVENT.NOTIFICATION

*.EMAIL.SUBJECT

You have a pending {{ event_type }} notification.

API functions involved:



*.EMAIL.BODY

<p>An event has been assigned to you.</p>
<p></p>
<p>{{ opening_remarks }}</p>
<p></p>
<p>Created by {{ poster }}</p>
<p></p>
<p><a href="{{ event_url }}">{{ event_url }}</a></p>

*.SMS

You have a pending {{ event_type }} notification.

*.PUSH_NOTIFICATION.SUBJECT

You have a pending {{ event_type }} notification.

*.PUSH_NOTIFICATION.BODY

{{opening_remarks}}

*.WEBALERT.SUBJECT(1)

New notification

*.WEBALERT.BODY(1)

<p>An event has been assigned to you.</p><br/><p style="white-space:pre-wrap;">{{ opening_remarks }}</p>

*.HIS.BODY(2)

You have a new message in the PHM: {{opening_remarks}}

(1) Introduced in API version 2.7.15

(2) Messages for sending notifications using the messaging system provided by a HIS connection (see HIS INTEGRATION). Only for users that have been imported from an external HIS. Introduced in API version 2.7.30

Outgoing EVENT MESSAGE CODES

Normally an EVENT is assigned to a TEAM or registered USER of the platform. In these cases, the communication channels used to send notifications are obtained from the CONTACT OBJECT of the TEAM or USER.

Nevertheless, sometimes it is necessary to send a notification to USER that is not registered in the platform. In these case, it is possible to assign a specific communication channel (an email address, phone number..) and the EVENT is considered an "Outgoing EVENT".

The MESSAGE CODE used for generating the message sent in an Outgoing EVENT has the following format:

EVENT.{CHANNEL}[.PART]

ID_CODE

CODE_DESCRIPTION (EN)

ID_CODE

CODE_DESCRIPTION (EN)

EVENT.EMAIL.SUBJECT

{{ event_type }}

EVENT.EMAIL.BODY

<p>{{ opening_remarks }}</p>

EVENT.SMS

{{ opening_remarks }}

EVENT.PUSH_NOTIFICATION.SUBJECT

{{ event_type }}

EVENT.PUSH_NOTIFICATION.BODY

{{opening_remarks}}

EVENT.WEBALERT.SUBJECT(1)

New notification

EVENT.WEBALERT.BODY(1)

{{ opening_remarks }}

EVENT.HIS.BODY(2)

{{ opening_remarks }}

(1) Introduced in API version 2.7.15

(2) Messages for sending notifications using the messaging system provided by a HIS connection (see HIS INTEGRATION). Only for users that have been imported from an external HIS. Introduced in API version 2.7.30

System EVENT MESSAGE CODES

Under some circumstances the system generates automatically an EVENT. For example, when a new member is added to a TEAM, a new EVENT is generated to send an invitation to the member.

System Event type

{EVTYPE}

Description ( value of the event_type TWIG variable)

System Event type

{EVTYPE}

Description ( value of the event_type TWIG variable)

EVENT:TEAM_REQUEST

TEAM_REQUEST

Team Request

EVENT:TEAM_INVITATION

TEAM_INVITATION

Team Invitation

EVENT:PROFESSIONAL_INVITATION

PROFESSIONAL_INIVITATION

Professional Invitation

EVENT:ASSOCIATE_INVITATION

ASSOCIATE_INVITATION

Invitation

ID_CODE

CODE_DESCRIPTION (EN)

COMMENTS

ID_CODE

CODE_DESCRIPTION (EN)

COMMENTS

TEAM_REQUEST

*.SMS

Membership in team {{ target_team }} requested by {{ requester_team }}

Used when a TEAM sends a request to become member of a TEAM

API functions involved:

*.EMAIL.SUBJECT

Membership in team {{ target_team }} requested by {{ requester_team }}

*.EMAIL.BODY

<p>{{ requester_team }} has sent a request to join the TEAM "{{ target_team }}" administered by you</p>

<p>Please visit your Team Administration Dashboard to manage the request</p>

<p>{{ opening_remarks }}</p>

TEAM_INVITATION

*.SMS

{{target_team}} has been invited to join the team {{requester_team}}

Used when sending an invitation to a TEAM to join another TEAM

API functions involved:

*.EMAIL.SUBJECT

{{target_team}} has been invited to join the team {{requester_team}}

*.EMAIL.BODY

<p>{{target_team}} has received an invitation to join the team {{requester_team}}.</p>

<p>You are receiving this mail because you are administrator of team {{target_team}}<p>

<p>Please visit your Team Administration Dashboard to manage the invitation</p><p>{{opening_remarks}}</p>

PROFESSIONAL_INVITATION

*.SMS

You have been invited to join the team {{requester_team}}

Used when sending an invitation to a PROFESSIONAL to join a TEAM

API functions involved:

*.EMAIL.SUBJECT

You have been invited to join the team {{requester_team}}

*.EMAIL.BODY

<p>You have received an invitation to join the team {{requester_team}}.</p><p><a href="{{url}}">Ver la invitación</a></p>

ASSOCIATE_INVITATION

*.EMAIL.SUBJECT

{{ poster }} has sent a request to be cared by you

API functions involved:

This message is sent when an invitation is sent to an existing ASSOCIATE (one that already existed in the platform and can sign-in with his account)



*.EMAIL.BODY

<p>{{ poster }} has sent a request to be cared by you</p>
<p></p>
<p><a href="{{ url }}">View the invitation</a></p>