Version:

Version:

Version:

Version:

Version:

Version:

Version:

Version:


Table of Contents

FortiVoice Phone System Administration Guide

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:

  1. Setting up a connected application on Salesforce
  2. Creating a custom object on Salesforce
  3. Configuring the FortiVoice phone system

Setting up a connected application on Salesforce

  1. Log in to Salesforce as an administrator.
  2. Click the Setup icon, then Setup.
  3. Select Objects and Fields > Object Manager.
  4. Click Create > Custom Object.
  5. Enter the Label and the Plural Label for this object.
  6. Click Save.
  7. Go to Field and Relationships > New and select the following field names and data types for FIELD LABEL:
  8. To display the call duration in a readable format, click New and choose Formula for the type.
  9. For Name, enter Call duration.
  10. In Formula Return Type, select Text.
  11. Enter the following into the text field:
    1. 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))

  12. To ensure that there are no errors, click Check Syntax.
  13. Click Save.

Creating a custom object on Salesforce

  1. Log in to Salesforce as an administrator.
  2. Click the Setup icon, then Setup.
  3. Select App > App Manager, and click the New Connected App button.
  4. Under Basic Information, enter the names for the application and API and email address for the administrator.
  5. 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.
  6. Copy the Consumer Key and the Consumer Secret. You will need this information during the FortiVoice configuration.
  7. Click Manage > Edit Policies.
  8. In Permitted Users, select Admin approved users are pre-authorized and click Save.
  9. Click Manage Profile > System Administrator.
  10. 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.

  1. Log in to FortiVoice as an administrator.
  2. Go to Log & Report > CDR > Submit CDR.
  3. Click New.
  4. Configure the following:
  5. 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:

    • Click Edit.
    • On the CDR Template page, go to Content > HTML.
    • Replace the field content with the following:

    <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>

  6. Click OK.
  7. Click Create.

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:

  1. Setting up a connected application on Salesforce
  2. Creating a custom object on Salesforce
  3. Configuring the FortiVoice phone system

Setting up a connected application on Salesforce

  1. Log in to Salesforce as an administrator.
  2. Click the Setup icon, then Setup.
  3. Select Objects and Fields > Object Manager.
  4. Click Create > Custom Object.
  5. Enter the Label and the Plural Label for this object.
  6. Click Save.
  7. Go to Field and Relationships > New and select the following field names and data types for FIELD LABEL:
  8. To display the call duration in a readable format, click New and choose Formula for the type.
  9. For Name, enter Call duration.
  10. In Formula Return Type, select Text.
  11. Enter the following into the text field:
    1. 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))

  12. To ensure that there are no errors, click Check Syntax.
  13. Click Save.

Creating a custom object on Salesforce

  1. Log in to Salesforce as an administrator.
  2. Click the Setup icon, then Setup.
  3. Select App > App Manager, and click the New Connected App button.
  4. Under Basic Information, enter the names for the application and API and email address for the administrator.
  5. 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.
  6. Copy the Consumer Key and the Consumer Secret. You will need this information during the FortiVoice configuration.
  7. Click Manage > Edit Policies.
  8. In Permitted Users, select Admin approved users are pre-authorized and click Save.
  9. Click Manage Profile > System Administrator.
  10. 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.

  1. Log in to FortiVoice as an administrator.
  2. Go to Log & Report > CDR > Submit CDR.
  3. Click New.
  4. Configure the following:
  5. 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:

    • Click Edit.
    • On the CDR Template page, go to Content > HTML.
    • Replace the field content with the following:

    <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>

  6. Click OK.
  7. Click Create.