Last reply by from technician or requester
This report gives the last Conversation of Technician and requester.
To make any changes to a query, refer to the KB article below.
SELECT wo.WORKORDERID "Request ID",
max(aau.FIRST_NAME) "Requester",
max(wo.TITLE) "Subject",
max(ti.FIRST_NAME) "Technician",
longtodate(max(wo.CREATEDTIME)) "Created Time",
CASE
WHEN max(wos.notificationstatus) = 'REQ_REPLY' THEN max(c.description)
WHEN max(wos.notificationstatus) = 'TECH_REPLY' THEN max(n.description)
ELSE NULL
END "Last conversation" FROM WorkOrder wo
LEFT JOIN SDUser sdu ON wo.REQUESTERID=sdu.USERID
LEFT JOIN AaaUser aau ON sdu.USERID=aau.USER_ID
LEFT JOIN WorkOrderStates wos ON wo.WORKORDERID=wos.WORKORDERID
LEFT JOIN SDUser td ON wos.OWNERID=td.USERID
LEFT JOIN AaaUser ti ON td.USERID=ti.USER_ID
LEFT JOIN StatusDefinition std ON wos.STATUSID=std.STATUSID
LEFT JOIN
(SELECT con.workorderid,
cond.description FROM conversation con
LEFT JOIN aaauser au1 ON con.requesterid=au1.user_id
LEFT JOIN conversationdescription cond ON con.CONVERSATIONID= cond.CONVERSATIONID) c ON c.workorderid=wo.workorderid
LEFT JOIN
(SELECT nw.workorderid,
nod.description FROM notify_workorder nw
LEFT JOIN notification NO ON nw.notificationid=no.notificationid
LEFT JOIN aaauser au2 ON no.senderid=au2.user_id
LEFT JOIN notificationtodesc nod ON no.NOTIFICATIONID=nod.NOTIFICATIONID
WHERE no.senderid !=1) n ON n.workorderid=wo.workorderid
WHERE std.ispending='1'
GROUP BY wo.WORKORDERID
Note : Login to ServiceDesk Plus, go to Reports tab > New Query Report > Copy the query to the query editor and run the report.
New to ADSelfService Plus?
Related Articles
Query to show last conversation and last notification in a request ( MSSQL )
Tested in Build MSSQL (14306) Query SELECT wo.WORKORDERID "Request ID", aau.FIRST_NAME "Requester", wo.TITLE "Subject", ti.FIRST_NAME "Technician", longtodate(wo.CREATEDTIME) "Created Time", (select conversationdescription.description from ...
How to send periodic notifications to requester(s) about their pending requests and accordingly update their status.
This post describes the use of a python script to notify requester(s) about their requests through email and move those to a specific status. Use Case: Let us assume a scenario where the technicians reply to a request and put it in a custom status ...
Query to show last conversation and last notification in a request ( PGSQL )
Tested in Build PGSQL (14300) SELECT wo.WORKORDERID "Request ID", aau.FIRST_NAME "Requester", wo.TITLE "Subject", ti.FIRST_NAME "Technician", longtodate(wo.CREATEDTIME) "Created Time", (select conversationdescription.description from ...
Update Request Status upon Receiving a New Reply from Technician
Use case: When a technician works on a request, there might be incidents where he might need additional information from the requester. In such cases, when the technician replies to the customer the ticket status should be changed to "On-Hold". Steps ...
Converting a requester to a technician
Please follow the below steps to convert a requester to a technician. Step 1 (If the requester is already added under MSP Requester): 1) Log in as an administrator. 2) Go to Admin tab>>MSP Details>>MSP Requester(Left hand column). 3) Click on the ...