Building a Real Estate CRM

Building a Real Estate CRM

Zoho Developer Console allows developers to transform our vanilla CRM into any industry specific CRM. A real estate CRM needs to manage comprehensive and comparative details about properties, offer ease in handling Buyer and Client data and provide the convenience of effortlessly pulling out information corelated to one or more module(s). Integration with other real estate specific third party application(s) further enhances the usability of a real estate CRM. Property Pro is a real estate CRM which embodies all these features and much more, thereby giving customers the competitive market advantage.

 Setup a CRM application

The first step in building your vertical CRM is to configure certain basic settings and choose the application modules you'd like to include.

To create and setup a new application

  1. Log in to your Zoho Developer account and click Build CRM for Verticals.
  2. In the Vertical CRM page, click Create App.
  3. In the New CRM for Verticals page, input the name of your application, appropriate to the industry, for e.g. "Property Pro" and your URL as "propertypro.zohoplatform.com".
    Note: Your URL can be mapped to your custom domain later when you are branding your application.
  4. Select Realestate from the Select category dropdown.
    The category denotes the industry (Automobile, Insurance, Health care, etc.) for which your application is being developed
  5. The modules Leads, Contacts, Potentials, Documents, Reports, Activities, Forecasts and Social alone should be selected. Uncheck the rest of the modules.
  6. Provide a Short Description about your application.
  7. Click Create. A new app is created.

         

 Configure the Organization Variables

  1. Select your app and click Company Settings from the left pane and click Org settings.
  2. Click Create and set up the custom variables:

         

 Rename the preset modules

The preset modules can be renamed to suit the real estate lingo and they can be mapped as explained below:

  1. In your Zoho Developer Console, click Test your Application located on the top right corner.
  2. Click the setup icon on the top right hand corner of the sandbox.
  3. In the Setup page, under Customization, click Modules.
  4. In the List of Modules page, hover over the module which you want to rename and click "Rename" as shown below: 
       
  5. Provide the module name in Enter Module Name dialog box, 
  6. Some of the preset modules have been renamed as mentioned in the below table. 
    Sl.NoDisplayed in tabs asModule Name
    1Buyers Leads
    2Clients Contacts
    3Transactions Deals
    4Activities Activities
    5Tasks Tasks
    6Events Events
    7Calls Calls
    8Dashboards Dashboards
    9Reports Reports
    10Documents Documents
    11Social Social
    12Forecasts Forecasts

 Create a Custom Module

  1. Click Modules in the left pane of your vertical CRM page.
  2. In the Modules page, click Create New Module.
  3. To enter the module name details, click on the edit symbol .
  4. Enter the singular and plural form of the module name in the Module Details dialog box as "Property" and "Properties" respectively.
  5. Click Save Layout.
  6. Select the profile "Administrator". Users in the selected profile(s) will have access to the custom module.
       
  7. Click Save Layout.

 Add new fields to the new custom module

  1. Click Modules in the left pane of your vertical CRM page.
  2. In the List of Modules page, click Properties module.
  3. In order to add fields into sections, drag and drop the New Section into the layout and rename it. Subsequently, add the fields listed below:

    List of sections and Custom fields

    Sl.NoFieldData Type
    Property Information (section)
    1Approved Checkbox
    2Year Built Single Line
    3Unapproved Checkbox
    4Year Updated Single Line
    5Parking Type Single Line
    6No of Bedrooms Single Line
    7Rooms Single Line
    8No of Bathrooms Single Line
    9Type of Property Pick List
    10Built up Area Single Line
    11Property Component Multiselect
    12Property Area Single Line
    13No of Floors Single Line
    14Basement Single Line
    15Heating Sources Single Line
    16View Single Line
    17No of Owners Pick List
    18Buyer Lookup
    19Transaction Lookup
    Pricing Information
    20CMDA Approval Single Line
    21Maintenance Cost Single Line
    22Property Approx Price Single Line
    23Zestimate Single Line
    Address Information
    24Street Single Line
    25City Single Line
    26State Single Line
    27Zip Code Single Line
    28Country Single Line
    Neighbour Information
    29Neighbourhood Pick List
    30Elementary School Lookup
    31Middle School Lookup
    32District School Single Line
    Unused Section (preset fields)
    33Property Owner Single Line
    34Created By Single Line
    35Modified By Single Line

 Add a Custom Function

Fetch Properties Rule - Custom Function

Whenever a new buyer is added into the CRM system, details about properties in the buyer's preference location are fetched and displayed in the 'Properties' module.

To create the Fetch Properties custom function, perform the following:

  1. Click Automate located in the left pane of your Vertical CRM application.
  2. Select Workflow
  3. Under Rules tab, click Create Rule.
  4. Provide the following details:
    1. Basic Information
      • Module: Buyers
      • Rule Name: Fetch Properties
      • Provide a Description
    2. Rule Trigger
      • Execute based on: Select A Record Action.
      • Select Create.
      • Click Next.
    3. Rule Criteria
      • None
      • Click Next.
    4. Under Actions, clickin Call Custom Functions.
      • The Deluge Scripting Editor gets opened. 
      • Workflow Custom Function: CreateProperties
      • Copy the below code into the editor:

        LeadId= input.buyer.get("Leads.ID");

        datamap = map();

        datamap.put("module","Leads");

        datamap.put("id",LeadId);

        resp = zoho.crm.invokeConnector(("crm.get"), datamap);

        respMap =(resp.get("response")).toMap();

        users = respMap.get("data");

        temp = users.subString(1,(users.length()-1));

        usersVal = temp.toMap();

        street = usersVal.get("Street");

        city = usersVal.get("City");

        state = usersVal.get("State");

        street1 = street.replaceAll(" ",("+"),false);

        street2 = city +"%2C+"+ state;

        zwsId = zoho.crm.getOrgVariable("Zillow ZWSID");

        detail = getUrl("http://www.zillow.com/webservice/GetSearchResults.htm?zws-id="+ zwsId +"&address="+ street1 +"&citystatezip="+ street2);

        zpid = detail.executeXPath("/SearchResults:searchresults/response/results/result/zpid/text()");ZillowPropertyId= zpid.toLong();

        newDetail = getUrl("http://www.zillow.com/webservice/GetComps.htm?zws-id="+ zwsId +"&zpid="+ZillowPropertyId+"&count=5");

        newzpidsList = newDetail.executeXPath("/Comps:comps/response/properties/comparables/comp/zpid/text()").toList("-|-");

        for each newzpids in newzpidsList

        {

        detail = getUrl("http://www.zillow.com/webservice/GetUpdatedPropertyDetails.htm?zws-id=" + zwsId + "&zpid=" + newzpids);

        zpid1 = detail.executeXPath("/UpdatedPropertyDetails:updatedPropertyDetails/response/editedFacts/useCode/text()");

        zpid2 = detail.executeXPath("/UpdatedPropertyDetails:updatedPropertyDetails/response/editedFacts/bedrooms/text()");

        zpid3 = detail.executeXPath("/UpdatedPropertyDetails:updatedPropertyDetails/response/editedFacts/bathrooms/text()");

        zpid4 = detail.executeXPath("/UpdatedPropertyDetails:updatedPropertyDetails/response/editedFacts/finishedSqFt/text()");

        zpid5 = detail.executeXPath("/UpdatedPropertyDetails:updatedPropertyDetails/response/editedFacts/lotSizeSqFt/text()");

        zpid6 = detail.executeXPath("/UpdatedPropertyDetails:updatedPropertyDetails/response/editedFacts/yearBuilt/text()");

        zpid7 = detail.executeXPath("/UpdatedPropertyDetails:updatedPropertyDetails/response/editedFacts/yearUpdated/text()");

        zpid8 = detail.executeXPath("/UpdatedPropertyDetails:updatedPropertyDetails/response/editedFacts/numFloors/text()");

        zpid9 = detail.executeXPath("/UpdatedPropertyDetails:updatedPropertyDetails/response/editedFacts/basement/text()");

        zpid10 = detail.executeXPath("/UpdatedPropertyDetails:updatedPropertyDetails/response/editedFacts/roof/text()");

        zpid11 = detail.executeXPath("/UpdatedPropertyDetails:updatedPropertyDetails/response/editedFacts/view/text()");

        zpid12 = detail.executeXPath("/UpdatedPropertyDetails:updatedPropertyDetails/response/editedFacts/parkingType/text()");

        zpid13 = detail.executeXPath("/UpdatedPropertyDetails:updatedPropertyDetails/response/editedFacts/heatingSources/text()");

        zpid14 = detail.executeXPath("/UpdatedPropertyDetails:updatedPropertyDetails/response/editedFacts/heatingSystem/text()");

        zpid15 = detail.executeXPath("/UpdatedPropertyDetails:updatedPropertyDetails/response/editedFacts/rooms/text()");

        zpid16 = detail.executeXPath("/UpdatedPropertyDetails:updatedPropertyDetails/response/neighborhood/text()");

        zpid17 = detail.executeXPath("/UpdatedPropertyDetails:updatedPropertyDetails/response/schoolDistrict/text()");

        zpid18 = detail.executeXPath("/UpdatedPropertyDetails:updatedPropertyDetails/response/elementarySchool/text()");

        zpid19 = detail.executeXPath("/UpdatedPropertyDetails:updatedPropertyDetails/response/middleSchool/text()");

        zpid20 = detail.executeXPath("/UpdatedPropertyDetails:updatedPropertyDetails/response/address/street/text()");

        zpid21 = detail.executeXPath("/UpdatedPropertyDetails:updatedPropertyDetails/response/address/zipcode/text()");

        zpid22 = detail.executeXPath("/UpdatedPropertyDetails:updatedPropertyDetails/response/address/city/text()");

        zpid23 = detail.executeXPath("/UpdatedPropertyDetails:updatedPropertyDetails/response/address/state/text()");

        createMap = map();

        createMap.put("Basement", zpid9);

        createMap.put("No_of_Bathrooms", zpid3);

        createMap.put("No_of_Bedrooms", zpid2);

        createMap.put("City", zpid22);

        createMap.put("CustomModule1_Name", "Zillow Property Id " + newzpids);

        createMap.put("District_School", zpid17);

        createMap.put("Elementary_School", zpid18);

        createMap.put("Built_up_Area", zpid4);

        createMap.put("Heating_Sources", zpid13);

        createMap.put("Heating_System", zpid14);

        createMap.put("Property_Area", zpid5);

        createMap.put("Middle_School", zpid19);

        createMap.put("Neighbourhood", zpid16);

        createMap.put("No_of_Floors", zpid8);

        createMap.put("Parking_Type", zpid12);

        createMap.put("No_of_Floors", zpid10);

        createMap.put("Rooms", zpid15);

        createMap.put("State", zpid23);

        createMap.put("Street", zpid20);

        createMap.put("View", zpid11);

        createMap.put("Year_Built", zpid6);

        createMap.put("Year_Updated", zpid7);

        createMap.put("Zip_Code", zpid21);

        createMap.put("Buyer", LeadId);

        l = List();

        l.add(createMap);

        dataMapzz = map();

        dataMapzz.put("module", "Properties");

        dataMapzz.put("data", l);

        response = zoho.crm.invokeConnector("crm.create", dataMapzz);

        info response;

        }

      • Click Save & Associate.
    5. To save the workflow rule, click Save.

To ensure correctness of custom function, perform the following:

  1. Click Automate located in the left pane of your Vertical CRM application.
  2. Select Workflow.
  3. Click Custom Functions.
  4. Click the edit icon of the "CreateProperties" function.
  5. In the Deluge Scripting Editor, click Execute
  6. Provide the Buyer ID of a record and click Submit.
  7. The following API response is obtained:

              

 Create a Connected App with Related List widget

  1. Click Connected Apps located in the left pane of your Vertical CRM application.
  2. Provide the following details:
    • Connected App Name: Property Pro
    • Provide Description.
    • Choose Hosting: Server side application
    • Specify Base URL: SandBox : "http://localhost:8000"
    • Click Save

To build a Related List widget, the following groundwork needs to be done:

  1. Download the Zillow Source Code to your desktop and extract the folder.
  2. Go to https://github.com/ZohoDevelopers/embeddedApp-js-sdk/releases/.
  3. Download ZohoEmbededAppSDK.min.js from the Downloads section into the "lib" folder of your source code directory.
  4. Any file hosting server can be used to host the application.

    Note: An example of how the application can be hosted using Python server is given below:

    • Go to the website https://www.python.org/download/releases/2.7.6/
    • Choose Windows x86 MSI Installer (2.7.6) (sig) to download.
    • Once Python is installed, run the server using the following steps:

    For Windows:

    1. Open Command Prompt and go to the location where you had downloaded and kept the unzipped source code for the embedded app.
    2. Start the Python server in HTTP mode with the following command
      • C:Python27/python.exe -m SimpleHTTPServer 8000

    For Mac:

    1. The python module already exists in the mac OS. So you need not download it again. Go to the location where you have saved the source code for the embedded app.
    2. Open up the Terminal and start Python by executing the following command
      • python -m SimpleHTTPServer 8000
    3. Execute http:localhost:8000 on the browser tab to verify the host from local machine.

       You can now view the list of files in the source folder.

To add the Related List widget

  1. Click Customize in the left pane of your Vertical CRM application.
  2. Go to Related List tab in the Customization page
  3. Click Add Widgets under Custom tab.
  4. In the Create Custom Widget page provide the following details:
    • Name: Property Details
    • Module: Select Properties
    • Resource Path: zillow/html/relatedListSearch.html
    • Click Save.
  5. Provide all Permissions to the connected app by following the below steps:
    • Click Connected Apps in the left pane.
    • Click on Permissions.
    • In the Permissions dialog window, provide all data access permissions.

 Test the Related List widget in Sandbox

  1. Click Test your Application located on the top right corner of your application.
  2. Click Properties module.
  3. Select a Property record.
  4. In the left pane, under Related List, click Property Details. You will be able to see the following details:

             

Share this post :

FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohodeveloper.com