Create an additional field named roistat, that will contain the visit number.
Configuring the script
1. Open your website server and find a file that processes the form of the lead. For example, this file may be a script that sends the data from the form to to e-mail.
2. The data in this file must be in UTF-8 encoding.
3. Add the Roistat script to this file. The script will collect the data from the lead and send it to Roistat. On the basis of this data, Roistat will create a lead in CRM.
Example of the script:
<?php $roistatData = array( 'roistat' => isset($_COOKIE['roistat_visit']) ? $_COOKIE['roistat_visit'] : 'nocookie', 'key' => 'value', //value is the integration key from your Roistat project 'phone' => 'value', //value is the client's phone number or variable that receives this number 'email' => 'value', //value is the client's email or variable that receives this email 'fields' => array(), //array that can be filled to receive the values of additional fields or can be left empty ); file_get_contents("https://cloud.roistat.com/api/proxy/1.0/leads/add?" . http_build_query($roistatData));
Client's phone number and email are mandatory fields. You have to transmit at least one of them, or lead will not be created.
Integration key must also be entered. Without integration key, the upload of leads will not work. You can find the integration key in your Integration catalog:
These settings are useful, but not necessary. If you want only to transmit the standard fields of the lead to CRM and dont need to configure the callback and verification of incoming leads for duplicate, go to configuration testing phase.
If a client left his phone number in the form of the lead, you can automatically call him back. To do it, you need to activate the callback in the Lead Hunter settings and specify your manager's phone number for callback.
Transmission of additional fields
You can create the additional fields of leads in your CRM and automatically fill them using the Roistat service when a lead is created using the website form. For example, you can appoint a responsible manager by transmitting his ID to the field in CRM.
The formats and names of additional fields in each CRM are different. To transmit their value, you have to know their ID. If you don't know the ID of these fields, contact your CRM customer service.
Many CRM's have API. With the help of API-method, you can upload your leads and check out their fields and ID of these fields.
The usage of variables
You can use the variables to transmit the value of the visit to some fields of the lead. For example, you can transmit the name of the city to the additional field in CRM from which the client visited your website and made a lead.
You can use the variables in the following fields of the leads:
- additional fields
Use the 'sync' => '1' parameter when after the sending of lead from website to Roistat you need to receive the approval of deal creation from CRM. If the deal is created successfully, the script will return its ID. It may be useful to show a client the number of order after the creation of the deal. If the deal cannot be created, you will see the error message instead of ID.
You can export the list of the lead to Excel. To do it, select the period and click the Download button:
Solution to the problems
It means that the lead is not sent from the website to Roistat or cannot be received by Roistat. Possible causes:
How to solve: