Rules and Notifications

The Rules and Notifications feature of the LeadSquared application allows you to automate user notifications based on lead events.  Notifications are sent to the user for the selected event types. The notifications can be sent through email. The data can be also sent using Webhooks.

Prerequisite

  • You should be an administrator or marketing user of the LeadSquared application.
  • Your LeadSquared plan should be either standard or above.

Accessing Rules and Notifications
To access the Rules and Notifications feature of LeadSquared:

The Rules and Notifications display grid consist of the following:

  • Name: Name of the rule which is already created.
  • Event: Type of event selected for the notifications to be sent.
  • Action Type: The type of action selected for the corresponding event type. The action type can be either ‘Send Email’ or ‘Call Webhook’.
  • Actions: Lists the available set of actions for the already created rule. The actions available depends on the status of the created rule. The following actions are available for a rule:
    • Enable: Allows to enable a rule which is in draft or disabled status.
    • Edit: Allows to edit a rule which is in draft or disabled status. Rules which are in enabled status cannot be edited.
    • Delete: Allows to delete a rule which is in draft or disabled status. Rules which are in enabled status cannot be deleted.
    • Disable: Allows to disable a rule which is in enabled status.
    • View History: Allows to view the event history of the rule up to the past 10 days. It displays the status history of the rule whether it is a success or failure.

Click Show only failures to view the failure history in the display pane.

  • View Summary: Allows to view the summary of the rule.

The legend of the Rules and Notifications grid displays the three status types of a rule. They are:

  • Enabled: A rule which is enabled.
  • Draft: A rule which is created, but not enabled.
  • Disabled due to failures: A rule is disabled, if the Webhook fails repeatedly for 10 times.

 

Creating A Rule

Step 1

  • Click Create on the top-right corner of the Rules and Notifications display grid. The Create Rule pop-up box is displayed.

  • Select the required event type from the Event drop-down list. The following event types are available:
    •  Lead Create: Sends notification after lead creation.
    •  Lead Update: Sends notification after leads are updated. Select the required attribute from the  Attribute drop-down list. The following lead update notifications are sent:
      • Lead Score Change: Notifications are sent only when the lead score exceeds the configured score. Example: Lead score change notification is sent to the user, if the lead score changes to 51 from the configured score of 50.
      • Lead Owner change: Notifications are sent, if the lead owner is changed to any owner or specific owner.
      • Lead Stage change: Notifications are sent, if the lead stage is changed to any stage or specific stage.
      • Any field change: Notifications are sent, if the value of the configured field changes.

 Note: Rules will not be triggered for bulk import of leads.

    • Lead Activity Creation: Sends notification when an activity is created by the lead or for the lead. Select the required activity type from the Activity drop-down list.
      For the below three activity types, you can add the web page or landing page for which the rule will be triggered for lead activity creation:
      • Form Submitted on Website
      • Conversion Button Clicked
      • Page Visited on Website

If the web page is not selected, then the rule will be triggered for all web pages or landing pages. Please see the below image for reference.

add webpage exception

    • Task Create: Sends notification for tasks that are created.
    • Task Reminder: Sends notification for task reminders.
    • Task Complete: Sends notifications when tasks are completed.
  • Select the required attribute or activity for the event type from the drop-down list. This selection is available for the Lead Update and Lead Activity Creation event types only. Please see the below two images for reference.

lead activity creation

 lead update drop-down

  • Click Set Conditions.

Step 2

Note: Please note that this is not a mandatory step.

Configure the conditions on which the rule must be triggered for the selected event type from step 1.

To do this:

  1. Click Configure Condition against Condition. The Select Criteria pop-up box appears.
  2. Select the search criteria from the drop-down lists and click Add.
  3. Select any of the following button from the Search for Leads that Match field:
    Any criteria – Select this, if the search matches any of the selected criteria.
    All Criteria – Select if you want the search to match all the selected criteria.
  4. Click Set Criteria.
  5. To add further conditions, click Update. To clear the conditions, click Clear.

update condition

  1. Click Provide Action Details.

Step 3

Click Add Actions to add more actions in this step.

  • Select the required action type from the Action drop-down list to determine the way in which the notifications are to be sent. The following action types are available:
    • Send Email
    • Create Task
    • Add To List
    • Update Lead Fields
    • Tag Lead
    • Star Lead
    • Unstar Lead
    • Call Webhook

The Execute After action allows you to specify the time period after which the selected action is executed. You can mention the time period in minute(s), hour(s) and day(s).

Note: You can create up to five action types from this step.

Note: Multiple rules cannot be created for the same event with the same action type. A warning message highlighted in the image below is shown if you try to create so.

If the action type is ‘Send Email’

  • Select this, if you want the notifications to be sent through email.
  • From the Action Type drop-down list, select Send Email.
  • Click Edit against Provide Email Content. The Provide Email Content pop-up is displayed.

email details

  • Complete the following details:
    • From: Enter the sender email address. This should be a valid email address of a LeadSquared user.
    • To: Enter the required recipient email address.

Note: For lead events, the recipient is the lead owner and for task notifications, the recipient is the task owner.

    • Subject: Enter the subject for the email notification.
    • Mail Merge Fields: Select the required lead attribute to add the required attribute to the email content.
    • Create Lead Link: Highlight the text in the email body to link the lead details and click Create Lead Link.
  • Click Test, if you want to send a test email to see if the email notification is working.

Note: Using Test email, mail merge will not function.

  • Click Save. You will be redirected to the Create Rule pop-up box.
  • Click Provide Additional Details. The Create Rule – Provide rule name and description box is displayed.

If the Action Type is ‘Create Task’

If selected, this action type allows you to add a task for the corresponding lead. This action type is only available, if the Event Type in Step 1 is a lead related event. To do this:

  • From the Action Type drop-down list, select Create Task.
  • Click Edit against Provide Task Configuration.  The Create Follow-Up Task pop-up box appears.

Note: You can change the Lead Owner to any user in the LeadSquared system.

The schedule field allows you to schedule the task after the Rule Execution Time (the time period when the rule is executed). The task is sent after the time period you specify in minute(s), hour(s) or day(s).

It also allows you to schedule the task, before or after a custom date value. The task is sent before or after the time period you specify.

create-follow-up-task2

If the Action Type is ‘Add To List’

If selected, this action type allows you to add the lead to a list.  You can also create a list while providing the list configuration. To do this:

  • From the Action Type drop-down list, select Add To List.
  • Click Edit against Provide List Configuration. The Provide List Configuration pop-up box appears.

provide list config

  • From the List Name drop-down list, select <Create new list>, if you want to create a new list and set the configuration. Else, select the required list available from the drop-down list.
  • Click Save.

If the action type is ‘Update Lead Fields’

This action type allows you to update lead field values of the required lead fields. The field values are updated when the rule is executed.

Example: If the Lead Field ‘City’ is given the value New York, ‘City’ is updated with this value when the rule is executed.

  • From the Action Type drop-down list, select Update Lead Fields.
  • Click Edit against Provide Lead Update Configuration. The Provide Update Lead Fields Configuration pop-up box appears.

  • Select the required lead field and specify the lead field value. Click Save.

Note: You can create up to five lead field update actions from this pop-up box.

If the action type is ‘ Tag Lead’

If selected, this action type allows to add a tag to the corresponding lead. To do this:

  • From the Action Type drop-down list, select Tag Lead.
  • Click Edit against Provide Tag Configuration. The Provide Tag Lead Configuration pop-up box appears.

provide tag configuration

  • Add the required lead tags here and click Save.

Note: You can add mail-merge fields as tags here. This allows you to pass values captured from an event and pass them to the tag.

mail-merge-tags

mail-merge-tags2

If the action type is ‘Star Lead’

If selected, this action type allows you to mark the lead with a star to highlight and discover them easily.  For more information on marking your lead with star, refer to Star’ your Leads.

To do this:

  • From the Action Type drop-down list, select Star Lead.

If the action type is ‘Unstar Lead’

If selected, this action type allows you to unmark the lead with a star. To do this:

  • From the Action Type drop-down list, select Unstar Lead.

If the action type is ‘Call Webhook’

Select this, if you want to send the data through webhooks.

Note: Webhooks are HTTP or HTTPS callback requests sent to a URL of your choice in response to some event   occurring. They offer simple and effective, server to server communication without long running connections. For more information on Webhooks, refer to Webhooks.

  • From the Action Type drop-down list, select Call Webhook.
  • Click Edit against Provide Webhook Configuration. The Provide Webhook Configuration pop-up appears.

Provide Webhook Configuration

  • Enter the webhook URL in the URL field and click Verify.
  • Select the required webhook content type from the Content Type drop-down list.
  • Click Save.

Note: You can add mail-merge lead fields to the webhook URL. This allows you to pass values captured from an event and pass them to the Webhook URL.

A sample Webhook URL with Mail-Merge tags is given below:

https://run.leadsquared.com/?LeadAge=@{Lead:LeadAge , }&LeadID=@{Lead:mx_Lead_ID , }

Step 4

  • Complete the following details:
    • Name: Enter the required rule name.
    • Description: Enter the required rule details. This is not a mandatory field.
  • Click Save, if you want to save the rule in draft status. Rules saved in draft status should be enabled from the Rules and Notifications display grid.
  • Click Save and Enable to save and enable the rule.

Additonal details window