SIERA Report Builder – Data Sources

1. Feature Overview

To create a report using the SIERA Report Builder, admins must first select a data source. SIERA stores data separately in multiple tables, which offer the following features –

  • Designed for superior performance during report generation.
  • Simplify reporting by joining multiple tables in LeadSquared to create a mega-table, streamlining the report creation process.
  • Eliminate the need for users to concern themselves with joins, schemas, and table details, allowing for a simple drag-and-drop approach to report creation.

It’s crucial to understand the different data sources as they determine the fields that will be present in the Report Builder.

 

2. Prerequisites

SIERA is a paid feature. To enable it for your account, contact your account manager or support@leadsquared.com.

 

3. SIERA Data Sources

SIERA Reports has 6 major Data Sources –

  • Lead Data Source
    • Lead (with Lead Owner)
    • Lead (with Lead Created By)
  • Activity Data Source
    • All Activities (with Lead Owner)
    • All Activities (with Activity Creator)
  • Opportunity Data Source
    • All Opportunities (with Lead Owner)
    • All Opportunities (with Opportunity Owner)
  • Task Data Source
    • All Tasks (with Lead Owner)
    • All Tasks (with Task Owner)
  • Phone Call Data Source
    • Phone Calls (with Activity Creator)
  • Revenue Data Source
    • Revenue (with Sales Owner)

These data sources contain lead fields (custom and standard) and fields from Activities, Opportunities, and Tasks (only the standard fields) respectively. Additionally, custom data sources can be requested for specific Activities, Opportunities, and Tasks.

3.1 User Types

The user type is a metafield (Learn more on how SIERA handles metafield).

To help users map the user IDs in the report, SIERA provides ready-made templates mapped to different user types. For example, to enable users to create reports on Lead Data Sources, SIERA has 2 templates – Leads with Lead Owners and Leads with Lead Created By.

3.2 Predefined Metrics

Each template also comes with its own predefined metric. For example, lead templates come with metrics like the Number of Leads, Number of Converted Leads, etc., While users have access to create their own metrics, pre-defined metrics are a quick way of creating reports.

3.3 Example flow

Here’s an example workflow that shows how data flows in the data sources –

 

 

4. Lead Data Source

This data source contains all the lead data in your LeadSquared system. The lead along with all standard and custom lead fields (dropdown, text, date, and number type) are stored in the data source, pre-joined, and ready to be processed.

Lead data source 1

Lead Data source 2

Lead Data Source Predefined Metrics

Metric NameLogicExpression
# LeadsThis gives a count of leads
Count(`Lead.ProspectID`)
# Converted LeadsThis gives a count of leads where the stage is the final stage as per LSQ settings
CountIf(`Lead.ProspectStage` = Config('TenantSettings', 'LeadStages.Final'))
Converted Leads %This is the ratio of # Converted Leads and # Leads expressed in %(CountIf(`Lead.ProspectStage` in Config('TenantSettings', 'LeadStages.Final'))/Count(`Lead.ProspectID`))*100

 

5. Opportunity Data Source

This data source contains all Opportunities data in your LeadSquared system. All Opportunities created in your system, along with all standard Opportunity fields, enriched with their corresponding lead fields (from the Lead Data Source) will be stored in this data source.

opportunity data source 1

opportunity data source 2

Opportunity Data Source Predefined Metrics

Metric NameLogicExpression
Total OpportunitiesThis gives a count of opportunities
Count(`Opportunity.ProspectActivityId`)
# Leads with OpportunitiesThis gives a count of leads in the opportunity data source. This will be total leads that have opportunities created on them. This will not be equal to the total leads in the system as leads with no opportunity will be missing.
CountDistinct(`Lead.ProspectID`)
Lost OpportunitiesThis gives a count of opportunities where the opportunity status is Lost
CountIf(`Opportunity.Status` = 'Lost')
Lost Opportunities %This is the ratio of Lost Opportunities and Total Opportunities expressed in %
(CountIf(`Opportunity.Status` = 'Lost')/Count(`Opportunity.ProspectActivityId`))*100
Open OpportunitiesThis gives a count of opportunities where the opportunity status is Open
CountIf(`Opportunity.Status` = 'Open')
Open Opportunities %This is the ratio of Open Opportunities and Total Opportunities expressed in %
(CountIf(`Opportunity.Status` = 'Open')/Count(`Opportunity.ProspectActivityId`))*100
Won OpportunitiesThis gives a count of opportunities where the opportunity status is Won
CountIf(`Opportunity.Status` = 'Won')
Won Opportunities %This is the ratio of Won Opportunities and Total Opportunities expressed in %(CountIf(`Opportunity.Status` = 'Won')/Count(`Opportunity.ProspectActivityId`))*100

 

6. Activity Data Source

This data source contains all Activity data in your LeadSquared system. All activities performed in your system, along with all standard activity fields, enriched with their corresponding Lead fields (from the Lead Data Source) and Opportunity Fields (from the Lead Opportunity Source) will be stored in this data source.

activity data source 1

activity data source 2

Activity Data Source Predefined Metrics

Metric NameLogicExpression
# ActivitiesThis gives a count of activities
Count(`Activity.ProspectActivityId`)
# Leads with ActivitiesThis gives a count of leads in the activity data source. This will be total leads that have activities created on them. This will not be equal to the total leads in the system as leads with no activity will be missingCountDistinct(`Lead.ProspectID`)

 

7. Task Data Source

This data source contains all Tasks data in your LSQ system. All activities performed in your system, along with all standard tasks fields, enriched with their corresponding Lead fields (from the Lead Data Source) and Opportunity Fields (from the Lead Opportunity Source) will be stored in this data source.

Task data source 1

Task Data Source Predefined Metrics

Metric NameLogicExpression
Total Tasks CountThis gives a total count of tasksCount(`Task.UserTaskId`)
Pending Tasks CountPending tasks are tasks that are yet to be completed and have not crossed their due date. StatusCode = 0 means the task is still incomplete. Along with this, we need to check the due date of the task is after today’s dateCountDistinctIf(`Task.UserTaskId`, `Task.StatusCode` = 0 and (`Task.EndDate` ≥ CurrentDateTime or `Task.DueDate` ≥ CurrentDateTime))
Overdue Tasks CountOverdue tasks are tasks that are yet to be completed and have crossed their due date. StatusCode = 0 means the task is still incomplete. Along with this, we need to check the due date of the task is before today’s dateCountDistinctIf(`Task.UserTaskId`, `Task.StatusCode` = 0 and (`Task.EndDate` < CurrentDateTime or `Task.DueDate`< CurrentDateTime))
Completed Tasks CountCompleted tasks are tasks that have been marked as complete. StatusCode = 1 means the task is still marked as complete.CountDistinctIf(`Task.UserTaskId`, `Task.StatusCode` = 1 )
Completed Tasks Today CountCompleted tasks are tasks that have been marked as complete. StatusCode = 1 means the task is still marked as complete. To get Tasks completed today, we need to check if the completed date of a task is equal to today’s dateCountDistinctIf(`Task.UserTaskId`, `Task.StatusCode` = 1 and ToDate(`Task.CompletedOn`) = ToDate(CurrentDateTime))
Due Tasks Today CountDue tasks today count is overdue tasks whose due date is today’s dateCountDistinctIf(`Task.UserTaskId`, `Task.StatusCode` = 0 and ToDate(`Task.DueDate`) = ToDate(CurrentDateTime))
Due Tasks Tomorrow CountDue tasks tomorrow count is overdue tasks whose due date is tomorrow’s dateCountDistinctIf(`Task.UserTaskId`, `Task.StatusCode` = 0 and ToDate(`Task.DueDate`) = ToDate(DurationAdd(CurrentDateTime,1,'DAY')))
Due Tasks This Week CountDue tasks tomorrow count is overdue tasks whose due date falls under the current weekCountDistinctIf(`Task.UserTaskId`, `Task.StatusCode` = 0 and ToWeek(`Task.DueDate`) = ToWeek(CurrentDateTime))
# Tasks Completed On TimeTasks completed on time are completed tasks where the completed date is before the due dateCountDistinctIf(`Task.UserTaskId`, `Task.StatusCode` = 1 and (`Task.EndDate` ≤ `Task.CompletedOn`  or `Task.DueDate` ≤ `Task.CompletedOn` ))
# Tasks Not Completed On TimeTasks not  completed on time are completed tasks where the completed date is after the due dateCountDistinctIf(`Task.UserTaskId`, `Task.StatusCode` = 1 and (`Task.EndDate` > `Task.CompletedOn`  or `Task.DueDate` > `Task.CompletedOn` ))

 

8. Revenue Data Source

This data source contains all your Revenue data which is captured in the standard Sales Activity on LeadSquared. All custom and standard Sales Activity fields, enriched with their corresponding Lead fields (from the Lead Data Source) and Opportunity Fields (from the Lead Opportunity Source) will be stored in this data source.

Revenue data source 1

revenue data source 2

Revenue Data Source Predefined Metrics

Metric NameLogicExpression
# DealsThis gives a count of sales activities
CountDistinctIf(`Activity.ProspectActivityAutoId`, `Activity.mx_Custom_2`>0)
RevenueThis gives a sum of the order valueSum(`Activity.mx_Custom_2`)

 

9. Phone Call Data Source

This data source contains all your Inbound and Outbound Phone Call Activity data in your LeadSquared system. All phone calls performed in your system, along with all system phone call fields, enriched with their corresponding Lead fields (from the Lead Data Source) and Opportunity Fields (from the Lead Opportunity Source) will be stored in this data source.

phone data source 1

phone data source 2

Phone Call Data Source Predefined Metrics

Metric NameLogicExpression
# CallsThis gives a count of calls (Inbound + Outbound)
Count(`Activity.ProspectActivityId`)
# Calls ConnectedThis gives a count of calls with status = Answered (Inbound + Outbound)
CountIf(`Activity.Status` = 'Answered')
# Unique LeadsThis gives total lead counts on which calls were attempted (Inbound + Outbound)
CountDistinctIf(`Lead.ProspectID`)
# Unique Leads ConnectedThis gives a total lead count where call status = Answered (Inbound + Outbound)
CountDistinctIf(`Lead.ProspectID`, `Activity.Status` = 'Answered')
# Inbound CallsThis gives a count of inbound calls
CountIf(`Activity.ActivityEvent` = 21)
# Inbound Answered CallsThis gives a count of inbound calls with the status = Answered
CountIf(`Activity.ActivityEvent` = 21 and `Activity.Status` = 'Answered')
# Inbound Missed CallsThis gives a count of inbound calls with the status = Missed
CountIf(`Activity.ActivityEvent` = 21 and `Activity.Status` = 'Missed')
# Outbound CallsThis gives a count of outbound calls
CountIf(`Activity.ActivityEvent` = 22)
# Outbound Answered CallsThis gives a count of outbound calls with the status = Answered
CountIf(`Activity.ActivityEvent` = 22 and `Activity.Status` = 'Answered')
# Outbound Unanswered CallsThis gives a count of outbound calls with the status = Not Answered
CountIf(`Activity.ActivityEvent` = 22 and `Activity.Status` = 'NotAnswered')
Total Call DurationThis is a sum of call duration
Sum(`Activity.mx_Custom_3`)
Average Call DurationThis is an average of call duration
Avg(`Activity.mx_Custom_3`)

 

# Voice MessagesThese are voice messages count if received
CountIf(`Activity.Status` = 'Missed' and `Activity.mx_Custom_4` != '')
# Call Duration less than 2minsThis gives a count of calls where call duration was < 2 minutes
CountIf(`Activity.mx_Custom_3` < 120)
# Call Duration >=2mins & less than 5minsThis gives a count of calls where call duration was ≥ 2 minutes and < 5 minutes
CountIf(`Activity.mx_Custom_3` ≥ 120 and `Activity.mx_Custom_3` < 300)
# Call Duration >=5mins & less than 10minsThis gives a count of calls where call duration was ≥ 5 minutes and < 10 minutes
CountIf(`Activity.mx_Custom_3` ≥ 300 and `Activity.mx_Custom_3` < 600)
# Call Duration >=10minsThis gives a count of calls where call duration was ≥ 10CountIf(`Activity.mx_Custom_3` ≥ 600)

 

10. Report Templates in SIERA Report Builder

To make it easy to build reports, SIERA comes with predefined templates to help users create their custom reports. The templates help users create reports across entities like Leads, Tasks, Activities, Phone Calls, and Activities.

To select the correct report template, you need the following information –

  1. Scope of the data – The data source and the report template primarily depend on the scope of the data. It refers to whether the report requires solely lead data or if it also requires activity or task data.
  2. Primary user type – The report you need can also be affected by the user type. Depending on your data source, you may have one or more user types.
    • For example, in the Activity Data Source, you will find Lead and Activity Data. The user types available in this data source are –
      1. Activity Owner
      2. Activity Creator
      3. Lead Owner
Note: Presently, you can only select 1 user type while creating a report (you cannot select both Activity Owner and Activity Creator). To help you generate reports on these user types, you will find templates on multiple user types for each data source.

Example Use Case

Consider the following report requirement: “I want to view connected calls and unique leads dialed per agent

To generate the above report, we need the following information –

  1. Data scope – The Scope of the data here is the Calling Data which is present in the Phone Call Activities. Thus, the data scope will be Activity Data Source and Phone Call Activity Data Source. As there is a specific Phone Call Activity report, we can use this Data Source.
  2. Primary user type – Because the reporting requirement is by agents who have made the call, we need the template by Activity Creator (agents).

example

 

Any Questions?

Did you find this article helpful? Please let us know any feedback you may have in the comments section below. We’d love to hear from you and help you out!

Was this Helpful?

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments