Freshsales CRM Integration

Introduction

3CX provides integration with Freshsales via the 3CX API for CRM. The configuration is done server-side, in an easy and straightforward way. This integration provides these benefits to users of 3CX and Freshsales:

  • Contact Synchronization – Inbound calls from external numbers trigger a contact lookup in your CRM, and contact details are added to 3CX Contacts. This way, the caller name is automatically shown in your phone display when you receive the call.
  • Call Pop-ups – When using the 3CX 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.
  • Chat Journals – Chats are logged as note records in the CRM.
  • Create a new contact automatically when a call is received from an unknown number.
  • Click to Call – Launch calls straight from Freshsales via 3CX, using the 3CX Click2Call Browser extensions for Google Chrome and Microsoft Edge.

This guide takes you through the steps required to set up your Freshsales with 3CX. Note: The integration was working at the time of development. If the vendor changes their API it may require that you work with the vendor in question to edit the XML template of the integration. For any support you should contact the vendor directly.

3CX CRM Configuration

Contact Matching Strategy

To get a match with Freshsales, the incoming Caller ID must be identical to the CRM entry, including any prefix, as Freshsales performs whole number lookups. Querying Freshsales using a subset of the digits, does not return any data. The recommended practice is that you store the numbers in Freshsales using E164 format, and your SIP Trunk provides the caller’s number in E164 format as well, so both match. If this is not the case, you can use Caller ID Reformatting to adjust the caller’s number before being passed on to the CRM.

⚠ Important: In 3CX Management Console, open “Advanced” > “Contacts” > “Options”, set the matching strategy to "Match exactly" and click “OK” to save.

General Settings

  1. Download the template for Freshsales from here.
  2. In 3CX Management Console go to “Settings” > “CRM” > “Server Side” tab.
  3. Click the “Add” button and then select “FreshsalesV2” from the dropdown list.
  4. For the Domain Part, enter your CRM domain name - for example, if your Freshsales URL is https://abc.freshsales.io/ enter “abc”.
  5. Enter your API Key. You can find this in Personal Settings > API Settings.
  6. Select the lookup order you prefer.

Call Journaling

  1. If you want to report external calls to the CRM, check the Enable Call Journaling checkbox and configure the parameters below.
  2. Call Journaling parameters are:
  • 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.
  1. 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).
  • CallDirection
    - The direction of the call, either "Inbound" or "Outbound".
  • Name
    - The name of the matched contact.
  • EntityId
    - The ID of the matched contact.
  • EntityType
    - The type of the matched contact (i.e. "Contacts").
  • Agent
    - The extension number of the agent handling the call.
  • AgentFirstName
    - The first name of the agent handling the call.
  • AgentLastName
    - The last name of the agent handling the call.
  • AgentEmail
    - The email 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 the local time zone, formatted using the local culture from the 3CX server.
  • CallStartTimeLocal
    - The start date & time of the call, in the 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.
  • CallEstablishedTimeLocal
    - The date & time in which the call was established, in the local time zone, as a DateTime object, which can be formatted as the user wants.
  • CallEstablishedTimeUTC
    - The date & time in which the call was established, 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 the 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.
  • CallStartTimeLocalMillis
    - The start date & time of the call, in the local time zone, expressed as milliseconds since epoch (aka unix time).
  • CallStartTimeUTCMillis
    - The start date & time of the call, in UTC time zone, expressed as milliseconds since epoch (aka unix time).
  • CallEstablishedTimeLocalMillis
    - The date & time in which the call was established, in the local time zone, expressed as milliseconds since epoch (aka unix time).
  • CallEstablishedTimeUTCMillis
    - The date & time in which the call was established, in UTC time zone, expressed as milliseconds since epoch (aka unix time).
  • CallEndTimeLocalMillis
    - The end date & time of the call, in the local time zone, expressed as milliseconds since epoch (aka unix time).
  • CallEndTimeUTCMillis
    - The end date & time of the call, in UTC time zone, expressed as milliseconds since epoch (aka unix time).

📄 Note: This feature is only available for 3CX versions 16 and later.

Chat Journaling

  1. If you want to report chats to the CRM, check the Enable Chat Journaling checkbox and configure the parameters below.
  2. Chat Journaling parameters are:
  • Chat Subject: The subject of the chat session.
  1. Please note that you can use variables in the Chat Journaling parameters. Variables are specified between [], for example the external number is specified as [Number]. The available variables are:
  • Number
    - The external contact number (only available when this is a chat through SMS).
  • Email
    - The external contact email address (only available when this is a chat through Live Chat).
  • Name
    - The name of the matched contact.
  • EntityId
    - The ID of the matched contact.
  • EntityType
    - The type of the matched contact (i.e. "Contacts").
  • QueueExtension
    - The extension number of the queue, only when the chat arrives to the agent through a queue.
  • ChatMessages
    - The messages sent and received during the chat session.
  • Agent
    - The extension number of the agent handling the chat.
  • AgentFirstName
    - The first name of the agent handling the chat.
  • AgentLastName
    - The last name of the agent handling the chat.
  • AgentEmail
    - The email of the agent handling the chat.
  • Duration
    - The duration of the chat in “hh:mm:ss” format.
  • DurationTimeSpan
    - The duration of the chat as a TimeSpan object, which can be formatted as the user wants.
  • DateTime
    - The start date & time of the chat, in the local time zone, formatted using the local culture from the 3CX server.
  • ChatStartTimeLocal
    - The start date & time of the chat, in the local time zone, as a DateTime object, which can be formatted as the user wants.
  • ChatStartTimeUTC
    - The start date & time of the chat, in UTC time zone, as a DateTime object, which can be formatted as the user wants.
  • ChatEndTimeLocal
    - The end date & time of the chat, in the local time zone, as a DateTime object, which can be formatted as the user wants.
  • ChatEndTimeUTC
    - The end date & time of the chat, in UTC time zone, as a DateTime object, which can be formatted as the user wants.
  • ChatStartTimeLocalMillis
    - The start date & time of the chat session, in the local time zone, expressed as milliseconds since epoch (aka unix time).
  • ChatStartTimeUTCMillis
    - The start date & time of the chat session, in UTC time zone, expressed as milliseconds since epoch (aka unix time).
  • ChatEndTimeLocalMillis
    - The end date & time of the chat session, in the local time zone, expressed as milliseconds since epoch (aka unix time).
  • ChatEndTimeUTCMillis
    - The end date & time of the chat session, in UTC time zone, expressed as milliseconds since epoch (aka unix time).

📄 Note: This feature is only available for 3CX versions 18 and later.

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 3CX and CRM), check the Enable Contact Creation checkbox and configure the parameters below.
  2. Contact Creation parameters are:
  • Create Contacts on Call Direction - Select if you want 3CX to create contacts on Inbound calls only, or also on Outbound calls.
  • 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.
  1. Please note that you can use variables in the first name and last name fields. 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).
  • CallDirection
    - The direction of the call, either "Inbound" or "Outbound".

📄 Note: This feature is only available for 3CX versions 16 and later. Since 3CX v16 Update 7, you can configure if you want that only inbound calls trigger the creation of new contacts, or also outbound calls.

See Also

Last Updated

This document was last updated on 19 July 2023

https://www.3cx.com/docs/freshsales-crm-integration/ 

Discuss this article