Add note templates to lead records

Add a predefined note template to quickly enter customer information during sales calls with leads in your CRM.

When engaging with customers, you often need to ask standard questions to understand their needs better. Collecting such information lets you personalize your offerings, place potential clients in relevant campaigns, and set actionable reminders. For example, a property sales representative could have different templates for prospects. The questions you ask prospects vary depending on whether they require an individual home, apartment, or villa. What if you could create templates of the information collected and add them as notes to a record with just one click?

Our low-code tools can come in handy in this scenario. A custom button powered by a function can help you quickly add a template of the information collected as notes to the lead so that you can fill in the answers based on customer input. You can add multiple buttons to serve as many templates as you require.

Permissions and availability

  • Users with the Modules Customization permission can create custom buttons
  • Users with the Manage Extensibility permission can write custom functions.
  • Users with the Manage Sandbox permission can manage the sandbox.

Requirements

  • Create and link the button with the custom function, as detailed in the "Create a button" section below. Learn more
  • Test the function in a sandbox environment before deploying it to your production environment. Learn more

Create a button

  1. Navigate to Setup > Customization > Modules and Fields > Leads > Buttons > Create New Button.
  2. Provide a name for the button. For example: "Apartment Follow-up".
    Add a description (optional).
  3. Choose the layout(s) you want the button to be placed.
  4. Specify the button's placement as In Record and its position on the page as Details.
  5. Select the action to be performed as Writing Function.
  6. Provide a name and display name for the function, and click Create.
  7. On the Deluge script editor, do the following:
    1. Copy and paste the code provided below.
    2. Click Edit Arguments.
    3. Enter the name as leadId and set the value as Leads - Lead Id, then click Save.
    4. Save the function.
  8. Select the profiles that can view this custom button.
  9. Click Save.
Create Button

The code

Code Copied
//Enter the note template content
desc = "Property Required: Apartment"+ "\n" + "Buy, Rent or Lease:"+ "\n" +"Budget:"+ "\n" +"Preferred Floor: "+ "\n" +"Number of Bedrooms:"+ "\n" +"Parking requirements:";
//Map the note fields with lead fields 
notemap = Map();
notemap.put("Parent_Id",input.leadId);
notemap.put("Note_Content",desc);
notemap.put("Note_Title"," Property Details");
notemap.put("se_module","Leads");
notecreate = zoho.crm.create("Notes",notemap);
info notemap;
info notecreate;
//Enter success message displayed on adding note 
return "Note added successfully!";

Notes

  • Customize the note template you want to leave in the lead in the above code.
  • Make sure to use the accurate API names for their corresponding fields in the code snippet. Learn more
  • Any notes added through the custom function will appear under the name of the administrator because the system generates the API key using their ID.

Tip

  • You can add note templates to your contact records by making minor adjustments to the code snippet.

Test the solution

  1. Click the Leads tab.
  2. Open the lead record to which you want to add a note template.
  3. Click the custom button (i.e., Apartment Follow-up) you added via the above steps.
  4. Check whether the note template mentioned in the function was added to the lead record.

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

  • ModuleLeads
  • Trigger PointCustom Button
  • EditionEnterprise and above
  • ComplexityLow
  • Implementation Time15 minutes

Features used in the solution

Custom ButtonDeluge 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!