Add pre-defined notes to records.

Every bit of information shared by prospects in a sales call gets you closer to making the sale. Keeping a track of these information not only helps you pick up from where you left off for subsequent calls, but also helps tailor your offering by putting the prospects in appropriate campaigns, set actionable reminders and so on. These details are then added to your CRM system either as a note or as a field update.

Depending upon the nature of your business, you might ask some standard questions in all your sales calls. How convenient would it be if you could create templates of the information to be gathered and add them as a note to a record at the click of a button.

For instance, let's assume you are a salesperson selling properties. The questions you ask your prospects might vary depending on whether the customer requires an individual home, or an apartment, or a villa. Add these questions easily as a note on the record concerned using this function. You can also have multiple note templates based on the prospect category. When you determine that the prospect wants an apartment, click the button which has the specified questionnaire. The pre-defined note gets added to the record, and you just have to fill in the answers based on inputs from the customer.

Getting started with the function:

  1. Go to Setup > Customization > Modules > Deals > Links and buttons > Create new button.
  2. Provide a name for the button. For example: "Create Quote from deal". Add a description(optional).
  3. Select the placement of the button as View page.
  4. Select the action to be performed as "Writing function".
  5. Copy the code given below.
  6. Click "Edit arguments".
  7. Enter the name as "leadId" and select the value as "Lead Id".
  8. Click Save & Execute Script.
  9. Save the changes.
  10. Select the profiles who can view this button.
  11. Click Save.

 

The Code: For V1 API - Old Editor:

desc = "Customer house requirement: Apartment"+ "\n" + "Buy or Rent:"+ "\n" +"Budget:"+ "\n" +"Floor preferred: "+ "\n" +"Number of bedrooms preferred:"+ "\n" +"Parking requirements:";
notemap = map();
notemap.put("entityId", input.leadId);
notemap.put("Note Content",desc);
notecreate = zoho.crm._create("Notes", notemap);
return "Notes added Successfully";

The Code: For V2 API - DRE Editor:

desc = "Customer house requirement: Apartment"+ "\n" + "Buy or Rent:"+ "\n" +"Budget:"+ "\n" +"Floor preferred: "+ "\n" +"Number of bedrooms preferred:"+ "\n" +"Parking requirements:";
notemap = Map();
notemap.put("Parent_Id",input.leadId);
notemap.put("Note_Content",desc);
notemap.put("se_module","Leads");
notecreate = zoho.crm.create("Notes",notemap);
info notemap;
info notecreate;
return "Notes added Successfully";

Note:

  • The code is zoho.crm._getRecordById for Version 1.0 of.
  • This function is useful as many templates can be stored and there are no limits on the number of custom buttons you can create. Furthermore, you might want to try adding the notes record to all modules.Change the ID of the record from 'leadId' to the intended module record ID name and update the code accordingly.

Found this useful? Try it out and let me know how it works! If you have questions, do not hesitate to ask! Share this with your team if you find it useful!

Return to Tips