Send case notification when opened by is different to the contact
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2024 06:10 AM
Hi All,
I have a requirement on a case to send an a notification when the case is opened and the contact on the notification is different to the opened by.
I've tried building this in the condition builder, but it won't let me do this. Does anyone know how I can meet this requirement?
Kind Regards,
Luke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2024 07:14 AM
@Sid_Takali Thanks very much. I need to also check if the contact has the role sn_customerservice.customer. Could that also be written in the advanced condition?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2024 07:29 AM - edited 04-15-2024 07:40 AM
Hi @Luke James Yes, You can
if ((current.contact.hasRole('sn_customerservice.customer')) && (current.contact != current.opened_by)) {
answer = true;
} else {
answer = false;
}
Please Mark my answer Correct/Helpful, If I'm able to resolve your issue,
Regards,
Siddha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2024 07:55 AM
Thanks very much for this @Sid_Takali. The notification does seem to still be sending though even though the contact on the case does not have the role "sn_customerservice.customer'?
Any thoughts?
Kind Regards,
Luke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2024 11:19 AM
Hi @Luke James Try this code
var Contact = gs.getUser().getUserByID(current.getValue('contact')).hasRole('sn_customerservice.customer');
if ((Contact) && (current.contact != current.opened_by)) {
answer = true;
} else {
answer = false;
}
Please Mark my answer Correct/Helpful, If I'm able to resolve your issue,
Regards,
Siddha
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2024 11:43 AM
Hi @Luke James Try this code,
var Contact = gs.getUser().getUserByID(current.getValue('contact')).hasRole('sn_customerservice.customer');
if ((Contact) && (current.contact != current.opened_by)) {
answer = true;
} else {
answer = false;
}
Please Mark my answer Correct/Helpful, If I'm able to resolve your issue,
Regards,
Siddha