How to set up notification templates for direct access

Special tags exist to enable direct access to Service Management, which you can use when creating email notification templates. For more information about creating these templates, see Notifications.

Generate a reply email

A mailto tag is required when a user will perform an action by responding to the email:

Caution Copy and paste the following strings into a text editor to remove formatting.

  • accept a request

    <%=create_mailto(ACCEPT_REQUEST,${:entity.Type},${:entity.Id},${:entity.
    RequestedForPerson.Id},${:entity.RequestedForPerson.Email},${:entity.
    DisplayLabel})%>

  • reject a request

    <%=create_mailto(REJECT_REQUEST,${:entity.Type},${:entity.Id},${:entity.
    RequestedForPerson.Id},${:entity.RequestedForPerson.Email},${:entity.
    DisplayLabel})%>

  • approve a request

    <%=create_mailto(APPROVE_REQUEST,${parentType},${parentId},${parentName},${assigneeId},
    ${assigneeEmail},${:entity.Id})%>

  • deny a request

    <%=create_mailto(DENY_REQUEST,${parentType},${parentId},${parentName},
    ${assigneeId},${assigneeEmail},${:entity.Id})%>

  • add a comment in the Service Portal

    <%=create_mailto(ADD_COMMENT,${:entity.Type},${:entity.Id},${:entity.
    RequestedForPerson.Id},${:entity.RequestedForPerson.Email},${:entity.
    DisplayLabel})%>

  • provide information

    <%=create_mailto(PROVIDE_INFO,${:entity.Type},${:entity.Id},${:entity.RequestedForPerson.
    Id},${:entity.RequestedForPerson.Email},${:entity.DisplayLabel})%>

If any of these operations fail, an error message notification is automatically sent. The notification is based on the Template Definition for send error message email with email integration template. By default, the notification includes a link to the Service Portal. You can manually configure this template not to display the link by adding true as an additional optional parameter in the email body of the template:

<%=show_error_message(${errorCode},${entityType},${entityId},${entityDisplayLabel},true)%>

If the parameter is not added or if the parameter value is false, the Service Portal portal link is displayed.

Link to knowledge articles

A showRelatedKnowledge tag is used to include a section in a notification that contains links to related knowledge articles:

<%=showRelatedKnowledge(${email.subject},${email.body},${userId})%>

Link to offerings

A showRelatedOffering tag is used to include a section in a notification that contains links to related offerings:

<%=showRelatedOffering(${email.subject},${email.body},${userId},
${email.address})%>

Related topics