How to Develop a 3CX Plugin (2024)

  • Introduction
  • Test the API calls with Postman!
  • Step 2 - Download the CRM integration Wizard
  • Step 3 - Configure Authentication
  • Step 4 - Configure contact lookup
  • Map the Contact Query Response to 3CX
  • Step 5 - Configure contact search
  • Map the Contact Query Response to 3CX
  • Step 6 - Configure creating a customer in CRM
  • Map the Contact Creation response
  • Step 7 - Configure call journaling
  • Step 8 - Configure chat journaling
  • Testing Contact Lookup
  • Step 10 - Upload the template to 3CX
  • See Also

Introduction

3CX can integrate with any CRM that has a REST API to match an email or a number to a customer account in your CRM, helpdesk or ticketing system.

To match caller IDs to customers when 3CX receives an inbound call, it queries the CRM system to look up the customer name. If found, the contact is added in 3CX Contacts, the caller name is displayed in the Web Client and the contact entry includes a link to open the CRM contact.

3CX supports a large number of CRMsout of the box. If your CRM is not in the list, you can easily create a template to integrate with your CRM using our CRM integration Wizard. You will need only basic coding / web skills and documentation of the REST API of your CRM.

This guide describes how to install and use the template generator tool, taking you through the required steps to create a new template for your CRM, based on an example 3CX CRM.

Step 1 - Obtain & Test REST API URls

How to Develop a 3CX Plugin (1)

First step is to obtain the necessary URLs and authentication method by searching the CRM / Helpdesk / Ticketing system website or contacting the vendor. Please make sure you have all the required documentation and ideally a support contact at the vendor if you have any questions. You will need:

  • To find out whether your CRM supports “Basic” or“OAuth2” authentication.
  • Whether authentication is via username and password or an API Key
  • Web calls and responses for:
  1. Contact lookup by phone number
  2. Contact lookup by email
  3. Contact search by any field (optional)
  4. Contact creation (optional)
  5. Call journaling (optional)
  6. Chat journaling(optional)

Test the API calls with Postman!

Save time by testing these API calls first using the free Postman tool. The postman tool allows you to enter the URLs and see real time what the response will be. Postman has more debug tools than 3CX has so it's better to be sure about your API calls before you create and upload your integration.

Postman has some very good get started guides here.

Step 2 - Download the CRM integration Wizard

Download and install the 3CX CRM Integration Wizardfrom the Customer Portal. It walks you through the steps to createa template for 3CX. To create your CRM template:

  1. Login to the Customer portal and download the Wizard.
  2. Install the Wizard on a Windows Computer.
  3. Launch the “3CX CRM Template Generator”, click on “File” > “New” > “CRM Template Wizard...” and click on “Next”.

Step 3 - Configure Authentication

How to Develop a 3CX Plugin (2)

  1. Set a suitable “Template Name”.
  2. Based on your CRM’s API documentation, set the authentication method to:
  1. “None”
  2. “Basic” and select to authenticate with:
  1. “Username and Password”
  2. “API Key”
  1. “OAuth2” and set these:
  1. “Authorization Endpoint” URL, e.g. https://api.example.com/oauth2/auth
  2. “Token Endpoint” URL, e.g. https://api.example.com/oauth2/token
  3. “Scope” - optional
  4. “Additional Query String” - optional
  1. Click “Next” to continue.

Step 4 - Configure contact lookup

How to Develop a 3CX Plugin (3)

Now you need to specify the API calls that need to be invoked in your CRM system in order to identify a customer. 3CX can search for contacts using the caller’s number for phone calls or SMS and Whatsapp messages, or the email address for Live Chat conversations.

  1. “Lookup by Number API URL (GET)” - The URL to query the CRM for contacts based on their phone number.For example, for Freshdesk:
  1. https://domain.freshdesk.com/api/v2/contacts?phone=[Number]

  1. “Lookup by Email API URL (GET)” -The URL to query the CRM system based on their email address. For example, for Freshdesk:
  1. https://domain.freshdesk.com/api/v2/contacts?email=[Email]

  1. Click on “Next”.

Map the Contact Query Response to 3CX

How to Develop a 3CX Plugin (4)

  1. Now we need to map the query response from your CRM to 3CX fields. To do this, you need to specify the path from the JSON response for each of the fields required by 3CX:
  1. “Contact ID” - the ID of the matched contact, mandatory.
  2. Set at least one of these fields:
  1. “First Name”, e.g. contact.firstname
  2. “Last Name”, e.g. contact.lastname
  3. CompanyName”, e.g. contact.company
  1. “Email” - mandatory, e.g. contact.email
  2. Click “Next” to proceed.
  1. Now you need to map the respective response elements returned by the CRM web call, to at least one of these system variables:
  1. “Business Phone”, e.g. contact.businessphone
  2. “Business Phone 2”, e.g. contact.businessphone2
  3. “Mobile Phone”, e.g. contact.mobilephone
  4. “Mobile Phone 2”, e.g. contact.mobilephone2
  5. “Custom Value” - optionally map a custom response element to a variable.
  6. Set an appropriate “Contact URL” based on:
  7. an expression, e.g. https://api.example.com/show?ContactID=[ContactID]
  8. the server response, e.g. contact.profile_url
  9. Click on “Next”.

Step 5 - Configure contact search

How to Develop a 3CX Plugin (5)

Now you need to specify the API calls that need to be invoked in your CRM system in order to search contacts by any field. This is used when the user searches contacts from the Web Client by phone number, email, name or company name.

  1. “Search Contacts API URL (GET)” - The URL to query the CRM for contacts based on any field.For example, for Freshdesk:
  1. https://domain.freshdesk.com/api/v2/contacts/autocomplete?term=[SearchText]

  1. Click on “Next”.

Map the Contact Query Response to 3CX

How to Develop a 3CX Plugin (6)

See Also
What is IVR?

  1. Now we need to map the query response from your CRM to 3CX fields. To do this, you need to specify the path from the JSON response for each of the fields required by 3CX:
  1. “Contact ID” - the ID of the matched contact, mandatory.
  2. Set at least one of these fields:
  1. “First Name”, e.g. contact.firstname
  2. “Last Name”, e.g. contact.lastname
  3. CompanyName”, e.g. contact.company
  1. “Email” - mandatory, e.g. contact.email
  2. Click “Next” to proceed.
  1. Now you need to map the respective response elements returned by the CRM web call, to at least one of these system variables:
  1. “Business Phone”, e.g. contact.businessphone
  2. “Business Phone 2”, e.g. contact.businessphone2
  3. “Mobile Phone”, e.g. contact.mobilephone
  4. “Mobile Phone 2”, e.g. contact.mobilephone2
  5. “Custom Value” - optionally map a custom response element to a variable.
  6. Set an appropriate “Contact URL” based on:
  7. an expression, e.g. https://api.example.com/show?ContactID=[ContactID]
  8. the server response, e.g. contact.profile_url
  9. Click on “Next”.

Step 6 - Configure creating a customer in CRM

How to Develop a 3CX Plugin (7)

This is an optional step. If you want to enable the creation of a new contact in the CRM when the caller’s number can’t be matched to an existing customer, then enable the “Contact Creation” option. Configure:

  1. The “API URL (POST)” - 3CX uses this URL to create a new contact in the CRM system.For example, for Freshdeskthis would be the API URL to use here:
  1. https://domain.freshdesk.com/api/v2/contacts

  1. “Request Data” - the data to send to the CRM in order to create the contact, e.g. {"firstname":"[FirstName]", "lastname":"[LastName]", "phone":"[Number]"}
  2. Click “Next” to proceed.

Map the Contact Creation response

How to Develop a 3CX Plugin (8)

  1. Now we need to map the query response from your CRM to 3CX fields. To do this, you need to specify the path from the JSON response for each of the fields required by 3CX:
  1. “Contact ID” - the ID of the matched contact, mandatory.
  2. Set at least one of these fields:
  1. “First Name”, e.g. contact.firstname
  2. “Last Name”, e.g. contact.lastname
  3. CompanyName”, e.g. contact.company
  1. “Email” - set optionally, e.g. contact.email
  2. Click “Next” to proceed.
  1. Now you need to map the respective response elements returned by the CRM web call, to at least one of these system variables:
  1. “Business Phone”, e.g. contact.businessphone
  2. “Business Phone 2”, e.g. contact.businessphone2
  3. “Mobile Phone”, e.g. contact.mobilephone
  4. “Mobile Phone 2”, e.g. contact.mobilephone2
  5. “Custom Value” - optionally map a custom response element to a variable.
  6. Set an appropriate “Contact URL” based on:
  7. an expression, e.g. https://api.example.com/show?ContactID=[ContactID]
  8. the server response, e.g. contact.profile_url
  1. Click on “Next”.

Step 7 - Configure call journaling

How to Develop a 3CX Plugin (9)

This is an optional step. If you want to journal calls as activities in the CRM, then enable the “Call Journaling” option.

  1. “API URL (POST)” - 3CX uses this URL to create a new call activity in the CRM system.For example, for Freshdeskthis would be the API URL to use here:

https://domain.freshdesk.com/api/v2/tickets

  1. Use the respective fields to define the data set to use for recording call journal entries for inbound answered and missed calls, and outbound answered and not answered calls.For example, for Freshdeskthis would be the JSON data to use here for inbound answered calls:

{"phone":"[Number]","description":"[InboundCallText]","requester_id":[EntityId],"subject":"[Subject]","type":"Question","status":2,"priority":1,"source":3}

  1. Click “Next” to proceed.

Step 8 - Configure chat journaling

How to Develop a 3CX Plugin (10)

This is an optional step. If you want to register chat conversations as activities in the CRM, then enable the “Chat Journaling” option.

  1. “API URL (POST)” - 3CX uses this URL to create a new chat activity in the CRM system.For example, for Freshdeskthis would be the API URL to use here:

https://domain.freshdesk.com/api/v2/tickets

  1. “Request Data” - the data set to use for creating the chat journaling entries.For example, for Freshdeskthis would be the JSON data to use here:

{"phone":"[Number]","email":"[Email]","description":"[ChatMessages]","subject":"[ChatSubject]","requester_id":[EntityId],"type":"Question","status":2,"priority":1,"source":7}

  1. Click “Next” to proceed.

Step 9 - Save & test the CRM integration

How to Develop a 3CX Plugin (11)

You reached the end of the wizard. Click on “Finish”, to save the generated CRM template and start testing it. You must check that all the URLs and JSON data entered during the wizard work as expected. The generated template contains some static parts, like the URLs or JSON data, and also variables that need to be set, like CRM credentials or descriptions to use when logging a call.

In order to fill these variables, expand the node with your template name in the tree view on the left, and click the “Parameter Values” node. A grid will be shown on the right, containing all the variables that can be set. Some variables will have default values (for example the text to use for call journaling), and others will be empty (for example your CRM credentials). These are the values that you will configure from the 3CX Management Console once you upload the template.

Testing Contact Lookup

How to Develop a 3CX Plugin (12)

When selecting the “Parameter Values” node, the Properties window under the tree view will show the values that you will use for testing. For example, there you can enter the phone number or email address from which you will trigger the contact lookup.

  1. Select the Interaction Type (InboundCall, OutboundCall or Chat), and set the Number or Email to the value you want to search in the CRM.
  2. Right click on the “Parameter Values” node and select “Contact Lookup By Number” or “Contact Lookup By Email”.

How to Develop a 3CX Plugin (13)

  1. A new node with a date / time stamp is displayed under Parameter Values. Click on it to show the scenario result.
  2. The Request/Response tab displays the request sent to the CRM and the JSON response received back. The Response Text shows that the number was mapped to a contact named “Joe Black”.

How to Develop a 3CX Plugin (14)How to Develop a 3CX Plugin (15)

  1. The Response Tree tab shows how the JSON response is mapped to 3CX variables. The variables in bold show that there was a match.
  2. The Variables tab shows all the variables that were mapped during the contact lookup.
  3. The Output tab shows the data returned to 3CX.
  4. You can test contact search by any field, call journaling or chat journaling in the same way.

Step 10 - Upload the template to 3CX

Once the template has been tested and debugged, it’s time to upload it to 3CX. To do this, go to 3CX “Management Console”> “Settings”> “CRM”> “Server side”tab and click “Add”to upload your template to 3CX.

See Also

  • Review the 3CX XML template descriptionfor a complete reference.

Last Updated

This document was last updated on 23 September 2023

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

How to Develop a 3CX Plugin (2024)

FAQs

How to create an extension in 3CX? ›

Tutorials: Add Single Extension
  1. Step 1: Log in to the 3CX Management Console. Log in to the 3CX Management Console.
  2. Step 2: Select "Users" Select the "Users" tab from the 3CX Dashboard.
  3. Step 4: Fill in Extension Information. Fill in the following Extension information: Extension: Extension Number.

Does 3CX have an API? ›

With V20, we've updated the Call Control API for Linux - Windows to follow soon. Just like V18, it requires the application to be installed on an actual 3CX instance. A web version of this API is in the works and will be available soon.

How to integrate CRM with 3CX? ›

Integrating a CRM using the CRM Integration Wizard
  1. Introduction.
  2. Step 1 - Obtain & Test REST API URls.
  3. Test the API calls with Postman!
  4. Step 2 - Download the CRM integration Wizard.
  5. Step 3 - Configure Authentication.
  6. Step 4 - Configure contact lookup.
  7. Map the Contact Query Response to 3CX.
  8. Step 5 - Configure contact search.
Sep 23, 2023

What is 3CX built on? ›

3CX is an open standards software-based PBX system. It's based on the SIP standard and works with popular IP phone and SIP Trunks. 3CX enables calls and extensions to be made via traditional PSTN phone lines and VoIP services.

How can I make my own extension? ›

How do I create my first Chrome extension?
  1. Define your extension functionality and design the UI.
  2. Read the documentation.
  3. Create a developer account.
  4. Create a project directory.
  5. Create a manifest file.
  6. Load your extension into Chrome.
  7. Create a user interface (Popup).
  8. Create a background script (Service Worker).
Jan 1, 2023

Is 3CX VoIP or PBX? ›

The benefit of a 3CX VoIP PBX is its compatibility with a wide selection of hardware. Businesses don't have to worry about being forced into proprietary contracts that limit their investment in the future. It is a VoIP solution with options.

What protocol does 3CX use? ›

Ports used by 3CX Phone System
TCP:80If 3CX is installed for IIS, this is the default port number to reach the 3CX Management Console (http:///management) and the 3CX MyPhone Interface (http:///myphone)
UDP:51003CX Fax Receiving Service (SIP)
TCP:54803CX PhoneSystem Database Server (PostgreSQL)
18 more rows
Mar 7, 2023

Is 3CX free forever? ›

Hosted by 3CX is free for all customers for up to 2 months as part of your product trial. Once your trial expires, there's an annual hosting service charge, dependent upon the number of simultaneous calls (SC) in your subscription. Find more info here. Do I need to pay for hosting with 3CX?

Can 3CX control IVR? ›

3CX's powerful IVR / Digital Receptionist feature enables you to seamlessly direct callers to the correct extensions, queues or ring groups. With a standard IVR menu you can configure up to 10 options which callers can choose from. Create as many IVR menus. The limitation here is mainly the caller's patience.

Can 3CX integrate with teams? ›

The 3CX Teams integration is intended for installations so that 3CX and Teams users can coexist. i.e. installs that have a number of users that prefer to use Teams rather than 3CX. In these cases, inbound calls from 3CX Trunks can be forwarded to Teams users and 3CX users can call Teams users and vice versa.

Is 3CX a CRM system? ›

Yes! 3CX integrates with Microsoft Office 365. Admins can sync users - and users can sync personal contacts and their calendar. You can read more about it here.

What are the limitations of 3CX? ›

Limitations of 3CX Free Licence

No more than 10 users. No more than 4 simultaneous calls (including internal calls) No number porting.

Who owns 3CX? ›

3CX was founded by Nick Galea in 2005. 3CX's first product release was 3CX Phone System which was developed and released as a free IP PBX in 2006. In 2007, the company released the first commercial edition of 3CX Phone System, v6.0.

What is 3cx extension? ›

Overview. The 3CX browser extension provides click2call from any website or CRM system for 3CX PBX users. With the 3CX extension, Click2Call functionality enables telephone numbers on any webpage or CRM system to be 'hyperlinked' allowing a simple click to initiate the call instead of copying and pasting.

How do I add a phone to my 3cx extension? ›

Step 1: Add The Phone to the Extension

From the admin console in your web client: Go to “Users” and select the user you want to add a phone for. Click on the “IP Phone” tab. Click “Configure a phone” to add a phone.

How many extensions can you have in 3cx? ›

General Requirements
SmallEnterprise
Extensions (up to)101000
Jun 11, 2023

How do I change the extension on my 3cx? ›

From the 3CX Management Console, click on the "Users" tab. Click on the box next to the extension you wish to modify. Click on the "Status" button. Change the user's current status to one of the options from the drop-down menu.

Top Articles
Latest Posts
Article information

Author: Catherine Tremblay

Last Updated:

Views: 6424

Rating: 4.7 / 5 (67 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Catherine Tremblay

Birthday: 1999-09-23

Address: Suite 461 73643 Sherril Loaf, Dickinsonland, AZ 47941-2379

Phone: +2678139151039

Job: International Administration Supervisor

Hobby: Dowsing, Snowboarding, Rowing, Beekeeping, Calligraphy, Shooting, Air sports

Introduction: My name is Catherine Tremblay, I am a precious, perfect, tasty, enthusiastic, inexpensive, vast, kind person who loves writing and wants to share my knowledge and understanding with you.