Loading...
Page tree
Skip to end of metadata
Go to start of metadata

If you cant find your CRM in the Integrations list, integrate it with Roistat using the API. 

How it works

After a client makes a lead on the website, Roistat automatically creates a deal in CRM. The visit number from browser cookie roistat_visit is transmitted to the additional field roistat of this CRM. If a manager accepts the order by the phone, he can ask a promo-code and enter it in the additional field roistat. 

How to configure the integration

Step 1. Install the tracking code

(warning) Skip this step if the tracking code is already installed on your website. 

You should install the Roistat tracking code on each webpage of your site that is visited by customers. The tracking code is needed to transmit information about customers' visits to Roistat. 

To learn more about tracking code installation, read this article

Step 2. Add the additional field roistat

Add the additional text field roistat in your CRM. Roistat will transmit the visit number in this field.
For example: if a customer visited your website and his visit number is 115, the additional field roistat will have the following value: roistat = 115.

Step 3. Configure the usage of API-methods to exchange the information with Rositat 

In the table below you can see the primary API methods for integration with Roistat таблице указаны основные методы для интеграции с Roistat:

MethodDescription
/project/add-orders

This method transmits the deals from CRM to Roistat. Then, Roistat verifies if there are duplicates of these deals in the project. If there are duplicates, Roistat updates the old deals, and if there are no duplicates, Roistat creates a new deal.  

Use the Cron software to hourly load the information about the deals that are created within the last 24 hours to Roistat. It will help the information in your Roistat project to be actual even if some attempts to refresh the list were failed. 

/project/set-statusesLoad or refresh the statuses of deals from CRM to Roistat.
/project/integration/order/{orderId}/status/updateChange the status of the deal.
/project/integration/order/{orderId}/deleteDelete the deal.

Step 4. Connect the Integration via API in the Integrations list 

  1. Open the Integrations
  2. Select the Roistat API - Full integration using your API and click the connect button:

  3. If the First cost is not loaded from the standard CRM field, select the Not used value for the First cost field.
  4. Copy the URL of the folder with deals in your CRM and insert it in the Link to deal in CRM field. Enter the {order_id} instead of deal id. For example: http://mycrm.com/orders/{order_id}/view.
  5. Copy the URL of the folder with clients' contacts in your CRM and insert it in the Link to contact in CRM field. Enter the {contact_id} instead of contact id. For example: http://mycrm.com/contacts/{contact_id}/view.
  6. Enter the webhook-URL that will receive from Roistat the information about the calls and deals from the website in the Address of leads handler field. Read more in this article
  7. Enter the webhook-URL that will receive from Roistat the additional information about deals in the Address to receive additional information on the deal field. Read more here
  8. Select one of the options in the Field with the date of payment dropdown list: 
    • Not used. If you select this option, the pay date of payments of a deal is the date when the deal received the status from Paid statuses group (read more from the para 10 of the instruction).
    • Parameter paid_date. If you select this option and the transmission of deals is configured via /project/add-orders API method, and the value of the field paid_date is transmitting in the additional fields array fields, the date of payment is determined by the paid_date field.
      (warning) Parameter paid_date works only for new deals. If you want to load the payment deal from the old deals, use the Specify the name of the field from which you need to load the date of sale experimental feature. 
  9. Click the Save button. 
    If you already used the API-method to load to Rositat the statuses of the deals from your CRM, these statuses will be displayed in the Not registered group. 
  10. Distribute the statuses of the deals by dragging them into the statuses groups. Read more in this article

Step 5. Configure the automatic transfer of leads to CRM

We recommend configuring the transfer of deals to CRM via Roistat. In this case, the deal will be firstly sent to Roistat, and then Roistat will send them to CRM. To learn more about the advantages of this way of leads transfer, read this article

If you already configured the transfer of leads using the code, you shall fill in the additional field roistat with the value of cookie roistat_visit.

You can receive the value of this cookie using this code: 

$roistatVisitId = array_key_exists('roistat_visit', $_COOKIE) ? $_COOKIE['roistat_visit'] : "unknown";
  • No labels