Limit number of emails sent when at-mentioned while being assigned a task

vinuth v
Tera Expert

Hi All,

 

I need to Limit number of emails sent when at-mentioned while being assigned a task,

Currently 2 email notification will trigger, when assigned to person and at-mentioned person both are same, I need to reduce the notification to one. Only one notification should trigger that is at-mentioned notification and "${number} has had work notes added" notification should not trigger.

 

1. Assigned Catalog Task Worknoted

vinuthv_0-1716218540864.pngvinuthv_1-1716218559685.pngvinuthv_2-1716218580435.png

 

 

2. Activity Stream @Mention Email

vinuthv_3-1716218664884.png

vinuthv_4-1716218689487.pngvinuthv_5-1716218706515.png

vinuthv_6-1716218730548.png

 

Please any one suggest me, how to reduce the email notification if the assignee to person and at-mention both are same.

Note : If assignee to person and at-mention both are different two email notification will trigger.

 

Thanks,

Vinuth

2 REPLIES 2

Community Alums
Not applicable

hi @vinuth v ,

 

You can achieve this by adding the below code in your "advanced condition" field.

 

If assigned to & mentioned user are same & you want to send task table notification & not the mentioned notification, add below code in the notification built on Live notification table:

 

function checkMention(){
    if(current.document.assigned_to!=current.user)
    {
        return true;
    }
    else
    {
        return false;
    }
}
 
As you already have some code in your condition field in the notification built on Live notification table. Incorporate the highlighted part of the code with your existing code.
 
If you want to sent mentioned email - In advanced condition query Live notification table to check.
 
In this way only one email will be triggered if both assigned to & mentioned user are same & 2 emails if different.
 
This worked for me. Please try it out.
 
I started answering community questions recently. If my answer helped you in any way, please mark it as helpful or correct. It would be a great boost.

Hi @Community Alums 

 

Here Activity Stream @Mention Email is OOB notification and this notification is applicable for all the tables when at-mentioned in the work notes, If I implement the above provided script in the Activity Stream @Mention notification, it will applicable for all the table. I wanted to implement this only in sc_task table.

 

Please suggest any other ways.

Thanks,

Vinuth