Help Desk MX
v1.2.44

Building Email Notifications Policy

This section describes how Email Notifications are being used and fitted to suit your needs. It consists of the following subsections:

Help Desk Templates

Help Desk MX allows the sending of emails with different types of notifications to the customer and support team. Here is a list of all of our templates, along with its associated actions:

  • New Ticket Email for Customer - sent when a ticket is created, with a basic confirmation message.
  • New Ticket Email to Staff - sent when a ticket is created, and a summary is made for it.
  • Ticket Email, Assigned to Staff - sent whenever a ticket is assigned or re-assigned to a particular agent. It also contains a summary.
  • New Message Email for Customer - sent whenever a new message from staff or a third party is added to the ticket.
  • New Message Email for Staff - sent whenever a new message from a customer or third-party is added to the ticket
  • New Message Email for Third-Party - sent whenever a new message from a customer or staff is added to the ticket to a third-party user (or a customer) who has been added to the conversation.
  • Template of Ticket Reminder - sent when a reminder is set for a particular ticket.
  • Template of Rule Notification - sent when a Workflow Rule is configured to send notifications. This template acts as a wrapper to a message from the rule.
  • Template of Survey Satisfaction Result - sent when the customer has left a response to satisfaction survey.

These templates cover virtually any action which can take place while working with customers.

Customizing email notifications template

All Email Notification Templates from the Help Desk are regular transactional emails - e. g. they can be customized using default Magento 2 means.

To customize the Help Desk MX email template, you need to perform the following, according to the steps enlisted below:

  • Go to Marketing > Communications > Email Templates
  • Press the button Add New Template
  • Pick up a template in the dropdown that you would like to customize. They begin with Helpdesk prefix - Helpdesk - Customer - New Message, for example.
  • Press the button Load Template
  • Enter the new Template Name (e.g. My Helpdesk - Customer - New Message)
  • Change Template Subject and Template Content if necessary
  • Press the button Save Template
  • Go to Store > Configuration > Help Desk > Email Notification Settings. Select your new template in the dropdown list of necessary notifications. Save the configuration.

In email templates, you can use the following variables:

  • {{var customer.name}} - customer name
  • {{var customer.email}} - customer email
  • {{var ticket.code}} - ticket code
  • {{var ticket.name}} - ticket subject
  • {{var ticket.department}} - name of ticket department
  • {{var ticket.status}} - name of ticket status
  • {{var ticket.priority}} - name of ticket priority
  • {{var ticket.getCreatedAtFormated($format)}}- date ticket was created
  • {{var ticket.getUpdatedAtFormated($format)}}- date ticket was updated
  • {{var ticket.getLastMessageHtmlText()}} - current ticket's message (in HTML format)
  • {{block class='Mirasvit\\Helpdesk\\Block\\Email\\History' area='frontend' template='Mirasvit_Helpdesk::email/history.phtml' ticket=$ticket}} - block with ticket history
  • {{var ticket.getExternalUrl() }} - external ticket's URL
  • {{var store.getFrontendName()}} - name of your store
  • {{var user.firstname}} - first name of ticket owner
  • {{var user.lastname}} - last name of ticket owner
  • {{var user.email}} - email of ticket owner
  • {{var department.name}} - name of ticket's department

Note $format can only be of one of these types: "none", "full", "long", "medium", "short", "traditional", "gregorian". For more information, please check https://www.php.net/manual/en/class.intldateformatter.php#intl.intldateformatter-constants

Custom fields can also be used as variables through their codes, which are prefixed with "f_" prefix. If you have a custom field with the code "test_field", the proper email variable should be "{{var ticket.f_test_field}}". For custom fields of type "Drop-down list", the variable "{{var ticket.f_test_field_label}}" displays a label for the selected value.

Adding variables to custom Notification Emails

Help Desk notifications also support standard Magento Email Template variables, such as {{var logo_alt}}, and supports function calling, like {{var store.getFrontendName()}}, and adds a set of its own variables.

  • {{var customer}} - allows access to customer properties;
  • {{var ticket}} - allows access to ticket properties, including custom fields (see below).
  • {{var department}} - allows access to department properties.

The most usable properties are:

  • {{var customer.getName()}} - Name of current customer
  • {{var customer.getEmail()}} - Email of current customer

  • {{var department.getName()}} - Name of department to which current ticket was assigned
  • {{var department.getSenderEmail()}} - Sender email, used as the field From in notificators

  • {{var ticket.getCode()}} - Code of current ticket, e. g. YVB-459-53185.
  • {{var ticket.getName()}} - Subject of current ticket.
  • {{var ticket.getCustomerEmail()}} - Email of current customer.
  • {{var ticket.getCustomerName()}} - Full name of current customer.
  • {{var ticket.getLastReplyName()}} - Full name of customer or staff member who last replied to the current ticket.
  • {{var ticket.getFrontendLastReplyName()}} - Name of the author to the last reply as it is displayed at the frontend (depending from option Store > Configuration > Help Desk -> General Settings -> Sign staff replies)
  • {{var ticket.getChannel()}} - Name of the channel that created the ticket - e.g. 'email', 'backend' or 'feedback_tab'.
  • {{var ticket.getExternalUrl()}} - Frontend URL of current ticket.
  • {{var ticket.getBackendUrl()}} - Backend URL of current ticket. The variable works correctly if the "Stores > Configuration > ADVANCED > Admin > Security > Add Secret Key to URLs" option is disabled.
  • {{var ticket.getLastMessagePlainText()}} - Contents of last message posted.
  • {{var ticket.getUserName()}} - Full name of current ticket owner.
  • {{var ticket.getOrder()}} - Returns Order object to which current ticket was binded. It provides access to all order's properties (see example below, note that these properties can be used within {{depend}} tag).

Example

Assume that you have to get the order number, to which the current ticket is binded. This requires the following code:

{{depend ticket.getOrder()}}
    {{var ticket.getOrder().getIncrementId()}}
{{/depend}}

Also, if there is a custom field, it can be used as an email variable. Each custom field has a code. Assume that we have created a field with the custom_reason code. Then the corresponding email variable is:

  • {{var ticket.getCustomReason()}} - Email of the current customer.

Signing messages with a custom signature

Our extension allows agents to have their signatures automatically added at the end of each response to the ticket. To add a signature, perform the following steps:

  • Go to System -> All Users grid, and pick up a record for a particular agent.
  • In the Help Desk additional tab, enter the signature to the field Signature for Emails (you can use HTML code, if need be).
  • Save user record to apply the signature.

From that moment, each notification sent by that agent will be signed with the entered text.

Disabling a Notification Email

To disable a Notification Email, you need to go to the Store > Configuration > Help Desk > Email Notification Settings. In the dropdown list of notifications, select the option Disable these emails. Then save the configuration to apply changes.

Examples of custom Notification Email

All custom Notification Emails in Help Desk are created using Workflow Rules.

To add a separate notification to the email flow, you need to set the conditions that should trigger emails to customers' properly, and add a message to the Email Subject and Email Body in Notifications tab. Here are a few real-life examples, which will help you create your custom notifications.

  • Notify Staff of Change of Ownership

    Event: Ticket assigned to staff
    Conditions: None
    Notifications: Send email to ticket owner: Yes

  • Notify a customer about ticket closing, if the customer has not answered for 30 days

    Event: Check every hour
    Conditions:
    Hours since Last reply is 720
    Status is not Closed
    Notifications: Send email to customer: Yes

  • Notify if a ticket has not been answered within three days

    Event: Check every hour
    Conditions:
    Hours since Last reply greater then 72
    Status is Waiting for Customer
    Notifications: Send email to customer: Yes