Salesforce Integration with CompanyTone

Introduction

CompanyTone provides integration with Salesforce. The configuration is done server side, in an easy and straightforward way. This integration provides many benefits to users of CompanyTone and Salesforce, these being:

  • Contact Synchronization – Inbound calls from external numbers trigger a contact lookup in your CRM, and contact details are added to CompanyTone Contacts. This way, the caller name is automatically shown in your phone display when you receive the call.
  • Call Pop-ups – When using the CompanyTone Web Client, the customer record is brought up to you automatically when you receive an inbound call.
  • Call Journals – Calls are logged as call records in the CRM.
  • Create a new contact automatically when a call is received from an unknown number.

In this guide we will take you through the steps required in order to setup your Salesforce with CompanyTone – server side.

Salesforce Configuration

General

  1. Login to your Salesforce account https://login.salesforce.com/ or create a developer account from here https://developer.salesforce.com/signup. Note: Your salesforce account must have REST API Enabled. This is available in Salesforce Developer, Unlimited, Enterprise and some Professional editions.

Salesforce configuration - Setup

  1. Click on “Gear icon” > “Setup.”
  2. On the sidebar, under the section PLATFORM TOOLS, select “Apps > App Manager.”
  3. Click “New Connected App” button on the top right of the webpage.

Salesforce configuration - Manage Connected Apps

  1. Enter an App name, example CXPBX, a contact email and press save.

Salesforce - Manage Connected Apps

  1. Scroll down to API (Enable OAuth Settings) and enable the checkbox “Enable OAuth Settings”.
  2. Set Callback URL field to “https://localhost/callback” and give permissions as per image. The permissions are:
    • Access and manage your data (api).
    • Access your basic information.
    • Access to your unique identifier (openid).
    • Full Access.
    • Perform requests on your behalf at any time.
    • Provide access to your data via the Web.
  3. Press Save.

Salesforce - Apps Manager List

  1. Click “Apps > App manager > Find your app” from the list and click “View”.

Salesforce configuration - API (Connected key)

  1. In the API section Copy “Consumer key” and “Consumer secret” – we will need to add these later inside CompanyTone CRM Server side integration section.
  2. Click on “Manage” at the top and “Edit Policies.”

Salesforce configuration - OAuth policies

  1. Go to the OAuth policies section and set Permitted users to “All users may self-authorize”. Press Save.
  2. Click on your profile image on the top right corner > Settings.
  3. On the side menu select “Reset My Security Token.”

Salesforce configuration - Reset Security Token

  1. Press Reset Security Token. An email will be sent with the new security token.

Call Journaling

  1. If you want to report external calls to Salesforce, you need to populate the dedicated Extension field on the User entity with the agent extension number. This way CompanyTone can map the extension number of the agent that received the call to the Salesforce User.
  2. Click on “Gear icon” > “Setup”

Create a dedicated extension in Salesforce to integrate call journaling with CompanyTone

  1. On the sidebar, under the section ADMINISTRATION, select “Users > Users”
  2. Open the Users for whom you need to report calls and press Edit.

Assign a user in Salesforce

  1. Populate the Extension field with the extension number and press Save.

Populate the extension field with the Extension number in Salesforce

CompanyTone CRM Server Side Configuration

Contact Matching Strategy

  1. Salesforce REQUIRES that phone number lookup is performed using the last 4 or 7 digits. If the integration queries the CRM using a different number of digits, Salesforce will not return any data.
  2. Go to Management console > Contacts > Options > set the matching strategy to “Match at least X number of characters” and configure either 4 or 7.

salesforce.png

General Settings

  1. Login to the CompanyTone management console > Settings > CRM Integration > Server Side tab.
  2. Select Salesforce from the dropdown list.

Configure your Salesforce CRM

  1. Fill in the details you got in the previous step for Consumer Key, Consumer Secret, Username (the email account you use to login to the Salesforce portal), Password (the password used to connect to the Salesforce account) and the Security token.

Call Journaling

  1. If you want to report external calls to the CRM, check the Enable Call Journaling checkbox and configure the parameters below. Please note that this feature is only available for CompanyTone v16 and later installations.
    img
  2. Call Journaling parameters are:
    • Call Subject: The subject of the call.
    • Answered Inbound Call: Description for answered inbound calls.
    • Missed Call: Description for missed calls.
    • Answered Outbound Call: Description for answered outbound calls.
    • Unanswered Outbound Call: Description for unanswered outbound calls.
  3. Please note that you can use variables in the Call Journaling parameters. Variables are specified between [], for example the external number is specified as [Number]. The available variables are:
    • CallType – The type of call, it can be “Inbound”, “Outbound”, “Missed”, or “Unanswered”.
    • Number – The external contact number (the number dialed for outbound calls or the caller number for inbound calls).
    • Agent – The extension number of the agent handling the call.
    • Duration – The duration of the call in “hh:mm:ss” format
    • DurationTimeSpan – The duration of the call as a TimeSpan object, which can be formatted as the user wants.
    • DateTime – The start date & time of the call, in local time zone, formatted using the local culture from the CompanyTone server.
    • CallStartTimeLocal – The start date & time of the call, in local time zone, as a DateTime object, which can be formatted as the user wants.
    • CallStartTimeUTC – The start date & time of the call, in UTC time zone, as a DateTime object, which can be formatted as the user wants.
    • CallEndTimeLocal – The end date & time of the call, in local time zone, as a DateTime object, which can be formatted as the user wants.
    • CallEndTimeUTC – The end date & time of the call, in UTC time zone, as a DateTime object, which can be formatted as the user wants.

Contact Creation

  1. If you want to create new contacts in the CRM when a call is received from an unknown number (not found in both CompanyTone and CRM), check the Enable Contact Creation checkbox and configure the parameters below. Please note that this feature is only available for CompanyTone v16 and later installations.
    img
  2. Contact Creation parameters are:
    • Create Lead or Contact – The entity to be created (Lead/Contact).
    • New Contact First Name – The first name of the newly created Contact.
    • New Contact Last Name – The last name of the newly created Contact.
    • New Lead Company- The name of the Company when a Lead is created.
  3. Please note that you can use variables in the parameters. Variables are specified between [], for example the external number is specified as [Number]. The available variables are:
    • Number – The external contact number (the number dialed for outbound calls or the caller number for inbound calls).

Salesforce Configuration

  1. Login to your Salesforce account https://login.salesforce.com/ or create a developer account from here https://developer.salesforce.com/signup. Note: Your salesforce account must have REST API Enabled. This is available in Salesforce Developer, Unlimited, Enterprise and some Professional editions.
  2. Click on “Gear icon” > “Setup.”
  3. On the sidebar, under the section PLATFORM TOOLS, select “Apps > App Manager.”
  4. Click “New Connected App” button on the top right of the webpage.
  5. Enter an App name, example CXPBX, a contact email and press save.
  6. Scroll down to API (Enable OAuth Settings) and enable the checkbox “Enable OAuth Settings”.
  7. Set Callback URL field to “https://localhost/callback” and give permissions as per image. The permissions are:
    • Access and manage your data (api).
    • Access your basic information.
    • Access to your unique identifier (openid).
    • Full Access.
    • Perform requests on your behalf at any time.
    • Provide access to your data via the Web.