Automate your consulting estimates

Automatically calculate consulting days, resources, and costs based on employee count for accurate, consistent, and faster project estimates.

Consulting firms often create estimates and proposals based on the client's size, which includes factors such as the number of employees and operational complexity. These factors directly impact the number of consulting days required, the number of consultants needed, and the overall project cost. To standardize pricing, firms maintain this information in a tabular rate card that business development executives (BDEs) refer to when creating deals.

However, manually entering information using lookup tables can often result in the BDE team entering incorrect prices. For example, one BDE might assign five consulting days for a 200-employee company, while another might assign ten, introducing a range or boundary error. These inconsistencies could result in billing mistakes or even a loss of revenue for the firm. Wouldn't it be helpful if your CRM could automatically calculate and fill these values based on the client's employee count? Fortunately, our low-code tools make this possible.

Using a combination of custom subform fields and a client script, you can auto-populate the correct values upon saving records. The BDEs only need to enter the number of employees; the system instantly updates the subform with consulting days, consultant allocation, and estimated cost—all based on predefined business rules. This gives your BDE team the confidence to deliver precise and professional estimates without manual calculations.

Permissions and availability

  • Users with the Modules Customization permission can add custom fields.
  • Users with the Manage Extensibility permission can create client scripts.
  • Users with the Manage Sandbox permission can manage the sandbox.

Requirements

  • Add a Number field to the Deals module. This field will hold the employee count. Learn more
  • Add a Subform field in the Deals module to capture information on consulting days, consultant allocation, and estimated costs.
  • Add two Number fields and one Currency field to the subform to hold the consulting days, consultant allocation, and estimated costs, respectively.
  • Create a client script that triggers whenever you save the deal record. Learn more
  • Test the function in a sandbox environment before deploying it to your production environment. Learn more

Add custom fields

The first step is adding the custom lookup and currency fields to the Deals module.

  1. Navigate to Setup > Customization > Modules and Fields.
  2. Click the Deals module to open the layout editor and do the following:
    1. Drag and drop the Number field from the New Fields tray to the layout.
    2. Name the number field (e.g., "Number of Employees") and define its properties as required.
    3. Drag and drop a Subform field from the New Fields tray to the layout.
    4. Name the subform field (e.g., "Project Estimate") and define its properties as required.
    5. In the Project Estimate subform section, click Add Field and select Number.
    6. Name the number field (e.g., "Consulting Days") and define its properties as required.
    7. Click Add Field again, and choose Number.
    8. Name the number field (e.g., "Consultant Allocation") and define its properties as required.
    9. Click Add Field again, and select Currency.
    10. Name the currency field (e.g., "Estimated Cost") and define its properties as required.
  3. Once you have finished, click Save and Close.

Create a client script

Next, create a client script in your Zoho CRM account.

  1. Navigate to Setup > Developer Hub > Client Script > +New Script.
  2. Provide a name for the script. For example: "Automate consulting estimates".
  3. Add a description (optional).
  4. In the Category Details section, do the following:
    1. Category - Choose Module.
    2. Page - Choose Create Page.
      You may also need to add the script for the Edit Page.
    3. Module - Choose Deals.
    4. Choose the layout. It can be Standard or any other custom layout of the deals module.
  5. In the Event Details section, do the following:
    1. Type - Choose Page Event.
    2. Event -  Choose onSave.
  6. Click Next.
    The Client Script IDE will open.
  7. Copy and paste the script provided below.
    You can customize the script, if needed.
  8. Click Save and Close to save the client script.

The code

Code Copied
var row_count = ZDK.Page.getField("No_of_Employees").getValue();
var row_list = [];
if(row_count>=1)
{
var noofEmployee = [5,10,15,25,45];
var consultingDays = [1,2,3,4,6];
var consultantAllocation = [1,1,2,2,3]; 
var estimatedCost = [1500,2500,3500,5000,7500]; 
for (i=0;i<noofEmployee.length;i++)
{
    if(row_count <=noofEmployee[i] )
    {
        var rowData = {};
        rowData["Consulting_Days"] = consultingDays[i]; 
        rowData["Consultant_Allocation"] = consultantAllocation[i]; 
        rowData["Estimated_Cost"] = estimatedCost[i]; 
        row_list.push(rowData); 
        break; 
    }
}
console.log("Row List : " , row_list); 
ZDK.Page.getForm().setValue({"Project_Estimate":row_list});
}

Notes

  • Customize the table data in arrays for each employee count range from your firm's actual rate card. (e.g., "var consultingDays", var consultantAllocation, etc.)
  • Make sure you update the script with the accurate API name of their corresponding fields (e.g., "No of Employees"). Learn more.
  • You may also need to include the script for the Edit and Clone pages to ensure that any updates to the employee count are estimated accurately.
  • The above script is a rule-based auto-calculation script that automatically populates values into a subform field based on employee count. You can use this client script code for any other module, such as Sales Orders or custom modules, by modifying the module name and parameters.

Tip

  • Configure and test the function in a sandbox to ensure that further development doesn't disrupt your production environment.

Test the solution

  1. Navigate to Deals > +Create Deal.
  2. On the Deal Details page, enter the required information, including the number of employees to be served.
  3. Click Save.
    The client script will be triggered.
  4. Check whether the required consulting days, number of consultants needed, and the estimated project cost have been updated correctly in their respective fields within the Project Estimate subform.

Did you find this useful? Try it out and let us know how it works. Share this with your team if they'd benefit from it! If you have questions, please don't hesitate to contact us.

More info

  • ModuleDeals
  • Trigger PointBrowser
  • EditionEnterprise and above
  • ComplexityMedium
  • Implementation Time30 minutes

Features used in the solution

Custom FieldClient ScriptSandbox
Story Image

Looking for a custom solution?

Contact us, we will help enhance your productivity at lightning speed.

SUBMIT REQUEST

Developers: Share your solution with our community!