Integrating FortiVoice with Salesforce
This section describes how to configure the FortiVoice phone system to work with Salesforce for calling and call detail record (CDR) logging.
Prerequisites
- The FortiVoice phone system must use the firmware version 5.3.10 or later.
- The Salesforce summer release must be version 17 or later.
- The FortiVoice IP address is added in the Network Access of Salesforce.
- The Salesforce Ant Migration tool is available.
- The FortiVoice public domain name with signed certificate by a trusted CA is available.
- The FortiVoice SMDR is enabled.
- The FortiVoice HTTPS port mapping is complete.
Workflow
To configure the Salesforce and FortiVoice integration, perform the following tasks:
- Setting up a connected application on Salesforce
- Creating a custom object on Salesforce
- Configuring the FortiVoice phone system
Setting up a connected application on Salesforce
- Log in to Salesforce as an administrator.
- Click the Setup icon, then Setup.
- Select Objects and Fields > Object Manager.
- Click Create > Custom Object.
- Enter the Label and the Plural Label for this object.
- Click Save.
- Go to Field and Relationships > New and select the following field names and data types for FIELD LABEL:
- To display the call duration in a readable format, click New and choose Formula for the type.
- For Name, enter Call duration.
- In Formula Return Type, select Text.
- Enter the following into the text field:
- To ensure that there are no errors, click Check Syntax.
- Click Save.
IF ((MOD(CallDurationInSeconds__c,3600)/60)>10,
TEXT(FLOOR(CallDurationInSeconds__c/3600))+ ":",
TEXT(FLOOR(CallDurationInSeconds__c/3600))+ ":0")
+ IF ((MOD(MOD(CallDurationInSeconds__c,3600),60))>10,
TEXT(FLOOR(MOD(CallDurationInSeconds__c,3600/60)/60)) + ":",
TEXT(FLOOR(MOD(CallDurationInSeconds__c,3600/60)/60)) + ":0")
+ TEXT(MOD(MOD(CallDurationInSeconds__c,3600),60))
Creating a custom object on Salesforce
- Log in to Salesforce as an administrator.
- Click the Setup icon, then Setup.
- Select App > App Manager, and click the New Connected App button.
- Under Basic Information, enter the names for the application and API and email address for the administrator.
- For API (Enable OAuth Settings), configure the following fields and then click Save:
- In Callback URL, enter https://login.salesforce.com/
- In Selected OAuth Scopes, select Access and manage your data (api) and click Add.
- Copy the Consumer Key and the Consumer Secret. You will need this information during the FortiVoice configuration.
- Click Manage > Edit Policies.
- In Permitted Users, select Admin approved users are pre-authorized and click Save.
- Click Manage Profile > System Administrator.
- Make sure Access Libraries and API Enabled are checked, and click Save.
Configuring the FortiVoice phone system
A new database interface must be configured for FortiVoice to send out CDR.
- Log in to FortiVoice as an administrator.
- Go to Log & Report > CDR > Submit CDR.
- Click New.
- Configure the following:
- Click Edit.
- On the CDR Template page, go to Content > HTML.
- Replace the field content with the following:
- Click OK.
- Click Create.
GUI field |
Description |
---|---|
Name |
Enter a name for the CDR submission. |
Remote RESTful Server |
Protocol: Select HTTP 1.1. |
Authentication |
Select OAuth. |
Service format |
Select Salesforce. |
Username |
Enter the login user name registered on the Salesforce server. |
Password |
Enter the login password registered on the Salesforce server. |
Login server |
Enter the Salesforce server IP address. |
Client ID |
Enter the Consumer Key recorded in step 6 of Creating a custom object on Salesforce. |
Client secret |
Enter the Consumer Secret recorded in step 6 of Creating a custom object on Salesforce. |
URL suffix |
Enter the Connected App Name that was created in step 4 of Creating a custom object on Salesforce. Click Get Salesforce API URL to display the created URL. |
Options |
CDR template: <FV_CDR__c> <CdrId__c>%%CDR_UNIQUE_ID%%</CdrId__c> <ToName__c>%%CDR_CALLEE_ID%%</To_Name__c> <ToNumber__c>%%CDR_DST_UID%%</To_Number__c> <FromName__c>%%CDR_CALLER_ID%%</From_Name__c> <FromNumber__c>%%CDR_SRC_UID%%</From_Number__c> <StartTime__c>%%CDR_ANSWER_TIME%%</Start_Time__c> <CallDurationInSeconds__c>%%CDR_TALK_TIME%%</CallDurationInSeconds__c>
</FV_CDR__c> |