12.1.3. Time Fields on Reports (Seconds to Minutes)

Prev Next

Most of the Natterbox Call Reporting time fields are in seconds not minutes. If you want to convert to minutes, there are two ways of doing this for use in reporting.

Row-Level Formula

You could make a row-level formula on the report. Salesforce has a limit of 1 row-level formula per report.

  1. You need to click the down arrow and then 'Add Row-Level Formula'

  2. Now, you need to name the column and add the formula to the box. You can configure the decimal points as you desire.

  3.  Now click apply. You might need to save and name the report before doing this.  

Formula Field on the Object

You could make a custom formula field on the call reporting object. This is needed if you want more than 1 time field in minutes on a report.

  1. Click the setup cog in the top right and then go to the object manager.   

  2. Search for ‘Call Reporting’ and then click ‘Fields & Relationships’.  

  3. Now, click ‘New’ to create a new field  

  4. Step 1: Choose the field type

    1. Type = Formula

    2. Next

  5. Step 2: Choose output type

    1. Field Label = something like ‘Time Talking (minutes)’ or ‘From Call Queue Last Wait Seconds (minutes)’

    2. Formula Return Type = Text

    3. Field Name = this auto populates

    4. Leave the rest of the options as default

    5. Next

  6. Step 3: Enter formula

    1. Enter the formula from below (either simple or complex). Make sure the field reference is correct for your use case, for example: nbavs__From_Call_Queue_Total_Wait_Seconds__c

    2. Description = something like ‘This field is used to convert a time field into minutes for reporting purposes’

    3. Help Text = something similar to above

    4. Next

  7. Step 4: Establish field-level security

    1. Leave field-level security as default unless you wish to customize.

    2. Next

  8. Step 5: Add to page layouts

    1. We recommend you leave this as default so the reporting gate field can be seen on the call reporting page layout

    2. Save

Formulas

Simple formula

If you want the value 105 seconds as 1.75 minutes, use this formula:

Field/ 60

For example if you converting the field Time Talking into minutes, this would be the formula:

nbavs__From_Time_Talking__c/60

Complex formula

If you want the value 105 seconds as 00:01:45, use this formula:

IF(ISBLANK( FIELD), NULL,

LPAD(TEXT FLOOR(FIELD /60 / 60)),2,"0") + ":" +

LPAD(TEXT(FLOOR (FIELD)/60) - FLOOR(FIELD /60 / 60)*60),2,"0") + ":" +

LPAD(TEXT FLOOR(MOD((FIELD)/60, 1)*60)),2, "0"))

For example if you converting the field Time Talking into minutes, this would be the formula:

IF(ISBLANK( nbavs__From_Time_Talking__c ),NULL,

LPAD(TEXT( FLOOR(nbavs__From_Time_Talking__c /60 / 60)),2,"0") + ":" +

LPAD(TEXT(FLOOR( (nbavs__From_Time_Talking__c)/60) - FLOOR(nbavs__From_Time_Talking__c /60 / 60)*60),2,"0") + ":" +

LPAD(TEXT( FLOOR(MOD((nbavs__From_Time_Talking__c)/60,1)*60)),2,"0"))

For more help, on how to use this formula, see this Salesforce help guide: Convert Activity CallDurationInSeconds (Decimal) to Hours:Minutes:Seconds (Time) Format

Please note: that guide is being used on the Task/Activity object, you will be creating a formula field on the Call Reporting object for Natterbox metrics. 

For any other formulas, please see Salesforce help

Adding Seconds to Date/Time Fields with Natterbox

For fields such as Conversation Start Time or Conversation End Time, it may appear that only the minutes are displayed; however, this is merely a representation of the data by Salesforce. The seconds are indeed present in the field but are not visible. To view the precise seconds, you can create a formula either in a report or directly on the object. This formula closely resembles the Complex formula mentioned above.

This formula can be used both as a custom formula field on an object or as a row-level formula on a report. The only difference would be the way the field name is referenced.

IF(ISBLANK(FIELD_NAME), NULL,

TEXT(DAY(DATEVALUE(FIELD_NAME))) + "/" +

TEXT(MONTH(DATEVALUE(FIELD_NAME))) + "/" +

TEXT(YEAR(DATEVALUE(FIELD_NAME))) + " " +

LPAD(TEXT(HOUR(TIMEVALUE(FIELD_NAME))), 2, "0") + ":" +

LPAD(TEXT(MINUTE(TIMEVALUE(FIELD_NAME))), 2, "0") + ":" +

LPAD(TEXT(SECOND(TIMEVALUE(FIELD_NAME))), 2, "0"))

For example, if you wanted to do this for Conversation Answer Time (nbavs__From_Answer_Time__c):

IF(ISBLANK(nbavs__From_Answer_Time__c), NULL,

TEXT(DAY(DATEVALUE(nbavs__From_Answer_Time__c))) + "/" +

TEXT(MONTH(DATEVALUE(nbavs__From_Answer_Time__c))) + "/" +

TEXT(YEAR(DATEVALUE(nbavs__From_Answer_Time__c))) + " " +

LPAD(TEXT(HOUR(TIMEVALUE(nbavs__From_Answer_Time__c))), 2, "0") + ":" +

LPAD(TEXT(MINUTE(TIMEVALUE(nbavs__From_Answer_Time__c))), 2, "0") + ":" +

LPAD(TEXT(SECOND(TIMEVALUE(nbavs__From_Answer_Time__c))), 2, "0"))

Please note: we recommend that you insert the field name from the formula editor in either the report or object manager. This will ensure you get the field name in the right format. For example in a report you would use: nbavs__CallReporting__c.nbavs__From_Answer_Time__c and in object manager: nbavs__From_Answer_Time__c.

Table displaying conversation answer times and durations for various timestamps.

Here are some Natterbox fields you might want to add this to:

  • Call Reporting

    • Conversation Answer Time

    • Conversation Start Time

  • Phone Events

    • Time

  • Availability Logs

    • Time