Interact with your customers in real time and increase your sales

A FREE communication tool for you to monitor and chat with your clients on your website, Facebook, Telegram and Viber.

incorrectly entered e-mail address Something went wrong, try again later

Yay! You just completed Step 1.
Now please check your email inbox, we sent you the installation instructions. GO, GO, GO!

CRM integrations using API for developers

Choose another article

The goal of integrating JivoChat with a CRM system is to save data from JivoChat into the leads/customer section of your CRM and also to show updated information (e.g. visitor contact info, lead details, account balance, etc.) in the JivoChat agent’s application (a.k.a. the application where JivoChat users receive chats from their customers).

The JivoChat system sends an HTTP POST request to the specified URL in such cases:

What data is transferred

You can use our documentation on https://www.jivochat.com/api.

Main data that JivoChat sends:

Api1e

JivoChat can receive responses from your CRM system with the following data:

Api2e

function jivo_onLoadCallback(){
    jivo_api.setUserToken(“a link | id | any data”);
}

JivoChat doesn’t process the user_token and it won’t show anywhere, it will just transfer all of it’s data to your CRM.

How to receive data from JivoChat on your server side

The JivoChat webhook request is an HTTP request with POST method to specified URL. Request body is a JSON object with all data that you can find in the documentation. Here is an example in PHP for how to get a request and save it in a log file:

<?php
$fp = fopen('/request.log', 'a');
fwrite($fp, file_get_contents('php://input'));
fclose($fp); ?>

Of course it doesn’t mean that you should use a text file to keep all data. It is just an example that can be used to check how it works and how our request looks like. Next you should parse this data, push it into your base, search for a lead record and so on. After that, your CRM should send a response with the customer’s data in the object like it is described in the documentation. You can use just something like the echo function in PHP, without any additional HTTP headers.

Here is what a response looks like:

{"result":"ok","custom_data":[{"title":"Answer","content":"42"},{"title":"Last chat","content":"27 Sep 2016 19:37:12"}],"contact_info":{"name":"John Doe","phone":"+79500123567","email":"johny1337@jivoteam.com","description":"Visitor comment"},"enable_assign":true,"crm_link":"http:\/\/mycrm.ru\/user\/1"}

And from in a browser:

Api3

What does integration should do?

This is what users are usually expecting from integrating with a CRM system

Once your CRM is contacted by the JivoChat system (either when a chat_accepted or chat_updated event happens) it should look for that customer in your CRM and if a customer with the specified contact information exists, then your CRM should populate the rest of that customer’s full data into JivoChat and also insert a link back to that customer’s profile in your CRM. If that customer doesn’t exist in your CRM, a new customer/lead account should be created for them automatically by the known data that JivoChat sends to your CRM.

Lead record creation

Please pay attention to data priority. What data will be recorded or deleted? If a user introduced themselves in a chat and specified email address A and phone number B, but in CRM there is a lead with email A and phone number C. What number should be saved, oldest or newest? It is probably more desirable if the CRM has fields for additional phones and emails.

Related articles:

    Do you still have any questions? Our support team will be more than happy to help you 24x7 in the chat on our site.