View contact info in call records

View contextual contact information, such as their edition details, within the scheduled call records in your CRM.

If your business offers multiple product editions, accessing a contact's edition details in their call and meeting records is important before initiating a conversation. Understanding which editions your customers have purchased is vital for tailoring discussions to meet their unique needs. When customers realize that you are aware of their purchase history and current situation, they feel valued, which enhances their overall experience.

However, a quick glance at your CRM's call or meeting records reveals that this crucial information is currently unavailable. While you can display them in a custom field on the records, you must manually enter them from their associated contact. This is when our low-code tools can come in handy.

To view edition-related contextual information on the call details page, you can create a custom function and connect it to a workflow rule. Once done, you can view the edition information of the contacts on their related calls and meeting records. Read on to learn more.

Permissions and availability

  • Users with the Modules Customization permission can add custom fields.
  • Users with the Manage Automation permission can create and update workflow rules.
  • Users with the Manage Extensibility permission can create custom functions.
  • Users with the Manage Sandbox permission can manage the sandbox.

Requirements

  • Add a custom picklist field named "Product Edition" in the Calls module. This is where the function will update the edition purchased by the contact. Learn more
  • Create a workflow rule for the Calls module that triggers every time a scheduled call is created or modified. Learn more
  • Write a custom Deluge function and link it up with the workflow rule. Learn more
  • Test the workflow rule in a sandbox before deploying it to your production environment. Learn more

Add a custom field

The first step is adding the custom picklist field to the Calls module.

  1. Navigate to Setup > Customization > Modules and Fields.
  2. Click the Calls module to open the layout editor.
  3. Drag and drop the Picklist field from the New Fields tray to the desired section of the layout.
  4. Name the pick list field (e.g. "Product Edition") and define its properties as required.
  5. Once you have finished, select Done, then click Save and Close.
Add Custom Field

Create a workflow rule

Follow the below steps to create a workflow rule that triggers every time a scheduled call is created or modified.

  1. Navigate to Setup > Workflow Rules > +Create Rule.
  2. Select Calls from the module dropdown list.
  3. Provide a name for the rule. For example: "Update product edition from contact". 
  4. Add a description (optional) and then click Next.
  5. In the Execute this workflow rule based on section, choose Record Action, specify Scheduled call is created or modified from the dropdown, then click Next.

    Note: You can also execute this rule when an outgoing call is logged or modified, although this may be less useful.
  6. In the Which calls would you like to apply the rule to? section, click Next.
  7. Under Instant Actions, select Function and Write your own.
  8. Provide a name and description, if necessary, for the function.
  9. On the Deluge Script Editor, do the following:
    1. Copy and paste the code given below.
    2. Click Edit Arguments.
    3. Choose Calls - Call Id, name it callId, then click Save.
    4. Click Save & Execute script.
  10. Click Save on the workflow rule page.

The code

Code Copied
call = zoho.crm.getRecordById("Calls",callId);
contactId = ifnull(call.get("Who_Id"),"").get("id");
info contactId;
contactDetails = zoho.crm.getRecordById("Contacts",contactId);
info contactDetails;
if(contactDetails != null)
{
	sptype = ifnull(contactDetails.get("Product_Edition"),"");
	mp = Map();
	mp.put("Product_Edition",sptype);
	upd = zoho.crm.updateRecord("Calls",callId,mp);
	info upd;
}

Notes

  • Make sure to use the accurate API names for their corresponding fields in the code snippet (e.g., "Product Edition"). Learn more
  • You can view additional contact-related information by including their field parameters in the code snippet.
  • The above script is an example of viewing the contact's edition details in their scheduled calls. You can customize this code to view details for any other module by modifying the module, field names, and other 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 Calls > Create Call > Schedule a call.
  2. In the Schedule a call pop-up window, look up and choose the appropriate contact and account in the Call To and Related To fields, then click Schedule.
    The workflow rule will be triggered.
  3. Check whether the scheduled call has its Product Edition field updated with the appropriate value from the associated contact.

Viewing contact info in meetings

Use this code snippet to view contextual contact information within meeting records.

Code Copied
event = zoho.crm.getRecordById("Events",eventId);
contactId = ifnull(event.get("Who_Id"), "").get("id");
contactDetails = zoho.crm.getRecordById("Contacts", contactId);
    if (contactDetails != null) 
{
        sptype = ifnull(contactDetails.get("Product_Edition"), "");
        mp.put("Product_Edition", sptype);
        upd = zoho.crm.updateRecord("Events",eventId,mp);
        info upd;
} 

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

  • ModuleCalls
  • Trigger PointWorkflow Rule
  • EditionEnterprise and above
  • ComplexityMedium
  • Implementation Time30 minutes

Features used in the solution

Custom FieldWorkflow RuleDeluge 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!