Salesforce Call Center Tips: Display Call Duration in Minutes

By Rich Loen  /  Published on October 30, 2018

In this post, we showed you how to add call duration to a Salesforce Activity page. However, you might have been reading through it and thought - hey wait, Salesforce is only showing me call duration in seconds! That might work just fine for you and your organization, but some of our users will want to display call duration in minutes. Here's how to do it.

As the Salesforce Administrator in Lightning, navigate to Setup and then select the Object Manager tab. Click on Activity.

Salesforce Lightning Display Call Duration in Minutes - Setup, Object Manager, Activity

Select Field and Relationships, and then click on New.

Salesforce Lightning Display Call Duration in Minutes - Fields & Relationships, New

Select Formula as your data type and click Next.

Salesforce Lightning Display Call Duration in Minutes - Custom Field, Formula

Enter in the name you would like. I used "Call Duration (Min)" here.  Then choose Text as the Formula Return Type and click Next.

Salesforce Lightning Display Call Duration in Minutes - Create Field Name, Select Text

Switch to the Advanced Formula tab and then copy and paste the following text into the highlighted space shown below.  After you've pasted it, click Next.

IF((MOD(CallDurationInSeconds/60,1)*60) > 10, TEXT(FLOOR(CallDurationInSeconds/60)) + ":" + TEXT(FLOOR(MOD(CallDurationInSeconds/60,1)*60) ), TEXT(FLOOR(CallDurationInSeconds/60)) + ":0" + TEXT(FLOOR(MOD(CallDurationInSeconds/60,1)*60) ))

Salesforce Lightning Display Call Duration in Minutes - Advanced Formula

Select the profiles you want to be able to see and/or edit this field and click  Next.

Salesforce Lightning Display Call Duration in Minutes - Field Level Security

Check the box next to Task and any other layouts you want the field to appear on. Finally, click Save.

Salesforce Lightning Display Call Duration in Minutes - Add to Layouts

Navigate to a task and you should now see Call Duration (Min) displayed on that task page.

Salesforce Lightning Display Call Duration in Minutes - Task Layout

You can now see that there are 2 Call Duration Fields - one displays duration in seconds and one outlined in red that displays call duration in minutes (this is the custom field we just created).

Rich LoenAbout Rich Loen

Rich Loen is an experienced entrepreneur, engineer, Chief Technology Officer and senior software architect, who has managed multiple successful startups. He got an early start in entrepreneurship, creating his first company while still in high school and his second while completing a degree in Electrical Engineering at Carleton University. He then went on to found a number of companies in Ottawa including InGenius Software Inc., InGenius Engineering Inc.,, Rewind Technologies and Rich won the Young Entrepreneur of the Year Award from the Ottawa-Carleton Board of Trade, and his companies have won many awards. Most recently, InGenius Software ranked as one of the top ten places to work in Ottawa and one of the top 500 fastest growing companies in Canada, plus the company won the 2018 West Ottawa Board of Trade Tech Award.

Rich has developed applications including real-time embedded telephony systems sold by Verizon, Mitel and Westell, communications systems for Telesat Canada, shrink-wrapped products used by NASA, universities and governments, and computer telephony integration software for integrating CRMs like Salesforce and Microsoft Dynamics with leading phone platforms. A number of news providers have produced features and profiles on Rich, including Bloomberg, the Ottawa Business Journal and Startup Stories Online, and Rich has been invited to speak about tech on CBC Television. He cares passionately about developing usable software that’s loved by customers and about creating a friendly and productive work environment for his employees.

When he’s not working, Rich likes to build CNC woodworking and metalworking machines, and has been invited to participate at various Maker Faires, including Makers Central in Birmingham, England. He gives popular talks at Makerspaces about how to build CNC machines. Rich is interested in finding the intersection of art and craftsmanship, with a dose of tech thrown in just for fun.