Sales Signal in Zoho Vertical Studio | Vertical Studio Help Guide

Sales Signal

Custom Sales Signals in Vertical Studio are real-time notifications designed to help the subscribers of your application stay updated about their important customer interactions and activities. It enables you to seamlessly connect your applications with third-party applications, allowing notifications to flow into your application.

The support can be significantly useful in the following scenarios:

  • Notify sales reps when a high-priority lead visits the pricing page of a website.

  • Alert support teams when a new ticket is raised in an integrated help desk application.

  • Inform account managers when a key customer’s subscription is about to expire.

Creating a custom sales signal involves two key steps: defining the signal and raising the signal. Here's a step-by-step guide to help you through the process.

Defining a Signal 

The first step is to create a Signal in the developer console of the Vertical Studio.

  1. Log into your application and navigate to Build > Automate > Signals on your left menu.

  2. In the Signals configuration page, click Define Signal.

  3. Provide the following details to define the Signal.

    • Signal Name  - Name of your custom sales signal.

    • Namespace - The unique namespace that is used to address the signal in any custom function.

    • Icon - Favicon that will be shown along with the notification in your application.

  1. Click Save.

Raising a Signal 

Raising a signal involves generating notifications about important events or actions. Raising signals can be categorized into two types:

  • Signals for Actions Within the Vertical Application: These are triggered by events of activities or workflows occurring within the application itself.

  • Signals from Third-Party Applications: These are generated by external systems and integrated into the vertical application as notifications.

 Events within the Vertical Application 

To raise a signal for events within the application, you can create and run a Deluge function.

Following is a sample function code to raise a signal whenever a deal remains in the Qualification stage for 10 days.

resp = zoho.crm.getRecords("Deals");
for each usersVal in resp
{
  id = usersVal.get("id");
  time = (usersVal.get("Modified_Time")).toTime();
  stage = usersVal.get("Stage");
  NumberofDaysinQualification = 10;
  NumberofDays = days360(time,zoho.currentdate);
  if ((stage == "Qualification") && (NumberofDays.toLong() > NumberofDaysinQualification))
  {
    flag = 1;
  }
  if (flag == 1)
  {
    signalMap = map();
    signalMap.put("signal_namespace", "<signal_namespace>");
    signalMap.put("email", "<email_present_in_either_lead's_or_contact's_record>");
    signalMap.put("subject", "Alert for Deal Stuck in Quialification Stage");
    signalMap.put("message", "Your Deal is Stuck. Please look into it. Thanks !");
    actionsList = List();
    actionMap = map();
    actionMap.put("type", "link");
    actionMap.put("display_name", "View Potential");
    actionMap.put("url", "/crm/EntityInfo.do?module=Potentials&id=" + id);
    actionsList.add(actionMap);
    signalMap.put("actions", actionsList);
    result = zoho.crm.invokeConnector("raisesignal", signalMap);
    info result;
   }
}

Whenever this signal is raised, subscribers will receive a notification in the application as shown below.

 

Events from Third-party Applications 

Integrating your application with third-party applications requires timely updates about changes or events occurring in the third-party service. This can be accomplished by setting-up custom signals.  

To raise a signal from the third-party application,

1. Create a Stand-Alone Function: Define a stand-alone function in the developer console (Build > Automate > Functions) and enable it to be invoked via REST API.

2. Provide the REST API URL: Share the function’s REST API URL with the third-party application.

Configure the third-party application to post notifications to the provided REST API URL.

3. Process Notifications: The stand-alone function should process the posted notifications and list them as signals in the subscriber’s organization.

Here is a sample code for raising a signal whenever a survey has been completed in the Survey Monkey. 

survey_id=input.requestParamMap.get("survey_id");
response_id=input.requestContentStr.getJSON("object_id");
map={ "survey_id" : survey_id, "response_id" : response_id };
response = zoho.crm.invokeConnector(("surveymonkey.surveymonkeyconnector.getsurveyresponsedetails"),map);
responseObj=response.toString().getJSON("response");
EMAIL=responseObj.getJSON("metadata").getJSON("contact").getJSON("email").getJSON("value");
SUBJECT="Survey Monkey Responded";
MESSAGE="Response from survey monkey";
DETAIL_VIEW_LINK_NAME="View Survey Response";
DETAIL_VIEW_LINK_URL=responseObj.getJSON("analyze_url");
map={ "email" : EMAIL, "subject" : SUBJECT, "message" : MESSAGE, "preview_link_name" : DETAIL_VIEW_LINK_NAME, "preview_link_url" : DETAIL_VIEW_LINK_URL };
return map.toString();

Ensure to add the REST API URL of this function in Survey Monkey.

Packaged Signals 

Packaged Signals are configured in the developer console and deployed to subscriber organizations during signup or through upgrades. Any Signal that is configured in the developer console will be included in the next version of the application.

To know more about packaging, please refer to our guide on Components Packaging in Zoho Vertical Studio.

The following table explains the upgrade behavior of an existing packaged signal that is already deployed in the subscriber's organization.


Property
Upgrade Type
Modify Access
Signal Name
Upgradable
Developer Only
Namespace
Non-Upgradable
Non-Editable
Favicon
Upgradable
Developer Only
Function Code
Upgradable
Developer Only

Changes and Impacts 

When a packaged Signal is modified, published, and pushed as an upgrade to the subscribers' accounts, the impacts to the associated notification flow in the subscriber organization are explained below.

1. Editing a Signal 

  • Changing the signal name or favicon alters how the notification appears in the subscriber's organization interface.
  • Updating the function code can impact the details of the notifications displayed in the subscriber's organization.

2. Deleting a Signal 

Deleting a signal disrupts the notification flow, meaning subscribers will no longer receive notifications associated with that signal in their organization.

WarningCaution!

Deleting a Signal is a destructive change. It can have lasting effects on your subscriber data and configurations. Please consider the consequences carefully before proceeding, and only move forward if absolutely necessary.