Tag: Case feed

Draft emails allow support agents who use Case Feed, write and save messages without having to send them immediately. It also allows us to implement approval processes so that messages can be reviewed by supervisors or senior agents before they’re sent to customers.Draftsare only supported if your administrator has enabled them, but there is no such option to send reminder notifications for Draft emails. Let’s start with a business use case

Business Use case

Warren Mason is working as System administrator at Universal Containers (UC). Support agents from his organization are using email draft feature and want some enhancements. Many times they compose a new email on Case Feed and save it as a Draft. Later on, they forget to send it, so they want a reminder notification (email) for Draft emails after 2hrs of its creation.

Solution for the above business requirement

There are a few possible solutions for the above business scenario, but I’ll use Flow and Process Builder to solve the above business requirement. You can also use Apex Triggers to solve the above business use case. Before proceeding ahead, you have to understandEmailMessageobjects in Salesforce. Follow the below instructions to create a Flow to solve the above business requirement

1. Click on Name | Setup | App Setup | Create | Workflows & Approvals | Flows2. Click onNew Flow, it will open the Flow canvas for you. Now create few Text variables in the Flow VarT_CaseID, VarT_OwnerName and VarT_OwnerEmail to store the data.3.Now we’ll create an email template using the Text Template. Navigate to the Resources tab and add one Text Template to create an e-mail template. Design it as per the business requirements. Please refer the following screenshot for more information

Email Template

4. The next step is to use theSend Emailstatic action to send out an e-mail to the owner. Navigate to the Palettetab and drag-and-drop theSend Emailstatic actions onto the canvas. Please refer the following screenshot for more details

Send email – Static Action

5.Finally, yourFlowwill look like the following screenshot

6. Saveyour flow with nameEmail notification for Draft Email and close the canvas. Don’t forget to Activatethe Flow.

Launch a Flow from Process Builder

Our next task is to create a Process Builder on the Email Message object to launch a Flow. To create a Process on theEmail Message object, follow the below instructions

1. Click on Name | Setup | App Setup | Create | Workflows & Approvals | Process Builder and click on the New button, Enter Name, API Name and then click on the Save button

Define Process Properties

2. The next step is to add entry criteria. For this click onAdd Object, selectEmailMessage object and for the entry criteria, Select when a record is created or edited, as shown in the below screenshot, once you are done click on theSave button

Evaluation Criteria

3. The next task is to add ProcessCriteria, To do this click on Add Criteria, enter Name, Type of action and set filter conditions(In this case set [EmailMessage].Status Equals Draft), also select the check-boxDo you want to execute the actions only when specified changes are made to the record?and click on the Save button, as shown in the following screenshot

Process Criteria

4. The next task is to set the time for scheduled actions. For this click on Set Schedule available under Scheduled actions. Set time for scheduled actions as shown in the following screenshot

Define time-based Process Builder

5. Now we have to add a Time-based action into the Process to launch a Flow. Click onAdd Action(Under Scheduled actions), Select the type of action to create (In our case Flows), and then fill out the fields to define the action, as shown in the following screenshot

Add action – Flows

VarT_CaseID = [EmailMessage].ParentId

VarT_OwnerEmail =[EmailMessage].CreatedBy.Email

VarT_OwnerName = [EmailMessage].CraetedBy.FirstName

5. Once you are done, click on theSave button, it will redirect you to Process canvas. Finally, theProcess will look like the following screenshot

Email notification for Draft Email

Don’t forget to active the Process by clicking on the Activatebutton.

It’s time to test this App

1. Now compose an email (By navigating case detail page) and save it as draft as shown in the following screenshot

After Spring’14 release Feed-Based Page Layouts is now generally available.This is similar to case feed layout, which has been available for a while and is now added to some standard objects and custom objects.This feature is available for Account, Contact, Lead, Opportunity and customobject records by creating Feed-Based page layout. Feed-Based page layout has two separate views

1) Record’s feed
2) Details Page

Feed-Based page layout views

Feed-Based Page Layouts offer a more efficient way of working with records. It doesn’t require users to scroll through full page for the information they are not interested in ,to find what they’re looking for. In Simple words Salesforce breaks down Chatter feed track (Feed Tab) and records detail page into different Tabs (Details Tab). Users can easily switch back and forth between the feed view, which includes the publisher and important events on the record, shown in sequential order, and the details view, which shows in-depth information about the record, including related lists.

The feed view in these layouts includes

In this demo I used “Demo” custom object.
1) Tabs(Feed & Details).
2) The Publisher Actions.
3) Custom buttons & Links.
4) The record feed which includes activity on the record, such as comments others have made about it.
5) A follow button ( ) or following indicator ( ) and a list of people who follow the record.
6) Feed filters, which let you choose which information from the feed you see.
7) Visualforce Pages.

Feed View

The Details view in these layouts includes

1) Detail views show in-depth information about the record.
2) Related lists.
3) Custom Links and buttons (In Detail page).
4) A follow button ( ) or following indicator ( ) and a list of people who follow the record.
5) Visualforce Pages.

Details View

Configure Feed-Based Page Layout

In this demo I used “Demo” custom object.To Create feed-based page layout for demo object follow the below steps

1) Be sure feed tracking is enabled for the object (Demo) on which you want to create a feed-based layout.
To do that follow the path Name | Setup | AppSetup | Customize | Chatter | FeedTracking.
2) Create a new page layout and select “Feed-Based Layout” check-box.

Feed-Based Layout

3) On the main page layout editor page, customize the publisher action to include the actions you want to make available to users, and add any custom buttons or links.
4) Click Feed View in the page layout editor header to customize what appears on the feed page.

Edit Feed View

5) It will redirect a new window, where you can customize feed view page, this page includes

Add custom components, which are Visualforcepages with functionality you define.

Choose where on the page custom buttons and links and standard components like the Follow button and followers list appear.

Hide the standard sidebar.

Choose which feed filters are available, and where they appear.

Feed View Customization

Finally your feed view page look like above images.

Note:- Add your custom Button and Link into page layout, then only it will appear on feed view page.For Visualforce page, Pages must use standard controller of objects for that you are configuring feed-based page layout.

6) Click On Save, to Save Feed view, then again click on Save to save Feed Based Page layout.
7) Finally assign this page layout to user profiles.

Announcement:- If you like this blog or you have a question please leave your comments, I’ll try to answer it. Thanks for your time to read my article.