Skip to content

Using Custom Logic for Creating a Deal (Matching)

Overview

If your CRM is already configured to automatically create deals based on leads from the website, you can set up tracking the lead source in Roistat in a few clicks. In this case, you do not have to change the original logic and reconfigure all integrations.

When using matching, the interaction between systems goes like this:

  1. The Roistat tracking code records visits to the website.
  2. When a lead is generated on the website (via contact forms, shopping cart, online chat, callback, etc.), the information is sent to Roistat. At the same time, a deal is created in the CRM according to the current logic.
  3. If the client makes a call to the call tracking number, information about the incoming call is sent to Roistat. At the same time, a deal is created through the integration between the telephony service and the CRM.
  4. If the client sends an email to the company, information about the incoming message is sent to Roistat. At the same time, a deal is created through the integration between the email service and the CRM.
  5. Processed deals are regularly uploaded from the CRM to Roistat analytics, where they are assigned the lead source.

Please note:

  • Roistat uses the deal creation time and the client's contact information to match the lead source with the deal from the CRM.

  • Matching continues to work even if deals are not uploaded from the CRM to Roistat regularly, but at long intervals. Just make sure that the deal creation time is transferred from the CRM.

  • Roistat checks deals from the CRM created within +/- 1 hour from the moment the deal information is uploaded to Roistat. For example, if the deal information is uploaded at 10:00, Roistat will check deals created between 9:00 and 11:00.

1.png

Usage and Setup

Calltracking

Use the instructions below if you have configured the integration between the telephony service and the CRM, which performs the following actions when incoming calls are received:

  • Creates new deals and assigns them to the manager who communicated with the client;
  • Creates additional notes and changes the deal status at the end of the call;
  • Performs other actions according to the integration logic.

  • Go to the project settings. In the Experimental features section, enable the option Match the source of the visit with the deals using own logic of creating leads:

    2.png

    If you want the source to be matched with the phone number specified in the additional field of the deal, use the option Name of the field with the phone number in the deal or contact in the CRM, which should be used to identify source of the deal when using Roistat Calltracking. Enter the name of the field in which the number will be entered. When uploading a deal, Roistat will compare the number entered in this field with the numbers in the Calltracking history to find the source:

    3.png

  • Set up the Calltracking script.

  • Disable lead creation in the CRM:

    4.png

  • To check if it works, call the number that you set up in Calltracking.

    Your current integration must create a deal in the CRM, and information about the call must appear in the Project diagnosticsList of submitted leads section:

    5.png

  • After uploading the deal from the CRM to Roistat analytics, the deal will be assigned a source.

Emailtracking

Use the instructions below if you have configured the integration between the email service and the CRM, which performs the following actions when emails are received:

  • Adds all client's emails to one deal;
  • Allows you to flexibly configure the transfer of files to the CRM;
  • Performs other actions according to the integration logic.

  • Go to the project settings. In the Experimental features section, enable the option Match the source of the visit with the deals using own logic of creating leads:

    6.png

  • Set up the Emailtracking script.

  • Disable lead creation in the CRM:

    7.png

  • To check if it works, send an email to the address you set up in Emailtracking.

    Your current integration must create a deal in the CRM, and information about a new email must appear in the Project diagnosticsList of submitted leads section within 5-15 minutes:

    8.png

  • After uploading the deal from the CRM to Roistat analytics, the deal will be assigned a source.

Leads from Website Forms and the Shopping Cart

Use the instructions below if you have configured complex integration logic for leads from website forms and the shopping cart.

  1. Set up receiving leads from the website in the Roistat interface or using the code.

  2. If you configured this in the interface, disable sending leads to the CRM:

    9.png

    If you configured this using the code, send the 'is_skip_sending' => '1' parameter.

  3. To check if it works, leave a request in the form that you set up above.

    A deal must be created in the CRM according to your current integration logic, and information about a new lead must appear in the Project diagnosticsList of submitted leads section:

    10.png

  4. After uploading the deal from the CRM to Roistat analytics, the deal will be assigned a source.

Facebook Lead Ads

  1. Go to the project settings. In the Experimental features section, enable the option Match the source of the visit with the deals using own logic of creating leads:

    11.png

  2. In the advertising channel integration settings, specify the pages you want to track and turn off the Send to CRM option:

    12.png

Leads from External Services

If integration with an external service (call tracking, online chat or callback service) has a complex logic for creating deals in your CRM, you can set up Roistat to record all incoming requests. This way, deals created by a third-party service will be assigned the correct source.

  1. Go to the service integration settings.

  2. At the Behavior settings step, turn off the Send leads to CRM option:

    13.png