Welcome to Community Week 2025! Join us to learn, connect, and be recognized as we celebrate the spirit of Community and the power of AI. Get the details  

Trigger an email notification when an attachment is added to a case

Michael C_2
Tera Expert

We have a need to notify our agents if a customer comes into the portal and adds an attachment to an open case.

I followed the instructions from the accepted solution at How to trigger mail whenever attachment is added for incident, obviously changing all references to the 'incident' table to be 'sn_customerservice_case'. If I log into the portal as a customer and add a file to a case, I see in System Logs > Events that the business rule does fire the event. However, no notification is ever sent out. 

Event::

find_real_file.png

Business Rule::

find_real_file.png

My event is registered under the Customer Service application scope and the business rule that fires it is in Global. I have two notifications currently defined with the same criteria, one in Global and one in Customer Service. 

Notification details:

find_real_file.png

When to send:

find_real_file.png

Who will receive:

find_real_file.png

What it will contain:

find_real_file.png

The body of the email is simply "An attachment has been added to the case."

What am I missing? I'm fairly new to the platform but this logic seems to make sense and it matches up with that solution for ITSM Incidents.

1 ACCEPTED SOLUTION

I believe I figured this out, I have the script looking for 'sn_customerservice_case.attachment.add' instead of 'sn_customerservice.attachment.add'. I wasn't paying close enough attention to the event registry. Apparently the event is named by the application rather than the table.

TL;DR - make sure the event your business rule is looking for is actually named what you think it is named.

View solution in original post

10 REPLIES 10

Michael C_2
Tera Expert

Nobody else has any thoughts on this before I open a support ticket?

Jim Coyne
Kilo Patron

Can you include a screenshot of the script in the Business Rule that raises the event?

find_real_file.png

Everything seems fine.  Can you add the "Instance" field to your Events list view to make sure it is populated properly.  It should be the sys_id of the "sn_customerservice_case" record the attachement is being added to.

The event "Instance" is properly populated with the sys_id of the sn_customerservice_case record to which the attachment is added.