function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Camila HeitzCamila Heitz 

Publish a comment on a case without an assigned contact

Hello everyone,

I have cases created via email-2-case in which I get the email adress saved (in the case as a web address), but that doesn't necessarily mean that person is a contact or will be.
I would like to know if there's a way to publish o send a new case comment to that email address that has been saved. It seems right now that it's not possible to publish a case comment (or not publish it but get that comment to the web address) if the case is not assigned to a contact.

I have thought of creating a hidden case comment on the case object, but I don't really know to fill in that field every time a new case comment is created. If someone would have a suggestion on how to do this, I guess I could fire a workflow rule to send an email alert everytime the hidden case comment changes.

Thank you.
Vinit_KumarVinit_Kumar
Where are you stroing the Email address on which field ??
Camila HeitzCamila Heitz
On the Supplied Email Case Standard field
Vinit_KumarVinit_Kumar
Ok there are couple of ways of doing it :-

1. )  Through Apex Trigger : Create an After insert Trigger on Case comment which would fetch the related Case's Supplied email field and then send an email via Messaging.SingleEmailMessage class of Apex.

2.) Through Workflow : You would need 2 WF :- 

a.) Create a WF on Case comment which would  update a checkbox field on Case to true whenever a new Case comment is added.
b.) Create a WF rule on Case which would see if the checkbox is true then send an email alert to Supplied Email field value and then have a field update which would reset the checkbox field back to false.

Hope this helps !!.

If this helps,please mark it as best answer to help others.
Camila HeitzCamila Heitz
Hi,

I appreciate your answer. I am just a little bit confused here. I would like to send the comment inside the email as well.

So here are the steps I believe I have to follow:
1. Create a comment case hidden field on case (to copy the comment from the case comment object - though I don't know how)
2. Create a checkbox field on case
3. Create a WF rule to update the comment case field on the case object (HOW?)
4. Create a WF rule on case comment to update the checkbox field on Case whenever a Case comment is added (how do I know a case comment is added?)
5. Create a WF rule on case which would see if the checkbox is true then send an email alert to Supplied Email field value and then have a field update which would reset the checkbox field back to false.

Thanks
Camila HeitzCamila Heitz
Oh, and I forgot, on the last email alert, include the case comment hidden field from Case
Vinit_KumarVinit_Kumar
Camila,

This is more of consulting question,still I would try to answer as much as possible.

1.)  Copy the case comments through WF to a Case hidden field whenever a new Case comment is inserted.
2.) Create a WF rule on Case comments to update the Checkbox on Case.
3.) Create WF rule on Case to send an email to Supplied email field and the body would be the Case hidden field value(you would need merge fields for the same) and reset the checkbox to false.

Hope this helps !!