Create Rulesets

1. Feature Overview

Rulesets are the fundamental building blocks of the LeadSquared Ace feature. They enable organizations to define and measure a variety of sales performance metrics for Goals, Incentives, and Leaderboards.

Before you create a Ruleset, identify –

  • What you want to measure (the performance metric – sales revenue, new leads added, etc.)
  • How you want to measure it (by aggregating lead data, activity data, opportunity data, etc.)
  • When you want to measure it (when a new lead is created and the lead stage is ‘Customer’, when a sales activity is posted and its status is ‘Won’, etc.)
  • Against whom do you want to measure it (the user working on, and achieving the goal)

Identifying this information at a high level makes it easy to navigate the more granular configurations required when creating a Ruleset.

Note: Only LeadSquared Admins can create Rulesets. Once created by the admin, managers across the organization can use the Rulesets to create and track goals, incentives, and leaderboards specific to their own teams.

Achievement Breakdown rulesets


2. Example Use Cases

Rulesets give you the flexibility to set and track various sales performance metrics –

AchievementExample Ruleset Configuration
Revenue – Track revenue targets and achievements across teams, over daily, weekly and monthly cycles.Goal Template Documentation
Lead/Customer Acquisition – Monitor lead generation and customer acquisition metrics, or track customized achievements for stage transitions across your sales pipelines.Goal Template Documentation
Call Centre Performance – Stay on top of your telephony performance by tracking key call center metrics and KPIs (talk-time, call volume, etc.).Goal Template Documentation


3. Prerequisites

  • LeadSquared Goals, Incentives, and Leaderboards are a paid feature. To enable it on your LeadSquared account, contact your account manager or
  • You must enable the audit log feature for your account. Please contact your account manager or write to us at to get it enabled for your account.
  • You must set up your organizational structure using LeadSquared’s Organization Hierarchy feature.
  • You must be an Administrator user to create Rulesets.
  • If you’re using any Custom Activity or Sales Activity to calculate, ensure Log Activity Changes is enabled.


4. Components of a Ruleset

4.1 Ruleset Type

You can create 2 types of Rulesets – Sticky or Non-Sticky. Each caters to a specific type of use case. To learn how to choose the ruleset type adequate to your use case, see Sticky vs. Non-Sticky Rulesets.

4.2 Achievement Breakdown

The Achievement Breakdown lets you drill down and visualize the contributing data points that lead to the achievement of a Goal or an Incentive program.

4.3 Rules

Rulesets are comprised of Rules. You can add one or more rules to a Ruleset.

A rule consists of –

  1. The LeadSquared Entity (e.g., lead, activity, opportunity, etc.) and the Rule Trigger (lead created, activity updated, etc.).
  2. The Aggregate Function (e.g., Count, Distinct Count, Sum) and Aggregate Field (e.g., Prospect Id field of Lead, Order Value field of Sales Activity, Deal Size field of Opportunity).
    This determines how the achievement will be calculated. For example, to measure sales revenue, you can sum the order value field of all sales activities. To measure new leads added, you can count the prospect Id field for all new leads (prospects).
  3. The User Attribution Field. This field determines which LeadSquared user the achievement is attributed to (e.g, lead owner, lead created by, sales owner, opportunity owner, etc.).
  4. The Date Attribution Field. This field determines the date on which the achievement is attributed to the user (created on, modified on, sales date, etc.).
  5. The Conditions
    • Additional rules for attributing the achievement to a user (lead stage is customer, lead city is Bangalore, etc.).

Throughout this article, we use the example of a ‘Revenue Targets’ Ruleset, where we sum (add) the ‘order value’ field of all sales activities and obtain the revenue contribution of each user –

Goal Template Documentation


5. Create a Ruleset

  1. From the main menu, navigate to ACE.
  2. Click LeadSquared ACE.
  3. Enter a name and description, then click Create.

LeadSquared Goals


6. Choose the Ruleset Type

Sticky On and Sticky Off determine how achievements are attributed to your users. To learn more see, Sticky vs. Non-Sticky Rulesets.

LeadSquared ACE


7. Achievement Breakdown

To enable Achievement Breakdown, click on the toggle achievement breakdown enable. This functionality will let you drill down and visualize the contributing data points that lead to the achievement.

achievement breakdown enable


8. Set Rules

8.1 Select the Entity and the Rule Trigger-

  1. Click add first rule.
  2. On the Add Rule pop-up, enter a Rule Name.
  3. Select the entity (Lead or Activity)
  4. Select the trigger
    • For Lead, you can trigger the rule when
      • A lead is created or updated
    • For Activity, you can trigger the rule when
      • An activity is posted on a lead
      • An activity is posted on an opportunity
      • An activity is posted on an existing activity (for more info, see Post Activities on Activities)
    • If you select Activity, choose the Activity Type.
  5. Click Next.

We selected the Activity entity, the Activity on Lead action or rule trigger, and we specified the activity type as Sales Activity. Our rule will trigger whenever a user posts a sales activity on a lead.

add rule entity


8.2 Select the Aggregate Function and Field

Select either Count, Distinct Count or Sum.
In the next step, you’ll specify an Aggregate field (Prospect Id, Opportunity Id, Deal Value, etc.). The aggregate function will be performed on this field to calculate the achievement.

FunctionDescriptionSupported Data TypesExamples 
Counts the number of aggregation fields (of the lead/activity/opportunity), to calculate the achieved  value.
All Data Types
  • Count of leads
  • Count of phone calls
  • Count of meetings
  • Count of product demos
Distinct Count
Counts only distinct aggregate field values.
All Data Types
  • Count of unique leads called
  • Number of unique sales activities created on a lead
Adds all the values of the summable aggregation field.
  • Sum of order value
  • Sum of invoice amount
  • Sum of gross income

Next, search for, and select the Aggregation Field. This is the field on which the aggregation function (count or sum) will be performed.

  • The Count and Distinct Count functions work on fields of any data type.
  • The Sum function works only on number-type fields.

Continuing our ‘Revenue Targets’ example, we chose the SUM function and the Order Value field of the sales activity.

Goal Template Documentation

Note: Ensure you choose the appropriate aggregate function and field. Depending on your account setup, you may store the value of product/service sales in multiple fields (order estimated value, order value, total invoice amount, etc.). Selecting the appropriate field here ensures that the revenue is calculated correctly.


8.3 Select the User Field

Specify the user the achievement will be attributed to.

  1. Click Select User Identification field.
  2. Select the user type field.

LeadSquared goals templates

Note: Ensure you select the appropriate user field. Depending on your account setup, you may have different lead owners, activity owners, sales owners, opportunity owners, etc. You want to attribute the achievements to the user who deserves the credit.


8.4 Select the Date Field

Specify the date on which the achievement will be attributed to the user.

  1. Click Select Date Identification field.
  2. Select the date field.
  3. Click Continue.

LeadSquared goals templates

Note: Ensure you select the appropriate date field. For instance, depending on your process, users might create a sales activity on a certain date (activity ‘Created On’ field, e.g., 10th Jan) but actually make the sale on a different date (‘Sales Date’ field, e.g., 12th Feb). Selecting the correct date ensures the achievement is attributed to the user in the correct cycle.

In our  ‘Revenue Targets’ example, for the Aggregation field, we chose Order Value under Sales Activity. For the User field, we selected Sales Owner under Sales Activity, and, for the Date field we picked Sales Date.


8.5 Set Conditions –

Set conditions that have to be fulfilled for the rule to trigger. This step is optional. To publish the Ruleset without adding conditions, click Publish.

  1. Click Add Condition.
  2. From the right panel, use the dropdowns to set a condition.
  3. After the condition is configured, click Add.
  4. To add multiple conditions, click LeadSquared Goals.
  5. In the criteria pattern box below, click Edit Pattern to change the logical operator (And/Or) between the conditions.
    • Type in the new pattern and click Update.
    • You can also create condition groups using parenthesis (). For example, (1 AND 2) OR (3 AND 4).
  6. Once you’re done, click Save Rule.

Here, we’re setting a condition to ensure that achievements are only attributed to users when –

  • The lead stage is ‘Customer’
  • The country is ‘India’

Goal Template Documentation

You can set up more complex conditions using combinations of both AND and OR operators. For example, let’s say you want to apply the following conditions to your rule –

  • The lead must come through a specific marketing channel/campaign

    • The lead must be interested in a Data Science course
    • The lead must be interested in a Business Analytics course

The rule can be set up as (1 AND (2 OR 3)).

Note: While editing a condition pattern, the only permitted characters are curly braces (), numbers 1,2,3,4 etc., and AND, OR operators. You can’t re-use a number twice, for example, (1 AND (1 OR 2)) is incorrect and triggers an error.

Goal Template Documentation


8.6 Add Multiple Rules

You can add multiple rules to a Ruleset.

For instance, if you’re creating a Ruleset to measure total phone call duration, you can create one rule to measure duration for inbound phone call activities and another for outbound phone call activities. Both rules will be added together to calculate the achievement (duration of inbound phone calls + duration of outbound phone calls).

To add more rules, click Add more rules.


  • The aggregate function applies to all Rules within a Ruleset. You can’t create one rule using the Count function and another rule using the Sum function, in the same Ruleset.
  • Rules are always added together to calculate the total achievement. In the example below, if there are 5 inbound call activities and 5 outbound call activities for a particular user, the total achievement will be 10 phone calls (5 inbound + 5 outbound).

add more rules full

Here’s an example of multiple rules for a revenue calculation Ruleset. The first rule triggers when an activity form is submitted, and the second when a follow-up activity is posted on a lead –

Goal Template Documentation


9. Custom Ruleset

With Custom Rulesets, you have the flexibility to create tailored Rulesets that address complex use cases, meeting the specific needs of an enterprise.


Example Usecase

let’s consider the following use case –

An enterprise needs to calculate the lead conversion % of its users based on the leads that have been assigned to them.

(Leads converted / Leads assigned) * 100

The steps below will demonstrate how to achieve this calculation through custom Rulesets.

Creating Custom Rulesets

Start by creating two rules –

Leads Assigned – Calculates leads created and assigned to a user.

Leads Converted – Calculates the number of sales made by a user. There is an additional condition in this formula where once a sale is made, the lead’s stage must change to Customer.

2 rules

Click the Switch to Custom Formula button.

switch to custom

On the Formula Builder, you have the option to create a custom formula using Rules, numbers, mathematical operators, and parenthesis.

For our example, we will create the following formula –

(Leads converted / Leads assigned) * 100

Then, click Done and Publish Ruleset.

custom ruleset


10. Publish, Unpublish, and Delete a Ruleset

Rulesets can be in one of four statuses – Draft, Published, Unpublished, and Deleted.

Note: Only published Rulesets can be used by sales managers and representatives to create goals, incentives, and leaderboards.


10.1 Publish a Ruleset

When you publish a Ruleset, it appears in the create goals, incentives, and leaderboards form, and managers can use the Ruleset to create and assign them to their teams.
Click Publish RuleSet. On the confirmation pop-up, click Yes.

LeadSquared ACE


10.2 Edit a Ruleset

You can edit a Ruleset and change the rules at any time (draft, published, or unpublished).

When you edit and update a published Ruleset with Live Goals, Incentive Program, and Leaderboards* associated with it, they will be automatically updated –

  • All previous data will be updated based on your changes.
  • The achievement calculation for the upcoming cycles will also reflect your changes.
  • You can’t roll back or revert to a previous version of the Ruleset.

*Any status other than draft and unpublished (i.e., Yet to Start, In Progress, Completed).

LeadSquared ACE


10.3 Unpublish a Ruleset

Unpublish a Ruleset when you don’t want managers to use it to create future Goals, Incentives, and Leaderboards. When a Ruleset is unpublished it no longer appears in the create Goals, Incentives, and Leaderboard form.

The Goals, Incentive Program, and Leaderboards that are already using the Ruleset will freeze –

  • The achievement calculation for them will stop – achievements for subsequent cycles won’t be calculated.
  • Previous data will still be visible.

LeadSquared ACE


10.4 Re-publish a Ruleset

An unpublished Ruleset can be published again. If you change any Rules or settings before re-publishing the Ruleset –

  • All previous data for the Goal, Incentive Program, and Leaderboards will be updated based on your changes.
  • The achievement calculation for the upcoming cycles will also reflect your changes.
  • You can’t roll back or revert to a previous version of the Ruleset.

LeadSquared ACE


10.5 Delete a Ruleset

To delete a Ruleset, on the top right corner of the page,  click Goals Templates.

Note that only Rulesets that have draft goals associated with them can be deleted. If even a single goal associated with the Ruleset is not in the draft status (published, unpublished, completed, etc.), you can’t delete the Ruleset.

LeadSquared ACE


11. Manage Rulesets

All Rulesets are visible to admins on the Rulesets tab of the Ace page. Click a Ruleset name to view and edit the Ruleset configurations or create a new Ruleset.
Use the Status and Aggregate Function filters to Rulesets or use the search bar on the right side of the page. The number of live goals associated with a Ruleset is also visible on the grid.

Goal Template Documentation


Next Steps

Once you’ve published Rulesets, create and assign Goals to your teams.

Was this Helpful?

Notify of
Inline Feedbacks
View all comments