The CreatorCon Call for Content is officially open! Get started here.

Send email notification every time a case receives an e-mail?

JordyZ
Mega Sage

Hi,

 

I'd like to set up an e-mail notification to the "assigned to" every time a complaint case record (sn_bom_compl_service) receives an e-mail.

 

I've created a scripted inbound e-mail action that triggers an event every time a complaint case receives an e-mail:  

JordyZ_1-1717504634896.png

And configured the notification to trigger based on event.

JordyZ_0-1717504516024.png

However, it doesn't seem to work and the event is not triggering (checked event logs). Any ideas? Cheers!

PS: I'm also testing by creating a new e-mail in the related list of the record, is this the right way of testing?

JordyZ_0-1717504898212.png

 

5 REPLIES 5

Community Alums
Not applicable

Hi @JordyZ ,

 

I think you need to create a notification once record gets created in the table 'sn_bom_compl_service' and assigned to a particular user.

Then you need to configure a notification on the table sn_bom_compl_service and put conditions like assigned to changes.

 

This way you can easily configure the notification, triggering a notification directly from the inbound email action doesn't look right.

 

If my response has resolved your query, please consider giving it a thumbs up ‌‌ and marking it as the correct answer‌‌!

 

Thanks & Regards,

Sanjay Kumar

Hi @Community Alums , thanks for replying. 

I'm not entirely understanding the solution. I'd like the assigned to of the case to receive a notification every time the case receives an e-mail from the client. Conditions like "assigned to changes" won't help with this right?

Thanks!

Community Alums
Not applicable

Hi @JordyZ ,

 

Ensure you have created the event in the Event Registry-

SanjayG_0-1717578752433.png

 

Update the Inbound action script-

(function process(/*GlideEmailInbound*/ email, /*GlideEmailWatermark*/ watermark, /*GlideRecord*/ target) {
    // Check if the email is related to a complaint case
    if (target && target.getTableName() === 'sn_bom_compl_service') {
        // Trigger the event
        gs.eventQueue('complaint.case.received_email', target, gs.getUserID(), gs.getUserName());
    }
})(email, email.watermark, target);

 

Rest your configs for notification looks fine.

Please test with the above configs and helps to solve your issue.

 

If my response has resolved your query, please consider giving it a thumbs up ‌‌ and marking it as the correct answer‌‌!

 

Thanks & Regards,

Sanjay Kumar

Hi @Community Alums , thanks for replying. 

I've updated the script with your solution but it doesn't seem to be working. Maybe I'm testing it wrong? The event is not triggering.

JordyZ_0-1717589844501.png

I test by creating a new e-mail in the related list of the case. Is this how I test it?

JordyZ_1-1717589916989.png

Cheers.