How to Setup a Call Control Object

Prev Next

These guides are intended for advanced Salesforce admins. For Salesforce education, contact Salesforce directly or use trailheads for specific knowledge.

A How-To Guide in building a custom object to manage your inbound routing

Requirement: Contact Centre Licences

Document Purpose

The purpose of this document is to take you through how to build out the new Call Control object. The Call Control object allows you to:

  • Set your weekly opening and closing hours

  • Preset Bank Holiday Routing and TTS messages

  • Dynamically route calls based on the above information

Once the object has been created, you’ll be able to query these records to dynamically route all incoming calls.

Field Requirements

Below is a list of all the fields required for the new object. For Formula fields, the required formula is included in the description:

FIELD LABEL

FIELD TYPE

DESCRIPTION

Routing Policy Name

Text (80)

The name of the Routing Policy this record refers to. This will mean that if we want to demonstrate closing a line down, we each have separate records.

X Open

Time

Replace 'X' with Day of the Week (e.g. Monday Open). Enter the time that the policy is open from on that day

X Closed

Time

Replace 'X' with Day of the Week (e.g. Monday Closed). Enter the time that the policy is closed from on that day

Open Today

Formula (Time)

A field that shows the closed time for that day. Formula is:

CASE(

WEEKDAY(TODAY()),

2, Monday_Open__c,

3, Tuesday_Open__c,

4, Wednesday_Open__c,

5, Thursday_Open__c,

6, Friday_Open__c,

7, Saturday_Open__c,

Sunday_Open__c

)

Closed Today

Formula (Time)

A field that shows the closed time for that day. Formula is:

CASE(

WEEKDAY(TODAY()),

2, Monday_Closed__c,

3, Tuesday_Closed__c,

4, Wednesday_Closed__c,

5, Thursday_Closed__c,

6, Friday_Closed__c,

7, Saturday_Closed__c,

Sunday_Closed__c

)

Current Time

Formula (Time)

A field that shows the current time. Formula is:

IF( OR(NOW() < DATETIMEVALUE(DATE(YEAR(DATEVALUE(NOW() )),3,31)-(WEEKDAY(DATE(YEAR(DATEVALUE(NOW() )),3,31))-1) +1/24),

NOW() > DATETIMEVALUE(DATE(YEAR(DATEVALUE(NOW() )),10,31)- (WEEKDAY(DATE(YEAR(DATEVALUE(NOW() )),10,31))-1)+1/24)),

TIMEVALUE(NOW() ),

TIMEVALUE(NOW() +1/24))

Currently Open

Formula (Checkbox)

A checkbox that uses the above formula fields to establish if a call has been made during working hours. If this checkbox is set to 'true', it means the line is open. If not, then it's out of hours. Formula is:

AND(

NOT(ISBLANK(Open_Today__c)),

TIMEVALUE( Current_Time__c ) >= TIMEVALUE( Open_Today__c ),

TIMEVALUE( Current_Time__c ) <= TIMEVALUE( Closed_Today__c )

)

X Holiday Start

Date/Time

Replace 'X' with the name of the holiday (e.g. Christmas). To be populated with the date and time of the start of the holiday routing (leading to a specific holiday related message).

X Holiday End

Date/Time

Replace 'X' with the name of the holiday (e.g. Christmas). To be populated with the date and time of the end of the holiday routing (leading to a specific holiday related message).

X Closure

Formula (Checkbox)

A checkbox field set to 'true' if the current date and time is set between the Holiday Start and End fields. Using this in the Routing Policy to establish if it's holiday routing. Example formula:

AND(

NOW() >= Christmas_Holiday_Start__c,

NOW() <= Christmas_Holiday_End__c

)

Change the Start and End API Names to match the holiday.

X Message

Text

A text field populated with the message the caller should hear when calling during the Holiday Start and End date and time.