Difference between revisions of "Itop 3.2 Mail Notifications"

From Notes_Wiki
 
(51 intermediate revisions by the same user not shown)
Line 18: Line 18:
=== New triggers ===
=== New triggers ===


* Trigger when a Request is assigned
==== Trigger when a Request is assigned ====


<pre>
'''Trigger (on entering a state)'''
Trigger (on entering a state)
'''Description''':  Trigger when a Request is assigned  
 
'''Target class''':  User Request  
Description:  Trigger when a Request is assigned  
'''State''': assigned
 
'''Subscription policy''': Allow complete unsubscription
Target class:  User Request  


State: assigned
==== Trigger when a Request is closed ====


Subscription policy: Allow complete unsubscription  
'''Trigger (on entering a state)'''
</pre>
'''Description''':  Trigger when a Request is closed
'''Target class''':  User Request
'''State''': closed
'''Subscription policy''': Allow complete unsubscription  


* Trigger when a Request is closed
==== Trigger when a Request is created ====
<pre>
Trigger (on entering a state)


Description:  Trigger when a Request is closed
'''Trigger (on object creation)'''
'''Description''':  Trigger when a Request is created
'''Target class''':  User Request
'''Subscription policy''': Allow complete unsubscription


Target class:  User Request
==== Trigger when a Request is resolved ====


State: closed
'''Trigger (on entering a state)'''
'''Description''':  Trigger when a Request is resolved
'''Target class''':  User Request
'''State''': resolved
'''Subscription policy''': Allow complete unsubscription


Subscription policy: Allow complete unsubscription
==== Trigger when log update from the portal ====
</pre>


* Trigger when a Request is created
  '''Trigger (when updated from the portal)'''
<pre>
'''Description''': Trigger when log update from the portal  
Trigger (on object creation)
'''Target class''': User Request
 
'''Subscription policy''': Allow complete unsubscription
Description:  Trigger when a Request is created
 
Target class:  User Request
 
Subscription policy: Allow complete unsubscription
</pre>
 
* Trigger when a Request is resolved
<pre>
Trigger (on entering a state)
 
Description:  Trigger when a Request is resolved
 
Target class: User Request
 
State: resolved
 
Subscription policy: Allow complete unsubscription
</pre>
 
* Trigger when log update from the portal
<pre>
Trigger (when updated from the portal)
 
Description: Trigger when log update from the portal  
 
Target class: User Request
 
Subscription policy: Allow complete unsubscription  
</pre>


=== Download '''Send updates by email''' extension ===
=== Download '''Send updates by email''' extension ===
Line 86: Line 62:
* '''Go to iTop Hub > Get extensions from iTop Hub'''
* '''Go to iTop Hub > Get extensions from iTop Hub'''


'''NOTE: We need to register our iTop instance to access the itop store'''
'''NOTE: We need to register our iTop instance to download the extension'''


* Give the username and password
* Give the username and password
Line 120: Line 96:
Actions define what will be done. In the current version of iTop, the only available kind of action consist in sending an email.
Actions define what will be done. In the current version of iTop, the only available kind of action consist in sending an email.


* Go to Configuration > Notifications > Email actions
* Go to '''Configuration > Notifications > Email actions'''


* In the right corner, click on plus icon to create a new action
* In the right corner, click on '''plus''' icon to create a new action


=== New Mail actions ===
=== New Mail actions ===
Line 129: Line 105:


* This mail action sends the mail when a user is assigned to a ticket (user request).  
* This mail action sends the mail when a user is assigned to a ticket (user request).  
<pre>
* '''This mail goes to the following:'''
Name: Notification to the agent when assigned
# The agent who is assigned
 
# The caller who raised the request
Status: In production
# The persons who are included in the '''<mail-id>''' tag
 
# The contacts of a service
Subject: The ticket $this->ref$ has been assigned to this agent
# The team member (team lead) of a team
 
# The contacts of the request
Body:
 
The ticket $this->name()$ has been assigned to the agent: $this->agent_id->friendlyname$
 
Title: $this->title$
 
Description: $this->description$
 
Related Triggers: Trigger when a Request is assigned
 
From (email): <mail-id>
 
Ignore the Notify flag: Yes
 
To: SELECT Person WHERE id = :this->agent_id OR id = :this->caller_id
 
Cc:
SELECT Contact AS C
JOIN lnkContactToService AS L ON L.contact_id = C.id
WHERE L.service_id = :this->service_id
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>' AND :this->team_id = '<team-id>'
UNION
SELECT c
FROM Contact AS c
JOIN lnkContactToTicket AS l ON l.contact_id = c.id
JOIN UserRequest AS ur ON l.ticket_id = ur.id
WHERE ur.ref =:this->ref
</pre>
 
 
* Notification to the agent when closed
<pre>
Name:  Notification to the Agent when Closed
 
Status: In production
 
Subject:  The ticket $this->ref$ has been Closed.
 
 
Body:
 
The ticket $this->name()$ has been Closed.
 
Title: $this->title$
 
Description: $this->description$
 
Related Triggers: Trigger when a Request is closed
 
From (email): <mail-id>
 
Ignore the Notify flag: Yes
 
To:
SELECT Person WHERE id = :this->agent_id OR id = :this->caller_id
 
 
Cc:
SELECT Contact AS C
JOIN lnkContactToService AS L ON L.contact_id = C.id
WHERE L.service_id = :this->service_id
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>' AND :this->team_id = '<team-id>'
UNION
SELECT c
FROM Contact AS c
JOIN lnkContactToTicket AS l ON l.contact_id = c.id
JOIN UserRequest AS ur ON l.ticket_id = ur.id
WHERE ur.ref =:this->ref
</pre>
 
 
* Notification to the Agent when Created
<pre>
Name: Notification to the Agent when Created
 
Status : In production
 
Subject: The ticket $this->ref$ has been created
 
Body:


The ticket $this->name()$ has been created.  
'''Name''': Notification to the agent when assigned
'''Status''': In production
'''Subject''': The ticket $this->ref$ has been assigned to this agent
'''Body''':
The ticket $this->name()$ has been assigned to the agent: $this->agent_id >friendlyname$
Title: $this->title$
Description: $this->description$
'''Related Triggers''': Trigger when a Request is assigned
'''From (email)''': <mail-id>
'''Ignore the Notify flag''': Yes
'''To''': SELECT Person WHERE id = :this->agent_id OR id = :this->caller_id
'''Cc''':
SELECT Contact AS C
JOIN lnkContactToService AS L ON L.contact_id = C.id
WHERE L.service_id = :this->service_id
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>' AND :this->team_id = '<team-id>'
UNION
SELECT c
FROM Contact AS c
JOIN lnkContactToTicket AS l ON l.contact_id = c.id
JOIN UserRequest AS ur ON l.ticket_id = ur.id
WHERE ur.ref =:this->ref


Title: $this->title$
==== Notification to the agent when closed ====


Description: $this->description$
* This mail action sends the mail when the ticket (user request) is closed
* '''This mail goes to the following:'''
# The agent who is assigned
# The caller who raised the request
# The persons who are included in the '''<mail-id>''' tag
# The contacts of a service
# The team member (team lead) of a team
# The contacts of the request


Related Triggers: Trigger when a Request is created
'''Name''':  Notification to the Agent when Closed
'''Status''': In production
'''Subject''':  The ticket $this->ref$ has been Closed.
'''Body''':
The ticket $this->name()$ has been Closed.
Title: $this->title$
Description: $this->description$
'''Related Triggers''': Trigger when a Request is closed
'''From (email)''': <mail-id>
'''Ignore the Notify flag''': Yes
'''To''':
SELECT Person WHERE id = :this->agent_id OR id = :this->caller_id
'''Cc''':
SELECT Contact AS C
JOIN lnkContactToService AS L ON L.contact_id = C.id
WHERE L.service_id = :this->service_id
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>' AND :this->team_id = '<team-id>'
UNION
SELECT c
FROM Contact AS c
JOIN lnkContactToTicket AS l ON l.contact_id = c.id
JOIN UserRequest AS ur ON l.ticket_id = ur.id
WHERE ur.ref =:this->ref


From (email): <mail-id>
==== Notification to the Agent when Created ====


* This mail action sends the mail when a new ticket (user request) is created.
* '''This mail goes to the following:'''
# The caller who raised the ticket
# The persons who are included in the '''<mail-id>''' tag
# The contacts of a service
# The team member (team lead) of a team
# The contacts of the request


To:
'''Name''': Notification to the Agent when Created
SELECT Person WHERE id = :this->agent_id OR id = :this->caller_id
'''Status''': In production
'''Subject''': The ticket $this->ref$ has been created
'''Body''':
The ticket $this->name()$ has been created.
Title: $this->title$
Description: $this->description$
'''Related Triggers''': Trigger when a Request is created
'''From (email)''': <mail-id>
'''To''':
SELECT Person WHERE id = :this->agent_id OR id = :this->caller_id
'''Cc''':
SELECT Contact AS C
JOIN lnkContactToService AS L ON L.contact_id = C.id
WHERE L.service_id = :this->service_id
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>' AND :this->team_id = '<team-id>'
UNION
SELECT c
FROM Contact AS c
JOIN lnkContactToTicket AS l ON l.contact_id = c.id
JOIN UserRequest AS ur ON l.ticket_id = ur.id
WHERE ur.ref =:this->ref


Cc:
==== Notification to the Agent when resolved ====
SELECT Contact AS C
JOIN lnkContactToService AS L ON L.contact_id = C.id
WHERE L.service_id = :this->service_id
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>' AND :this->team_id = '<team-id>'
UNION
SELECT c
FROM Contact AS c
JOIN lnkContactToTicket AS l ON l.contact_id = c.id
JOIN UserRequest AS ur ON l.ticket_id = ur.id
WHERE ur.ref =:this->ref
</pre>


* Notification to the Agent when resolved
* This mail action sends the mail when a ticket (user request) is resolved.
<pre>
* '''This mail goes to the following:'''
Name: Notification to the Agent when resolved
# The agent who is assigned
# The caller who raised the ticket
# The persons who are included in the '''<mail-id>''' tag
# The contacts of a service
# The team member (team lead) of a team
# The contacts of the request


Status: In production
'''Name''': Notification to the Agent when resolved
'''Status''': In production
'''Subject''':  The ticket $this->ref$ has been resolved
'''Body''':
The ticket $this->name()$ has been resolved.
Title: $this->title$
Description: $this->description$
'''Related Triggers''': Trigger when a Request is resolved
'''From (email)''': <mail-id>
'''Ignore the Notify flag''':  Yes
'''To''':
SELECT Person WHERE id = :this->agent_id OR id = :this->caller_id
'''Cc''':
SELECT Contact AS C
JOIN lnkContactToService AS L ON L.contact_id = C.id
WHERE L.service_id = :this->service_id
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>' AND :this->team_id = '<team-id>'
UNION
SELECT c
FROM Contact AS c
JOIN lnkContactToTicket AS l ON l.contact_id = c.id
JOIN UserRequest AS ur ON l.ticket_id = ur.id
WHERE ur.ref =:this->ref


Subject:  The ticket $this->ref$ has been resolved
==== Notification when Private log updated ====


* This mail action sends the mail when the agent updates in the private log.
* '''This mail goes to the following:'''
# The agent and his/her team
# The persons who are included in the '''<mail-id>''' tag
# The contacts of the request with selected Mail domains


Body:
'''Name''':  Notification when Private log updated
'''Status''': In production
'''Subject''': Ticket updated by $current_contact->friendlyname$
'''Body''':
Hello,
The ticket $this->ref$ has been updated by **$current_contact->friendlyname$** ($current_contact->email$).
**Update Summary:**
$this->head(private_log)$
'''Related Trigger''': User Request private log update
'''From (email)''': <mail-id>
'''Ignore the Notify flag''':  Yes
'''To''':
SELECT Team WHERE id = :this->team_id
'''Cc''':
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT c
FROM Contact AS c
JOIN lnkContactToTicket AS l ON l.contact_id = c.id
JOIN UserRequest AS ur ON l.ticket_id = ur.id
WHERE ur.ref = :this->ref
AND (c.email LIKE '%@<domain>' OR c.email LIKE '%@<domain>')


The ticket $this->name()$ has been resolved.
'''NOTE:''' In the body field, Select '''Insert Code Block (<> icon)''', then select '''HTML''' and inside HTML block enter '''$this->head(private_log)$''' to display the line breaks correctly.


Title: $this->title$
==== Notification when Public log updated ====


Description: $this->description$
* This mail action sends the mail when the agent updates the public log.
* '''This mail goes to the following:'''
# The agent who is assigned
# The caller who raised the ticket
# The persons who are included in the <mail-id> tag
# The contacts of a service
# The team member (team lead) of a team
# The contacts of the request


Related Triggers: Trigger when a Request is resolved
'''Name''': Notification when Public log updated
'''Status''': In production
'''Subject''': Ticket $this->ref$ updated by $current_contact->friendlyname$
'''Body''':
Hello,
The ticket $this->ref$ has been updated by **$current_contact->friendlyname$** ($current_contact->email$).
**Update Summary:**
$this->head(public_log)$
'''Related Triggers''': User Request public log update
'''From (email)''': <mail-id>
'''Ignore the Notify flag''': Yes
'''To'''
SELECT Person WHERE id = :this->caller_id OR id = :this->agent_id
'''Cc'''
SELECT Contact AS C
JOIN lnkContactToService AS L ON L.contact_id = C.id
WHERE L.service_id = :this->service_id
UNION
SELECT Contact WHERE email = '<Mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>' AND :this->team_id = '<team-id>'
UNION
SELECT c
FROM Contact AS c
JOIN lnkContactToTicket AS l ON l.contact_id = c.id
JOIN UserRequest AS ur ON l.ticket_id = ur.id
WHERE ur.ref =:this->ref


From (email): <mail-id>
'''NOTE:''' In the body field, Select '''Insert Code Block (<> icon)''', then select '''HTML''' and inside HTML block enter '''$this->head(private_log)$''' to display the line breaks correctly.


Ignore the Notify flag:  Yes
==== Notification When Public log updated from Portal ====


* This mail action sends the mail when the caller updates the ticket (user request) from the portal.
* This mail goes to the following:
# The agent who is assigned
# The caller who raised the ticket
# The persons who are included in the <mail-id> tag
# The contacts of a service
# The team member (team lead) of a team
# The contacts of the request


To:
'''Name''': Notification When Public log updated from Portal
SELECT Person WHERE id = :this->agent_id OR id = :this->caller_id
'''Status''': In production
'''Subject''': Ticket updated (via Portal)
'''Body''':
Hello,
The ticket $this->ref$ has been updated. See the latest update below:
Update Summary:
$this->head(public_log)$
'''Related Triggers''': Trigger when log update from the portal
'''From (email)''': <mail-id>
'''Ignore the Notify flag''': Yes
'''To''':
SELECT Person WHERE id = :this->caller_id OR id = :this->agent_id
'''Cc''':
SELECT Contact AS C
JOIN lnkContactToService AS L ON L.contact_id = C.id
WHERE L.service_id = :this->service_id
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>' AND :this->team_id = '<team-id>'
UNION
SELECT c
FROM Contact AS c
JOIN lnkContactToTicket AS l ON l.contact_id = c.id
JOIN UserRequest AS ur ON l.ticket_id = ur.id
WHERE ur.ref =:this->ref


Cc:
'''NOTE:''' In the body field, Select '''Insert Code Block (<> icon)''', then select '''HTML''' and inside HTML block enter '''$this->head(private_log)$''' to display the line breaks correctly.
SELECT Contact AS C
JOIN lnkContactToService AS L ON L.contact_id = C.id
WHERE L.service_id = :this->service_id
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>' AND :this->team_id = '<team-id>'
UNION
SELECT c
FROM Contact AS c
JOIN lnkContactToTicket AS l ON l.contact_id = c.id
JOIN UserRequest AS ur ON l.ticket_id = ur.id
WHERE ur.ref =:this->ref
</pre>


* Notification when Private log updated
Reference: https://www.itophub.io/wiki/page?id=latest:admin:notifications
<pre>
Name: Notification when Private log updated
 
Status: In production
 
Subject: Ticket updated by $current_contact->friendlyname$
 
 
Body:
 
Hello,
 
The ticket $this->ref$ has been updated by **$current_contact->friendlyname$** ($current_contact->email$).
 
**Update Summary:**
 
$this->head(private_log)$
 
Related Trigger: User Request private log update
 
From (email): <mail-id>
 
Ignore the Notify flag:  Yes
 
 
To:
SELECT Team WHERE id = :this->team_id
 
Cc:
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT c
FROM Contact AS c
JOIN lnkContactToTicket AS l ON l.contact_id = c.id
JOIN UserRequest AS ur ON l.ticket_id = ur.id
WHERE ur.ref =:this->ref
</pre>
 
* Notification when Public log updated
<pre>
Name: Notification when Public log updated
 
Status: In production
 
Subject: Ticket $this->ref$ updated by $current_contact->friendlyname$
 
 
Body:
 
Hello,
 
The ticket $this->ref$ has been updated by **$current_contact->friendlyname$** ($current_contact->email$).
 
**Update Summary:**
 
$this->head(public_log)$
 
Related Triggers: User Request public log update
 
From (email): <mail-id>
 
Ignore the Notify flag: Yes
 
 
To
SELECT Person WHERE id = :this->caller_id OR id = :this->agent_id
 
Cc
SELECT Contact AS C
JOIN lnkContactToService AS L ON L.contact_id = C.id
WHERE L.service_id = :this->service_id
UNION
SELECT Contact WHERE email = '<Mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>' AND :this->team_id = '<team-id>'
UNION
SELECT c
FROM Contact AS c
JOIN lnkContactToTicket AS l ON l.contact_id = c.id
JOIN UserRequest AS ur ON l.ticket_id = ur.id
WHERE ur.ref =:this->ref
</pre>
 
* Notification When Public log updated from Portal
<pre>
Name: Notification When Public log updated from Portal
 
Status: In production
 
Subject: Ticket updated (via Portal)
 
Body:
 
Hello,
 
The ticket $this->ref$ has been updated. See the latest update below:
 
 
Update Summary:
 
$this->head(public_log)$
 
Related Triggers: Trigger when log update from the portal
 
From (email): <mail-id>
 
Ignore the Notify flag: Yes
 
 
To:
SELECT Person WHERE id = :this->caller_id OR id = :this->agent_id
 
Cc:
SELECT Contact AS C
JOIN lnkContactToService AS L ON L.contact_id = C.id
WHERE L.service_id = :this->service_id
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>' AND :this->team_id = '<team-id>'
UNION
SELECT c
FROM Contact AS c
JOIN lnkContactToTicket AS l ON l.contact_id = c.id
JOIN UserRequest AS ur ON l.ticket_id = ur.id
WHERE ur.ref =:this->ref
</pre>

Latest revision as of 05:21, 1 August 2025

Home > Ubuntu > Ubuntu 22.04 > Ubuntu 22.04 Itop 3.2 by Combodo > itop 3.2 Mail Notifications

Triggers

Triggers define when notifications have to be sent. Example: when a ticket reaches the state “assigned”.

Create Triggers

  • Go to Configuration > Notifications > Triggers
  • The below are the Default triggers:
  1. Person mentioned on Ticket
  2. Person mentioned on User
  • In the right corner, click on plus icon to create a new trigger

New triggers

Trigger when a Request is assigned

Trigger (on entering a state)
Description:  Trigger when a Request is assigned 
Target class:  User Request 
State: assigned 
Subscription policy: Allow complete unsubscription 

Trigger when a Request is closed

Trigger (on entering a state)
Description:  Trigger when a Request is closed
Target class:  User Request
State: closed
Subscription policy: Allow complete unsubscription 

Trigger when a Request is created

Trigger (on object creation)
Description:  Trigger when a Request is created
Target class:  User Request
Subscription policy: Allow complete unsubscription

Trigger when a Request is resolved

Trigger (on entering a state)
Description:  Trigger when a Request is resolved
Target class:  User Request
State: resolved
Subscription policy: Allow complete unsubscription 

Trigger when log update from the portal

Trigger (when updated from the portal)
Description: Trigger when log update from the portal 
Target class: User Request
Subscription policy: Allow complete unsubscription

Download Send updates by email extension

This extension allows to send an email when updating the case log (either the public log or private log) of a Ticket. Email reply works with any type of Ticket.

  • Go to iTop Hub > Get extensions from iTop Hub

NOTE: We need to register our iTop instance to download the extension

  • Give the username and password
  • Search for the extension
  • On the extension page, on the right side, click on shop kart icon to download the extension
  • follow the on-screen steps to install the extension
  • once installed, we can find the extension in the following path:

iTop Hub > Deployed extensions

  • The extension comes with the following trigger:
  1. User Request public log update
  • create another trigger for private log update
  • User Request private log update
Description:  User Request private log update 
Target class:  User Request 
Context: Console
Log attribute code:  private_log

Reference: https://www.itophub.io/wiki/page?id=extensions:installation

Email Actions

Actions define what will be done. In the current version of iTop, the only available kind of action consist in sending an email.

  • Go to Configuration > Notifications > Email actions
  • In the right corner, click on plus icon to create a new action

New Mail actions

Notification to the agent when assigned

  • This mail action sends the mail when a user is assigned to a ticket (user request).
  • This mail goes to the following:
  1. The agent who is assigned
  2. The caller who raised the request
  3. The persons who are included in the <mail-id> tag
  4. The contacts of a service
  5. The team member (team lead) of a team
  6. The contacts of the request
Name: Notification to the agent when assigned
Status: In production
Subject: The ticket $this->ref$ has been assigned to this agent 
Body: 
The ticket $this->name()$ has been assigned to the agent: $this->agent_id >friendlyname$
Title: $this->title$ 
Description: $this->description$ 
Related Triggers: Trigger when a Request is assigned
From (email): <mail-id>
Ignore the Notify flag: Yes
To: SELECT Person WHERE id = :this->agent_id OR id = :this->caller_id
Cc:
SELECT Contact AS C
JOIN lnkContactToService AS L ON L.contact_id = C.id
WHERE L.service_id = :this->service_id
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>' AND :this->team_id = '<team-id>'
UNION
SELECT c
FROM Contact AS c
JOIN lnkContactToTicket AS l ON l.contact_id = c.id
JOIN UserRequest AS ur ON l.ticket_id = ur.id
WHERE ur.ref =:this->ref

Notification to the agent when closed

  • This mail action sends the mail when the ticket (user request) is closed
  • This mail goes to the following:
  1. The agent who is assigned
  2. The caller who raised the request
  3. The persons who are included in the <mail-id> tag
  4. The contacts of a service
  5. The team member (team lead) of a team
  6. The contacts of the request
Name:  Notification to the Agent when Closed 
Status: In production
Subject:  The ticket $this->ref$ has been Closed. 
Body:
The ticket $this->name()$ has been Closed. 
Title: $this->title$
Description: $this->description$
Related Triggers: Trigger when a Request is closed
From (email): <mail-id>
Ignore the Notify flag: Yes
To:
SELECT Person WHERE id = :this->agent_id OR id = :this->caller_id
Cc:
SELECT Contact AS C
JOIN lnkContactToService AS L ON L.contact_id = C.id
WHERE L.service_id = :this->service_id
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>' AND :this->team_id = '<team-id>'
UNION
SELECT c
FROM Contact AS c
JOIN lnkContactToTicket AS l ON l.contact_id = c.id
JOIN UserRequest AS ur ON l.ticket_id = ur.id
WHERE ur.ref =:this->ref

Notification to the Agent when Created

  • This mail action sends the mail when a new ticket (user request) is created.
  • This mail goes to the following:
  1. The caller who raised the ticket
  2. The persons who are included in the <mail-id> tag
  3. The contacts of a service
  4. The team member (team lead) of a team
  5. The contacts of the request
Name: Notification to the Agent when Created
Status: In production
Subject: The ticket $this->ref$ has been created 
Body:
The ticket $this->name()$ has been created. 
Title: $this->title$
Description: $this->description$ 
Related Triggers: Trigger when a Request is created
From (email): <mail-id>
To:
SELECT Person WHERE id = :this->agent_id OR id = :this->caller_id
Cc:
SELECT Contact AS C
JOIN lnkContactToService AS L ON L.contact_id = C.id
WHERE L.service_id = :this->service_id
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>' AND :this->team_id = '<team-id>'
UNION
SELECT c
FROM Contact AS c
JOIN lnkContactToTicket AS l ON l.contact_id = c.id
JOIN UserRequest AS ur ON l.ticket_id = ur.id
WHERE ur.ref =:this->ref

Notification to the Agent when resolved

  • This mail action sends the mail when a ticket (user request) is resolved.
  • This mail goes to the following:
  1. The agent who is assigned
  2. The caller who raised the ticket
  3. The persons who are included in the <mail-id> tag
  4. The contacts of a service
  5. The team member (team lead) of a team
  6. The contacts of the request
Name: Notification to the Agent when resolved 
Status: In production
Subject:  The ticket $this->ref$ has been resolved
Body:
The ticket $this->name()$ has been resolved.
Title: $this->title$ 
Description: $this->description$
Related Triggers: Trigger when a Request is resolved
From (email): <mail-id>
Ignore the Notify flag:  Yes
To:
SELECT Person WHERE id = :this->agent_id OR id = :this->caller_id
Cc:
SELECT Contact AS C
JOIN lnkContactToService AS L ON L.contact_id = C.id
WHERE L.service_id = :this->service_id
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>' AND :this->team_id = '<team-id>'
UNION
SELECT c
FROM Contact AS c
JOIN lnkContactToTicket AS l ON l.contact_id = c.id
JOIN UserRequest AS ur ON l.ticket_id = ur.id
WHERE ur.ref =:this->ref

Notification when Private log updated

  • This mail action sends the mail when the agent updates in the private log.
  • This mail goes to the following:
  1. The agent and his/her team
  2. The persons who are included in the <mail-id> tag
  3. The contacts of the request with selected Mail domains
Name:  Notification when Private log updated 
Status: In production
Subject: Ticket updated by $current_contact->friendlyname$
Body:
Hello,
The ticket $this->ref$ has been updated by **$current_contact->friendlyname$** ($current_contact->email$).
**Update Summary:**
$this->head(private_log)$ 
Related Trigger: User Request private log update
From (email): <mail-id>
Ignore the Notify flag:  Yes
To:
SELECT Team WHERE id = :this->team_id
Cc:
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT c
FROM Contact AS c
JOIN lnkContactToTicket AS l ON l.contact_id = c.id
JOIN UserRequest AS ur ON l.ticket_id = ur.id
WHERE ur.ref = :this->ref
AND (c.email LIKE '%@<domain>' OR c.email LIKE '%@<domain>')

NOTE: In the body field, Select Insert Code Block (<> icon), then select HTML and inside HTML block enter $this->head(private_log)$ to display the line breaks correctly.

Notification when Public log updated

  • This mail action sends the mail when the agent updates the public log.
  • This mail goes to the following:
  1. The agent who is assigned
  2. The caller who raised the ticket
  3. The persons who are included in the <mail-id> tag
  4. The contacts of a service
  5. The team member (team lead) of a team
  6. The contacts of the request
Name: Notification when Public log updated
Status: In production
Subject: Ticket $this->ref$ updated by $current_contact->friendlyname$
Body:
Hello,
The ticket $this->ref$ has been updated by **$current_contact->friendlyname$** ($current_contact->email$).
**Update Summary:**
$this->head(public_log)$ 
Related Triggers: User Request public log update
From (email): <mail-id>
Ignore the Notify flag: Yes
To
SELECT Person WHERE id = :this->caller_id OR id = :this->agent_id
Cc
SELECT Contact AS C
JOIN lnkContactToService AS L ON L.contact_id = C.id
WHERE L.service_id = :this->service_id
UNION
SELECT Contact WHERE email = '<Mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>' AND :this->team_id = '<team-id>'
UNION
SELECT c
FROM Contact AS c
JOIN lnkContactToTicket AS l ON l.contact_id = c.id
JOIN UserRequest AS ur ON l.ticket_id = ur.id
WHERE ur.ref =:this->ref

NOTE: In the body field, Select Insert Code Block (<> icon), then select HTML and inside HTML block enter $this->head(private_log)$ to display the line breaks correctly.

Notification When Public log updated from Portal

  • This mail action sends the mail when the caller updates the ticket (user request) from the portal.
  • This mail goes to the following:
  1. The agent who is assigned
  2. The caller who raised the ticket
  3. The persons who are included in the <mail-id> tag
  4. The contacts of a service
  5. The team member (team lead) of a team
  6. The contacts of the request
Name: Notification When Public log updated from Portal
Status: In production
Subject: Ticket updated (via Portal) 
Body:
Hello,
The ticket $this->ref$ has been updated. See the latest update below:
Update Summary:
$this->head(public_log)$ 
Related Triggers: Trigger when log update from the portal
From (email): <mail-id>
Ignore the Notify flag: Yes
To:
SELECT Person WHERE id = :this->caller_id OR id = :this->agent_id
Cc:
SELECT Contact AS C
JOIN lnkContactToService AS L ON L.contact_id = C.id
WHERE L.service_id = :this->service_id
UNION
SELECT Contact WHERE email = '<mail-id>'
UNION
SELECT Contact WHERE email = '<mail-id>' AND :this->team_id = '<team-id>'
UNION
SELECT c
FROM Contact AS c
JOIN lnkContactToTicket AS l ON l.contact_id = c.id
JOIN UserRequest AS ur ON l.ticket_id = ur.id
WHERE ur.ref =:this->ref

NOTE: In the body field, Select Insert Code Block (<> icon), then select HTML and inside HTML block enter $this->head(private_log)$ to display the line breaks correctly.

Reference: https://www.itophub.io/wiki/page?id=latest:admin:notifications