To send an acknowledgement email notifications to change owner for every reply conversation in change.

To send an acknowledgement email notifications to change owner for every reply conversation in change.

 

 Overview 

The below document explains the steps that need to be configured for sending notifications to change owner for every reply conversation in changes.


(i.e) When a reply is sent and a conversation is added to a change then the acknowledgment mail will be sent to the change owner.

Implementation

To achieve this requirement, we will be using the following functionalities in our product.

  1. DB trigger

  1. Global functions

  1. Callback Custom Functions

(I) DB Trigger configuration.

To configure DB trigger, add the following entries in the mentioned xml,  

  1. Edit [MSP_HOME]\conf\OperationHandler.xml and add following entries

 

 <Module name="Notify_Change" table="Notify_Change" operation="C"/> 

 

  1. Edit [MSP_HOME]\conf\Observers.xml and add the following entries

 

 <Observer class="com.adventnet.mspdesk.service.ScriptObserver" modules="Notify_Change"/> 

 

  1. Edit [MSP_HOME]\conf\ScriptObserver.xml and add following entries

 

<Script module="Notify_Change" output="CHANGEID" table="Notify_Change" command="change_notify.txt"/>

 

  1. Create change_notify.txt file under [MSP_HOME]\integration\custom_scripts\executor_files and place below content in it

 py triggerchangenotification.py $id
 
  1. Place the attached  triggerchangenotification.py file under [MSP_HOME]\integration\custom_scripts 

 Note : If there are existing entries in step 1,2,3 retain the same and add the new entries alone.


 

6. Global functions

 

Configure the following global functions under Admin>>Global functions.

Function 1 

 

Function Name - Get Configuration

Return type - Map

API Name - getconfiguration

Function definition Code attcahed, Refer the attached getconfiguration.txt


Note : Edit the url and techniciankey in the below function


 



 

 Function 2

Function Name - Get reply notifications of change

Return type - String

API Name - getchangereplynotifications

Parameters -

changeid=int

Function definition Code attached,Refer the attached getchangereplynotifications.txt



 

 

 

7.Custom Callback functions.


Once the above Global functions are defined, configure the Custom call back function as below under Admin>>Callback functions.

 

Function Name - send acknowledgement mail for change owner

Return type - void

API Name - sendemailtochangeowner

Publish - True

Parameters -changeid=int

Function definition Code attached. Refer the attached customcallbackfunction.txt 

 

Configure the "from" email id from whom the mail should be sent.





Note: Copy the URL shown under "URL to execute this Custom Function" and configure the same in  triggerchangenotification.py



Sample email sent to change owner:




                  New to ADSelfService Plus?