Integrating a CRM system via the API¶
To integrate a CRM system with R7K12, you must use two API methods:
What the setStatuses method is for¶
For example, your CRM has the following statuses:
- New
- Sent for picking
- Availability confirmed
- Being picked
- Agreed with the client
- Being delivered
- Completed
You want to analyze the entire deal funnel by status. What do you need to do for this?
Status groups in R7K12¶
To single out target requests, sales and canceled requests among all your deals (orders) in R7K12 analytics, R7K12 has four status groups: “Not counted”, “In progress”, “Completed”, “Canceled”.
The statuses from your CRM need to be distributed among these groups. Then you will see the following columns in analytics:
- The "Requests" column counts deals whose statuses are assigned to the “In progress”, “Completed” and “Canceled” groups.
- The "Sales" column counts deals whose statuses are assigned to the “Completed” group.
- The "Canceled requests" column counts deals whose statuses are assigned to the “Canceled” group.
- The "Deals" column counts all deals from the CRM system (in other words, from all status groups).
- The "Inquiries" column counts all inquiries from all deals (one deal can contain several inquiries from a client). An inquiry is a client's call, a request from the website, an email message, etc.
To map each of your CRM deal statuses to a status group in R7K12, you need to send us the status distribution via the API once (as in the image above) using the setStatuses method. If your CRM statuses change, send the updated data afterwards. A code example is provided in the method description.
What the addLeads method is for¶
Once you have distributed the statuses among the groups in R7K12, you can send deals with a specific status group. Then in analytics you will be able to see the number of target requests (the "Requests" column), sales, canceled requests, total deals and inquiries. You will also be able to see which source brought you each of these deals. The method has required and optional fields. Accordingly, the minimum set of fields for sending data contains the required fields. Among the optional fields is the r7k12id field -visit ID. Yes, you can send the method correctly without this field (or with it empty). But then all deals will be assigned to the "No visit" source and will remain undefined. That is, you will not see which source the requests and sales came from. That is why the r7k12idfield must be defined. To do this, install our tracking code following the instructions - Installing the tracking code. When a visit to the website occurs after the R7K12 tracking code is installed, the ID value will be numeric. For offline sources, you can pass the source name as the r7k12id value. Use the detailed examples in the API method - addLeads.