Create dynamic emails with Platform Analytics Scheduled Exports
Over the last years we have published some blogs related to Platform Analytics (PAE). Over time this changed from ‘prepare for the mandatory migration’ to the current ‘we advise using it, but if you don’t, you can keep the current way’. Our calls to action were based on the information ServiceNow shared at that moment and because of different reasons, they changed there way forward a couple of times.
There no longer is a need to migrate because you ‘have to’. At WhiteBrick we do still think ‘why not’. It’s the perfect way to get a uniform experience (new OOB dashboards and reports will be delivered on PAE) and it gives you more possibilities.
In this blog we will show you one example of a feature PAE brought to the table: use embedded reports (data visualizations) in scheduled exports in combination with email scripts to create dynamic emails that look different every time they are triggered.
Use Case
The use case is one that many in the ServiceNow eco system have been facing: “Communicate Service Level Agreement (SLA) results with your stakeholders”.
It doesn’t matter if you are only running internal IT tickets (ITSM) or providing complex services to customers through CSM/FSM. Every service has a level of support, and your boss and clients want to know how you are performing, related to the agreed upon Service Level.
You can easily create reports on this.
Put them on a dashboard and even make them available for customers and other stakeholders on a portal. But then that annoying question arrives: “we don’t want to log in to the system and look up the results. Can you send it via email?”.
Why anyone wants to see outdated data instead of insights in real time is still beyond my comprehension, but within the business world people are addicted to emails.
Previously, you could create the reports and add them to an email as attachments. Excel lists and graphs were sent as png or jpg, or as (separate) pdfs were sent.
Recipients received the emails with the standard (scheduled) text like ‘Please see attached the SLA results of last month’. No explanation, no telling them how great you are, no apologies for a job badly done, just several attachments that would tell the story (hopefully).
PAE makes it possible to embed the graphs into the email. A scheduled export lets you select ‘embedded’ as an option and you can place them in the body of an email. This immediately gives a great overview of last month’s information when the email is opened.
How about adding a single score with ‘Cases created’ and a donut on ‘has breached’ from the SLA results. The recipient sees those graphs in the email without having to open them up. It makes a huge difference if you see a 50/50 on breached SLA when they refer to 2 tickets than to 20 (still 50% but missing 1 Case’s SLA is more acceptable than missing 10, right?).
And now the best part
The HTML field on the Email Details section of the scheduled export allows you to add email scripts and with those you can dynamically add text to the emails. It will still be preconfigured text of course, but with a bunch of “ifs and elses” you can make it seem dynamic.
Imagine an email script that does the following: Get last month’s Cases and get the Cases over the previous 6 months and check their states. If last month’s number is higher or lower than the average over the last 6 months, create a sentence like this under a graph of created Cases on last month:
“Last month we received [94] Cases from you. This was [higher] than the average we saw in the previous 6 months. We resolved [105] Cases which were categorized like below.”
Put a ‘resolved by category’ pie- or bar chart below it and you have words to give the graphs some context.
You can do the same for Changes, Problems, Requests or whatever you want/need. Use reports on the task_sla table and report on the number/percentage of breached SLAs and add text to those as well. Comparing is an easy thing to do in email scripts, so you are reusing the texts, but combinations make it like the text is unique.
General information on the SLA definitions themselves can be added in the text (what defines a P1 Incident) and addressing your recipients can be done as well. You may want the email to a large government client’s Service Delivery Manager to be a bit more formal than addressing the lead of an internal support team.
Bonus ‘feature’
I realize I already mentioned that this was the best part, so let me introduce the next one as ‘bonus feature’. How about making it extra special? The above approach has one downside: it’s always based on data you can check and compare. Numbers can’t be analised through a script. You may want to put an explanation of the numbers in the email as well.
Example: you want to prevent your CTO to get stressed over the fact that you had 500 new Incidents on last month and only resolved 300, when the cause was an outage on the last day of the month (causing 225 Incidents being created on that one day).
Solution: create a monthly task for the responsible person in your company to deliver that explanation/analysis every month, before the scheduled export is triggered and use an email script to get that text into the email as well. This can be a custom table where you store them, or an existing table you utilize for this (a task to create the analysis in the close notes of that task, (mis)use the Knowledge Base, publishing the analysis also as article for your customers, use private tasks (vtb), etc.). Make sure that the email script takes the correct text (don’t repeat the one from last month, even if there isn’t a new one).
A couple of simple steps (although creating the initial setup could take some time) and you have an email that looks different every time you report on the SLA results.
And if you setup those email scripts in a smart way, you will be able to reuse them on most of the reports you have to send out.
Are you intrigued but don’t know how or where to start? We are always happy to help! Contact us via [email protected] or the known channels for our existing customers. Follow us on LinkedIn to stay updated on the content shared by our team of world-class professionals.
Note: AI has been left out of this blog on purpose. Can you use it to update your stakeholders in a different way, or create even more dynamic texts? Yes, of course. But AI capabilities come at an extra cost, and we want to share solutions that all customers can apply.

