Case Comment Email Feed Filter Community Salesforce Idea
This past week I had someone who is looking to use Case Comments in the Service Cloud, but wanted it to be listed as an Action in the Feed. I thought it would be a good use case of many different tools within Salesforce being used together. I am looking at possibly doing this with code and basing it off this post, but for now I figured that I'de show you how without code. Let me be clear that if you're not using a Community that you can simply use the Internal Comments field instead without having to do anything. The only negative of going with this solution is that you're not going to have your Case Comment Chatter Post visible until your Chatter feed is refreshed, but that is something that also happens with the Internal Comments field. The Case Comment record is visible instantly. And this works nicely with Salesforce1. With that said, let's jump right in!
Automation Overview:
- Inputs for Case Comment received (Action)
- Process Builder triggered (Pass inputs into Visual Flow)
- Case Comment created in Flow
For this solution we have two different options in how we can do it architecturally:
- Record Create – Create new Custom Object
- Record Create – Create new Task Record
- Record Update – Use Custom Fields on Account/Opportunity
For me, because of not wanting to further complicate the Task Object and not wanting to add excess fields to the Case Object, I'm going to go with option 1 and create a new Custom Object.
How will we build this?
- Create the Case Comment Extension Object
- Create our Visual Flow to create the Case Comment
- Create our Process Builder to launch the Visual Flow
- Create our Action on the Case
For this solution we have two different options in how we can do it architecturally:
- Record Create – Create new Custom Object
- Record Create – Create new Task Record
- Record Update – Use Custom Fields on Account/Opportunity
For me, because of not wanting to further complicate the Task Object and not wanting to add excess fields to the Case Object, I'm going to go with option 1 and create a new Custom Object.
What fields do we need create in this Custom Object?
- Auto Number
- Case (Master-Detail)
- Comment (Long Text Area)
- Public (Checkbox) Note: this only applies if you have a Customer Community.
Let's get our Flow created first since we can't Activate the Process Builder without it (Setup | Create | Workflows & Approvals | Flows).
The first step is going to be grabbing our Record Create.
We now need to create the variables we will use to create the Case Comment.
Case Id
IsPrimary (This is a BOOLEAN, not Text)
CommentBody
Lets make sure everything is correctly mapped inside our Record Create.
Great! So lets hit OK and set this as our Starting Element.
Now lets drag in our Record Delete. This is so that we don't add useless data into Salesforce.
Create a variable for the Record Id of the Custom Object record we just created, when our Action is used.
Map it in our Record Delete.
Connect the elements together to finish our Flow.
And lastly we want to Save and then Activate our Flow!
Fantastic! Now we need to setup our Process Builder that fires this Flow. So lets go create a new Process Builder for this. (Setup | Create | Workflows & Approvals | Process Builder)
We want the Process Builder to fire on our Custom Object that we created,Case Comment Extension, and we want it to fire only when a record is created.
We don't need to set any criteria here, but to be safe let's just make sure that we have a Case ID and Comment before proceeding.
Now we need to map the variables in our Flow to the Values in the Custom Object, using the TypeReference.
Hit Save, then Activate your Process Builder. Now, lets navigate to go create our Action.
Keep it on the default,Create a Record, and selectCase Comment Extension (our Custom Object we created earlier).
Let's make sure we turn off the Create Feed Item, so we don't spam the Chatter Feed since the Case Comment itself will cause a Feed Item to be created. Also, make sure we add in a nice Success Message and custom Icon to make the action look sharp!
Remove the Case Field and drag Public and Comment into the Action's Page Layout. Make sure you require the Comment field.
It will give you a small popup warning you about not having the Case field on the Layout, but you can ignore it and move on.
We now need to setup a Predefined Field Value for our Case field.
Set Case.Id to our custom Case field.
Now all that is left is for us to update our layout(s)!
And with that, lets take a look at the finished product!
Source: https://salesforcesidekick.com/2016/08/29/how-to-use-case-comments-in-the-service-console-feed-view-salesforce1/
0 Response to "Case Comment Email Feed Filter Community Salesforce Idea"
Postar um comentário