Skip to main content

How do I add ticket properties to user emails? - Knowledgebase / Deskpro Legacy - Deskpro Support

WARNING: You're browsing documentation for an older version of Deskpro. Consider upgrading to Deskpro Horizon

How do I add ticket properties to user emails?

Authors list

Ticket emails sent to users by default contain only message texts. This is so emails to regular users seem like regular email. But you can easily edit the notification templates to add additional information, such as the summary table included in agent emails.

 

New HTML

In a moment we will be editing email templates to add information to user notifications. In each case, we will be adding the following HTML table. You can simply copy and paste the same code into each template.

<table class="dp-props-table" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td class="dp-td-heading" colspan="2">
			View this ticket online: <a href="{{ ticket.link }}">{{ ticket.link }}</a>
		</td>
	</tr>
	<tr>
		<td class="dp-td-heading">ID</td>
		<td>{{ ticket.id }}</td>
	</tr>
	{% if app.getSetting('core.tickets.use_ref') %}
		<tr>
			<td class="dp-td-heading">Reference</td>
			<td>{{ ticket.ref }}</td>
		</tr>
	{% endif %}
	<tr>
		<td class="dp-td-heading">Status</td>
		<td>
			{{ phrase( 'agent.tickets.status_' ~ ticket.status) }}
		</td>
	</tr>
	<tr>
		<td class="dp-td-heading">Agent</td>
		<td>{{ticket.agent.display_name|default(phrase('agent.general.unassigned'))}}</td>
	</tr>
	{% if ticket.agent_team %}
		<tr>
			<td class="dp-td-heading">Team</td>
			<td>{{ticket.agent_team.name}}</td>
		</tr>
	{% endif %}
	{% if ticket.department %}
		<tr>
			<td class="dp-td-heading">Department</td>
			<td>{{ticket.department.full_title}}</td>
		</tr>
	{% endif %}
	{% if ticket.category %}
		<tr>
			<td class="dp-td-heading">Category</td>
			<td>{{ticket.category.full_title}}</td>
		</tr>
	{% endif %}
	{% if ticket.product %}
		<tr>
			<td class="dp-td-heading">Product</td>
			<td>{{ticket.product.title}}</td>
		</tr>
	{% endif %}
	{% if ticket.priority %}
		<tr>
			<td class="dp-td-heading">Priority</td>
			<td>{{ticket.priority.title}}</td>
		</tr>
	{% endif %}
	{% if ticket.workflow %}
		<tr>
			<td class="dp-td-heading">Workflow</td>
			<td>{{ticket.workflow.title}}</td>
		</tr>
	{% endif %}
	{% for f in custom_fields %}
		{% if ticket.hasCustomField(f.field_def.id) %}
			<tr>
				<td class="dp-th-heading">{{ f.title }}</td>
				<td>
					{{ render_custom_field(f) }}
				</td>
			</tr>
		{% endif %}
	{% endfor %}
</table>

Edit Templates

From Admin > Emails > Email Templates > User Email Templates, edit the following templates:

  • New Ticket Confirmation
  • New Ticket By Agent
  • New Agent Reply
  • User Reply Auto-Reponse

In each one, copy the HTML above where you want the table to appear.

Helpful Unhelpful

33 of 83 people found this page helpful

Add a comment

Please log in or register to submit a comment.

Need a password reminder?