0% found this document useful (0 votes)
82 views5 pages

Sensitivity: Internal & Restricted

This document provides instructions to configure email and notification alerts when a service request is assigned to a queue in Oracle Service Cloud. It involves: 1. Creating an object function to retrieve email addresses of queue members 2. Adding a custom field to display the email addresses 3. Configuring an object workflow to send emails when the queue is updated 4. Adding an object trigger to send notifications to queue members when certain service requests are created

Uploaded by

Sameer Kasargod
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
82 views5 pages

Sensitivity: Internal & Restricted

This document provides instructions to configure email and notification alerts when a service request is assigned to a queue in Oracle Service Cloud. It involves: 1. Creating an object function to retrieve email addresses of queue members 2. Adding a custom field to display the email addresses 3. Configuring an object workflow to send emails when the queue is updated 4. Adding an object trigger to send notifications to queue members when certain service requests are created

Uploaded by

Sameer Kasargod
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

1.

Enable Sandbox navigate Service Request > Service Scripts > Object Functions > Click on Add

def strEmails = "";


if (AssigneePersonName == "" || AssigneePersonName == null ) {
def srQueue = QueueName;
if(srQueue != "" || srQueue != null) {
def queueMemVo = SvcQueue?.resourceMembers;
if (queueMemVo != null) {
queueMemVo.reset();
while(queueMemVo.hasNext()) {
def queueResRow = queueMemVo.next();
if (strEmails == "")
strEmails = queueResRow?.EmailAddress
else
strEmails = strEmails + "," + queueResRow?.EmailAddress;
}
}
}
}
return strEmails;

2. Create a Custom field on Service Request and Choose field type = Formula, Formula Type = Text

Sensitivity: Internal & Restricted


Enter the formula details and click Next

In the script field enter Get_Member_Emails()

if ( (CategoryName == 'Payroll') || (CategoryName == 'Change my Bank Account') || (CategoryName ==


'Deductions') || (CategoryName == 'Payment Method') )

Sensitivity: Internal & Restricted


{
Get_Member_Emails()
}

3. Create an Object Workflow on the Service request to send e-mail notification to the list of emails
Navigate to Object Workflow > Service Request > Create as following

The object workflow can be 'When SR is created' or 'When SR is Update' [ as per this project I have chosen
‘When a record is updated’ update trigger]

The following condition must be used


if (isAttributeChanged('QueueId') && (AssigneePersonName == "" || AssigneePersonName == null))
return true;

On the same trigger on the email Add email notification [provide the name ‘Send Queue Resource Email’ ]

Click to email address


Click Field on Record and you will see the formula custom field you have created in step2. Move it to right side

Sensitivity: Internal & Restricted


4. Create an object trigger to send bell notification to the list of emails
Standard Object > Service Request > Service Scripts > Trigger > Add and Enter following script

Sensitivity: Internal & Restricted


Now as per this project need we have added additional condition to trigger only when specific category SR is
created

if ( (AssigneePersonName == "" || AssigneePersonName == null) &&


( (CategoryName == 'Payroll') || (CategoryName == 'Change my Bank Account') || (CategoryName ==
'Deductions') || (CategoryName == 'Payment Method') )
)
{
def srQueue = QueueName;
if(srQueue != "" || srQueue != null)
{
def queueMemVo = SvcQueue?.resourceMembers;
if (queueMemVo != null)
{
queueMemVo.reset();
while(queueMemVo.hasNext())
{
def queueResRow = queueMemVo.next();
def map = new HashMap();
map.put("Channels", ["ORA_SVC_BELL"]);
map.put("MessageText", 'SR is assigned to your queue');
map.put("RecipientPartyId", queueResRow?.ObjectId);
adf.util.sendNotification(adf, map)
}
}
}
}

Sensitivity: Internal & Restricted

You might also like