Overview
The below document explains the steps that need to be configured for sending notifications to change owner for every reply conversation in changes.
To achieve this requirement, we will be using the following functionalities in our product.
DB trigger
Global functions
Callback Custom Functions
(I) DB Trigger configuration.
To configure DB trigger, add the following entries in the mentioned xml,
Edit [MSP_HOME]\conf\OperationHandler.xml and add following entries
<Module name="Notify_Change" table="Notify_Change" operation="C"/>
Edit [MSP_HOME]\conf\Observers.xml and add the following entries
<Observer class="com.adventnet.mspdesk.service.ScriptObserver" modules="Notify_Change"/>
Edit [MSP_HOME]\conf\ScriptObserver.xml and add following entries
<Script module="Notify_Change" output="CHANGEID" table="Notify_Change" command="change_notify.txt"/>
Create change_notify.txt file under [MSP_HOME]\integration\custom_scripts\executor_files and place below content in it
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.
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.
Sample email sent to change owner: