IndiaMART Integration for Zoho CRM

IndiaMART Integration for Zoho CRM

If you need to get IndiaMart leads in Zoho CRM without using Extension then this solution is for you. See step by step guide to integrate IndiaMart API quickly.

  1. Create Leads in Zoho CRM - IM ENQUIRY TIME, IM PRODUCT, IM QUERY ID, IM QUERY MCAT NAME, IM QUERY TYPE, IM RECEIVER MOBILE. Replace API name in following function.
  2. Create a new Schedule from Setup > Automation > Schedules > Create New Schedule. This will help to get IndiaMart leads to Zoho CRM in every 2 hours 
  3. Give the schedule name i.e. IM_Leads and write a new function
  4. Add following deluge code in new fuction and save it.

  1. im_crm_key = ''; // ADD your IM CRM API Key

  2. if (!im_crm_key.isEmpty()) {
  3.     response = invokeurl
  4.     [
  5.         url: "https://mapi.indiamart.com/wservce/crm/crmListing/v2/?glusr_crm_key=" + im_crm_key,
  6.         type: GET
  7.     ];

  8.     if (response.get('CODE') == 200 && response.get('TOTAL_RECORDS') > 0) {
  9.         leads = response.get('RESPONSE');

  10.         if (!leads.isEmpty()) {
  11.             for each lead in leads {
  12.                 mobile = lead.get('SENDER_MOBILE').replaceAll('-', '');

  13.                 if (lead.get('QUERY_TYPE') == 'W') {
  14.                     query_type = 'Direct & ASTBUY Enquiries';
  15.                 } else if (lead.get('QUERY_TYPE') == 'BL') {
  16.                     query_type = 'Buy-Leads';
  17.                 } else if (lead.get('QUERY_TYPE') == 'P') {
  18.                     query_type = 'PNS Calls';
  19.                 } else if (lead.get('QUERY_TYPE') == 'V / BIZ') {
  20.                     query_type = 'Catalog-view Leads';
  21.                 } else if (lead.get('QUERY_TYPE') == 'WA') {
  22.                     query_type = 'WhatsApp Enquiries';
  23.                 }

  24.                 leadinfo = {
  25.                     "indiamartelsner__IM_QUERY_ID": lead.get('UNIQUE_QUERY_ID'),
  26.                     "indiamartelsner__IM_QUERY_TYPE": query_type,
  27.                     "Last_Name": lead.get('SENDER_NAME'),
  28.                     "Mobile": mobile,
  29.                     "Email": lead.get('SENDER_EMAIL'),
  30.                     "Company": lead.get('SENDER_COMPANY'),
  31.                     "Street": lead.get('SENDER_ADDRESS'),
  32.                     "City": lead.get('SENDER_CITY'),
  33.                     "State": lead.get('SENDER_STATE'),
  34.                     "Zip_Code": lead.get('SENDER_PINCODE'),
  35.                     "Country": lead.get('SENDER_COUNTRY_ISO'),
  36.                     "Phone": lead.get('SENDER_MOBILE_ALT'),
  37.                     "indiamartelsner__IM_PRODUCT": lead.get('QUERY_PRODUCT_NAME'),
  38.                     "Description": lead.get('QUERY_MESSAGE'),
  39.                     "indiamartelsner__IM_QUERY_MCAT_NAME": lead.get('QUERY_MCAT_NAME'),
  40.                     "indiamartelsner__IM_RECEIVER_MOBILE": lead.get('RECEIVERMOBILE'),
  41.                     "indiamartelsner__IM_ENQUIRY_TIME": lead.get('QUERY_TIME'),
  42.                     "Lead_Source": 'Indiamart'
  43.                 };

  44.                 response = zoho.crm.createRecord("Leads", leadinfo);
  45.             }
  46.         }
  47.     }
  48. }

To learn more about IndiaMart API, please visit https://help.indiamart.com/knowledge-base/lms-crm-integration-v2/

In case of any help require, please reply in this topic.

Thanks,
Pankaj