Cnergyis offers ZingHR, an in-the-cloud solution that combines many human-resources (HR) functions, including benefits administration, payroll, recruiting, training, and performance analysis and review into one package. ZingHR is a complete hire-to-retire solution, delivering human-capital management, learning management, performance management, recruitment software, succession planning, talent management, outsourcing management, and analytics. ZingHR powers Indian and global enterprise organizations large and small.

Key technologies used: Azure Web Apps, Power BI Embedded, Azure SQL Database, Azure Virtual Machines

Core team:

  • Nikhil Mishra – Mobile Architect, ZingHR
  • Anurag Raj – Data Scientist, ZingHR
  • Abhishesh Pandey – Asst. Manager SQL Development, ZingHR
  • Sagar Joshi (@sagarjms) – Senior Technical Evangelist, Microsoft
  • Maninderjit Bindra (@manisbindra) – Senior Technical Evangelist, Microsoft
  • Gandhali Samant (@s_gandhali) – Senior Technical Evangelist, Microsoft
  • Surbhi Jain – Audience Marketing, Microsoft

Customer profile

Cnergyis is an HR technologies, outsourcing, and services company that is SSAE 16 compliant and ISO 9001:2008 certified. It offers complete employee life-cycle HR software solutions in the cloud, available in an easy-to-use manner with a comprehensive list of scenarios for organizations of all sizes across industries. Cnergyis pioneered e-filing of returns in 2002 for the Department of Income Tax in India and the usage of SaaS + Service platforms for HR. Products and solutions offered by Cnergyis include the Cloud HR SAAS PlatForm, Cloud HR Software Products, Cloud HR Technologies, and Cloud HR Services-Outsourcing.

Problem statement

ZingHR is a platform based on Azure that provides end-to-end human-capital management solutions, including cognitive recruiting, payroll processing, time and attendance, and online e-separations. Based on the data collected in these modules, the ZingHR team wanted to provide actionable insights to their clientele for seamless and data-driven decision making in the least possible time.

The team also wanted to integrate in-app analytics, empowering users to take data-driven decisions from their insights. The main aim of this experience was to enable the top and middle management in their client companies to have seamless access to their data by using the existing ZingHR application on web and mobile.

Solution, steps, and delivery

Step 1: Solution envisioning

ZingHR web applications and services run on an Azure virtual machine. The services connect to a SQL Server database on a virtual machine. For the reporting data, they decided to use Azure SQL Database. Power BI services would use this database as their data source. The following steps were identified for the technical implementation.

  • Create REST APIs to provide add/edit/delete/update operations in the Power BI Embedded workspace collection
  • For the Setup role users (admins)
    • Embed configuration and reports fetched through Node.js service hosted on Azure
    • Create a data-transformation pipeline by using Azure Data Factory
  • Set up the use of DirectQuery with Azure SQL Database, updating the credentials for the report data source so that the data can be displayed by using the Power BI Embedded REST API functionality
  • Create .pbix reports using Power BI Desktop.
  • Upload .pbix reports to the server

Step 2: Setting up REST APIs

The ZingHR team decided to create an independent Node.js service (based on the Power BI Embedded SDK for Node.js) for generation of report configuration (including embed token) to automate the report-generation process. REST APIs were used to pass configurations containing access tokens, which would be used for embedding reports.

Report-embedding flow

Diagram of report-embedding flow

Sample request:

  ({
     url: base_url+'/api/reports/subscription',
     data: {
        Param1:xxxxxxx ,
        Param2:xxxxxxx ,
     },
     error: function(error) {

     },
     dataType: 'jsonp',
     success: function(data) {
     },
     type: 'GET'
  });

Sample response:

  {
    "Reports": [
    {
      "Type"		: "report",
      "role" 		: "xxxxxx",
      "Company"		: "xxxxxx",
      "Token Time "		: "xxxxxxx",
      "isMobile" 		: "True/False",
      "accessToken": "8vxxxxxxxxxx",
      "id": "1exxxxxxxxxxxxxxxxxxxxxxx",
      "name": "HR Report",
      "webUrl":"https://app.powerbi.com/reports/1exxxxxx",
      "embedUrl":"https://embedded.powerbi.com/appTokenReportEmbed?reportId=1exxxxxx"
      }
    ]
  }

Step 3: Creating data pipeline

The ZingHR team has hosted their OLTP database (SQL Server 2012) on Azure Virtual Machines. Because Power BI Embedded does not currently support DirectQuery from a SQL Server database on a virtual machine, the team used Azure SQL Database to store reporting datasets in real time. For this, they made a data pipeline using data-transformation methods. These data pipelines were deployed and run using Azure Data Factory. The frequency of data updates is every 15 minutes.

Data pipeline using Data Factory

Diagram of data pipeline using Azure Data Factory

Step 4: Embedding Reports

The ZingHR team used Power BI Desktop to create the report by using DirectQuery on Azure SQL Database, which was hosting the reporting data. They were able to embed reports in both the web application and the mobile application, but they continued on the web platform because the mobile UX was not same as Power BI mobile. With this solution, the C-level and senior management employees of ZingHR clients are now able to click on the Power BI Dashboard menu and get a list of reports specific to their roles. When a new customer is onboarded, selected employees are granted Power BI user roles, which are given access to specific reports by the admin. These roles and access configurations are managed in SQL Database. When clicked, each report is displayed in an HTML container.

Some of the reports that are currently available are as follows:

  • Menu page

    Menu page

  • Employee MIS report

    Employee MIS report

  • Employee attrition heatmap

    Employee attrition heatmap

User journeys

Customer

  • Customer logs in to the ZingHR application with company credentials
  • Power BI Dashboard appears as a menu item for users who have access rights
  • When a customer clicks the menu item, the client-side app sends a request for report configuration
  • The Node.js server provides the configuration, which is passed to the Power BI Embedded service for fetching reports
  • If accepted, the report list is uploaded and displayed in the aligned div
  • On report change, the existing configuration from the response is used

Admin

  • On new-user signup, a workspace and SQL database is created
  • The Data Factory pipeline runs to sync reporting data from OLTP to SQL database
  • Reports are uploaded into the interface for selection and then to the workspace
  • The connection string is updated to point to the client SQL database
  • The admin can specify the users who have viewing access to these reports

Provisioning the automation pipeline

Diagram: provisioning the automation pipeline

Some pictures from the hackfest

Montage of four photos from the hackfest

Opportunities going forward

We will continue to work with the ZingHR team for the following requirements:

  • The UX for Power BI Embedded needs to be replicated for Power BI Mobile
  • Integration of on-premises SQL Server databases when the support becomes available
  • Column name change and data type change handling for DirectQuery when those features become available

Conclusion

In conclusion, the two-day hackathon was a success. The ZingHR team achieved their goal of embedding a Power BI report into their application. Now they have put it into production as well. The Azure ecosystem has empowered ZingHR with in-app analytics in real time. The ZingHR team would love to see the product grow and take mobile UX and SQL Server database DirectQuery reporting into consideration.

Here is a quote from the customer:

“HR analytics and workforce planning constitute the major decision-making steps for an organization. With the support of Microsoft India, ZingHR is now empowered for analytics and actionable data insights with Power BI Embedded in our HR application. With Power BI Embedded, we are now able to help customer organizations to derive the value of business intelligence with seamless integration to real-time business data, along with the robustness and scalability of Azure.”