ServiceNow’s native options to export and share dashboards are limited, and didn’t work for some of our reporting needs. At RapDev, almost all of our business data (financials, utilization, billable hours, etc.) is stored in ServiceNow, and we need a way for everyone to be able to view and understand it. To do this, we created a KPI report using a list type widget that lives on a dashboard. Previously, we had a script that would open the dashboard as a homepage, set all the parameters of what the report should look like and export it. Although this worked, there were issues such as not being able to apply breakdown elements to homepages, the exported report looking visually unappealing and the data was tough to digest. To find an alternative that better suited our needs, I developed a custom KPI exporter which allows us more control over the look of the report.
The custom exporter has three key components:
This custom solution can also be used for exporting and emailing other types of reports. The queries in the script includes can be adapted to query other tables, and that data can be passed to the HTML generation portion to generate different looking reports. Additionally, you can use ServiceNow’s PDF Generation API to convert the HTML to a PDF file and attach it to an email. You can find the code for the script includes and scheduled jobs on our GitHub.
Before:
After:
Interested to learn more or have questions? Reach out to us at chat@rapdev.io.