Unable to trigger an email notification once the SR Is assigned to the queue
Summary:
We have used the below script but it doesn't send any notification, please suggest.
Trigger: AfterTransactionPosted
if (isAttributeChanged('QueueId') && AssigneeResourceId == null) {
try {
def messageText = 'HR Help Desk Request ${SrNumber} has been assigned to a queue ${QueueId}.'
if (QueueId) {
def map = new HashMap()
map.put("Channels", ["ORA_SVC_BELL"])
map.put("MessageText", messageText)
map.put("RecipientQueueId", QueueId)
adf.util.sendNotification(adf, map)
println("Notification sent to all members of QueueId: " + QueueId)
} else {
println("QueueId is null. No queue notification sent.")
}
} catch (e) {
println("Error sending queue assignment notification: " + e)
e.printStackTrace()
}
}
Content (please ensure you mask any confidential information):
Tagged:
0