iTop Extensions

Predefined response models

Predefined response models
Pick common answers from a list of predefined replies grouped by categories to update tickets log
Precanned Replies
iTop Hub
PHP 8.0


This extension is a complement to Send updates by email. It provides a quick way to fill the case log field by picking from a list of “precanned” answers. The answers are organized into Categories and Organizations (supporting multi-tenancy).

  • List of “precanned” replies, for answering quickly the most common questions
  • Organize the answers by category to easily find them
  • Support of multi-tenancy: each Organization can have its list of “precanned” answers.
  • Attachments can be added to the answer for automatic attachment to the email

Revision History

Migration to 1.1.5: we have added default criterion for the PrecannedReply class. It will conflict if you have done it already through an XML extension.
Release Date Version Comments
2022-03-22 1.2.2 * Remove deprecated function
* Raise iTop min to 2.4.0
* Fix compatibility with iTop 3.0.1+
2021-12-21 1.2.1 * Add compatibility with 3.0
* Reply now inserted at cursor position instead of the beginning of the text
* Now works in iTop 3 quick edit
2020-03-06 1.1.5 Add search criterion
2018-12-19 1.1.4 Support of JQuery 3 (iTop 2.6.0)
2018-06-26 1.1.3 NL translation, default search attributes, iTop 2.5 compatibility
2018-01-26 1.1.2 Add Russian translation.
2016-08-08 1.1.1 Compatibility with iTop 2.3.0 (formatted text) and bug fix to support pagination in the popup dialog for selecting a reply.
2015-09-29 1.0.5 Compatibility with iTop 2.2.0 and custom portals.
2014-12-10 1.0.4 Cosmetic on the module name (internal).
2014-09-25 1.0.3 Better initial sizing and positioning of the dialog box.
2014-09-15 1.0.2 Handling of the dialog's resize. Localization of the dialog's title.
2014-03-11 1.0.1 Integration of the German translation (thanks to ITOMIG GmbH)
2014-03-06 1.0.0 First released version


  • It can be activated only on a single class of object, also it can be an abstract class.
  • And for that class, it can be enabled on a single Caselog type of field only.
  • Predefined responses are available only
    • on the Console, not on any portal.
    • on object modification, not on transition forms, even if the caselog field is prompted.


This extension requires the Send updates by email extension to be installed as well.


Use the Standard installation process for this extension.


Creating Precanned Replies

Use the menus under “Service Management” to create and maintain your precanned replies and their categories:

Precanned replies menus

The form for creating a new Precanned reply looks as follows:

New Precanned Reply

The “Body” field contains the text that will be added into the case log of the ticket when using this precanned replies. If you have configured the attachments to allow them on Precanned Replies, you can add attachments to the Precanned Reply using the “Attachments” tab.

Within the body of your reply, you can use classic placeholders
$this->xxxx$ refers to the Ticket in which the predefined response is copied

It is possible to send email notifications anytime a user enters a comment in a case log.

This trigger is activated only when the case log is updated on the console.
If you want to notify the agent when a user updates the log on the portal then use the standard trigger (when updated from the portal)

The natural usage of the feature is in the area of user request management: the agent replies to the requester while updating the request within the iTop GUI.

Email reply

The agent can save time by using precanned replies for the most common questions:

  • Organize the replies by category to easily find them
  • Support of multi-tenancy: each Organization can have its list of precanned replies.
  • Attachments can be added to the answer for automatic attachment to the email

Configure notifications

From the Admin tools/Notifications menu, create a trigger “when log is updated”, and select the expected object class and case log attribute code:

Example of a Trigger "on log update"

The optional argument 'Filter' is used to specialize the trigger. The filter is an OQL specifying which objects will be taken into account by the trigger. In the given example, the created trigger will be activated only for User Request having a Service named like “…Network…”.

If a filter has been given, it will be taken into account when it comes to activate the trigger for the current object. On the other hand, the clues that say to the end-user “an email will be sent” are always visible. In practice, this is not an issue if you have configured several triggers so that a notification will be sent in ANY case.

Create an email action for this trigger. This email action can be configured as follows:

  • Status = any active state (e.g 'In production' or 'Being tested')
  • TO = SELECT Person WHERE id = :this->caller_id
  • Body = Dear $this->caller_id_friendlyname$, … $this->head(public_log)$ …
  • … plus other fields required to send notifications

Example of an Email Action

The installation of the module automatically creates a default Trigger and its associated action (in test mode). As the test email recipient is a dummy address, that cannot work without adjustments.
The feature will not be available if the Email action is not in an active state.
The syntax $this->head(public_log)$ adds the latest entry from the public_log field into the body of the notification.
Since iTop 2.2.1, the case log (and the notifications) contain HTML formatted text. The syntax to add the latest entry of a case log into a notification is $this->head_html(public_log)$.


In the iTop configuration file, the administrator defines on which class the precanned replies option will be proposed and in which CaseLog the reply will be copied.

  'precanned-replies' => array (
                'target_class' => 'UserRequest',
                'target_caselog' => 'public_log',
To activate Predefined Requests also on Incident, you can use:
        'target_class' => 'Ticket',
        'target_caselog' => 'public_log',

Also the field 'public_log' does not exist on Ticket class, it works. When modifying a ticket with no 'public_log', such as a Change or a Problem, it just ignores silently this configuration parameter.

In order to add attachments to your Precanned Replies, change the itop-attachments section in the iTop configuration file to:

        'itop-attachments' => array (
                'allowed_classes' => array (
                          0 => 'Ticket',
                          1 => 'PrecannedReply',
                'position' => 'relations',


Using Precanned Replies

When modifying a Ticket, the public case log contains a new button “Templates” in its header:

Precanned Replies button

Click on the “Templates” button to select a Precanned Reply from the list: Select a Precanned Reply

You can use the search criteria at the top to filter the list.

When clicking “ADD”, the answer is written into the case log field. Attachments (if any) to the Precanned reply are added to the answer (the count next to the paper clip icon is increased accordingly):

Reply added

When submitting the modifications to the ticket, the case log will be updated, as if the answer was typed manually.

Selecting attachements

Email Reply on a case log

The user can select the attachments to be sent along with the reply, by pressing the “Select Attachments…” button. This displays the following dialog box:

Attachments selection

Click on the check-box in front of each desired attachment then click “Ok” to validate the choice.

All new attachments added during the modification of the Ticket will be checked by default. As soon as a new attachment is added to the Ticket (while it is being edited) the number next to the paper clip increases. Moving the mouse over the paper clip icon displays a small tooltip with the list of files that will be sent as attachments with the notification.

Attachments coming with a precanned reply will be attached to the email but they will NOT be saved into the ticket.

If the checkbox “Send the reply by email” is checked, an answer will be sent by email, as explained in Send updates by email.

extensions/precanned-replies-pro.txt · Last modified: 2023/03/15 11:31 (external edit)
Back to top
Contact us