Access Keys:
Skip to content (Access Key - 0)

Q: How do I create a custom email reply for my queue in Request Tracker ?

Context

  • Request Tracker (RT) 4 at MIT
  • Queue administrators

Solution

You will need to be a queue administrator for your queue to implement this solution. The basic steps to creating a custom auto-reply are:

  • Create a local template for your auto-reply
  • Add or modify the On Create Autoreply To Requestors scrip for your queue

Details

Templates

Templates define the content and format of email messages sent by RT when tickets are created, replied to, etc. By default, your queue uses common 'global' templates which define a basic format for the messages. These templates are referred to in the section on scrips in articles about queue creation and RT queue administration. Global templates are available to all RT queue administrators for use in their queues.

If you want to tailor the content of messages being sent for your queue you can easily do this by creating your own templates and then modifying your scrips to use your templates rather than the global templates. For example, you might want to improve on the message sent to clients when they generate a new ticket via email.

We suggest that you always start with a copy of the global auto-reply template to avoid common mistakes and formatting errors that can creep in if you create your template from scratch. For your convenience, we have reproduced the content of MIT's global auto-reply template below:

Global Template Autoreply
Subject: AutoReply: {$Ticket->Subject}

Thank you for your message! This is an automated confirmation
that we have received your request and assigned it ticket
number {$Ticket->id()} in our tracking system.

Please keep the subject line above for future correspondence
relating to this case.

If you wish you may also follow up on your ticket on the web at:

     https://help.mit.edu/SelfService/


-----Original Message-----
Date: {$Transaction->Attachments->First->GetHeader('Date')}
To: {$Transaction->Attachments->First->GetHeader('To')}
From: {$Transaction->Attachments->First->GetHeader('From')}
Cc: {$Transaction->Attachments->First->GetHeader('Cc')}
Subject: {$Ticket->Subject}

{$Transaction->Content()}

Create a local Autoreply template for your queue

  • Create a new template for your queue
    • Go to Configuration > Queues > Select.
    • Pick your queue name
    • Go to the Templates tab and pick Create
  • Fill out the create form and save
    • Give your new template a name
    • Enter an optional description
    • Paste a copy of the global template into the Content field
    • Make any changes you need to
    • Click Save CHanges

Some things to be careful about: Make sure there is a blank line between the last of your header lines and the first line of the content of your message. In the default Autoreply template, the "Subject:" line is the only header line. Similarly, make sure there are no blank lines between any of your header lines. The template will be passed to the email program as you enter it, and if there are blank lines in the header or if the header is not clearly delineated from the body of the message by a blank line, the generated email message will not be processed correctly.

The default template and your template may contain some simplified Perl code. Take care to leave this code intact if you want to use it as-is, remove it completely, or change it only if you are familiar with custom Perl code in RT templates.

The Scrip

Scrips are used by RT to fire off notifications associated with ticket actions, and perform other automatic actions.

  • Tell your scrip to use your new template rather than the global one:
    • Go to Configuration > Queues > Select.
    • Pick your queue name
    • Go to the Scrips tab and pick Select
  • Find the On Create Autoreply to Requestors with Global template Autoreply scrip in the list and update it
    • Change the name of the scrip to reflect the use of your local template, for example change it to On Create Autoreply to Requestors with my template My Autoreply
    • Find your template in the Template drop-down list and select it
    • Click Save Changes

If you were not able to find the above scrip in your queue's list of scrips

Some queues may not be set up to send auto-replies, and you may be trying to change this and add an auto-reply for the first time. In this case, use these steps to add a new scrip rather than editing the existing one:

  • Go to Configuration > Queues > Select.
  • Pick your queue name
  • Go to the Scrips tab and pick Create
  • Enter the necessary information for your new scrip and create it
    • Description: On Create Autoreply to Requestors with my template My Template (or something similar)
    • Condition: On Create
    • Action: Autoreply To Requestors
    • Template: (Select your template)
    • Stage: TransactionCreate
  • Click Create
  • Find the On Create Autoreply to Requestors with Global template Autoreply scrip in the list and update it
    • Change the name of the scrip to reflect the use of your local template, for example change it to On Create Autoreply to Requestors with my template My Autoreply
    • Find your template in the Template drop-down list and select it
    • Click Save Changes

Test your new functionality

You will want to test your new template and scrip changes by creating a new ticket, via email if that is the common case for your queue, to make sure you received the correct auto-reply.

IS&T Contributions

Documentation and information provided by IS&T staff members


Last Modified:

April 06, 2012

Get Help

Request help
from the Help Desk
Report a security incident
to the Security Team
Labels:
rt rt Delete
c-rt-queue-admin c-rt-queue-admin Delete
c-rt-queue-admin-email c-rt-queue-admin-email Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
Feedback
This product/service is:
Easy to use
Average
Difficult to use

This article is:
Helpful
Inaccurate
Obsolete
Adaptavist Theme Builder (4.2.3) Powered by Atlassian Confluence 3.5.13, the Enterprise Wiki