using System.Globalization;
using System.Net;
using OfficeIMO.Drawing;
using OfficeIMO.Html;
using OfficeIMO.Html.Pdf;
namespace OfficeIMO.Examples.Showcase.Workflows;
/// Builds an HTML service review from measured and target values, including explicit misses.
internal static class ServiceLevelReport {
internal static void Create(string folder) {
var measures = new[] {
new Measure("Availability", 99.94m, 99.90m, "%", true),
new Measure("First response", 3.2m, 4m, "hours", false),
new Measure("Resolution within target", 88m, 90m, "%", true)
};
string rows = string.Join("", measures.Select(measure => {
bool met = measure.HigherIsBetter ? measure.Actual >= measure.Target : measure.Actual <= measure.Target;
return $"
";
}));
string html = $$"""
Monthly service review
NORTHWIND / SERVICE OPERATIONS
Monthly service review
August 2026 / request portal / illustrative measurements
Performance against agreed targets
Measure
Actual
Target
Result
{{rows}}
Attention required
Resolution within target missed the agreed threshold. Review the oldest waiting requests and assign an owner to each next action.
Follow-up actions
Separate customer waiting time from internal queue time.
Review the ten oldest requests with the service owner.
Recheck the measure after two weeks of targeted follow-up.
Measurement notes
Availability uses the agreed service window. First response is the median elapsed time. Resolution reports the share completed within the agreed target. Replace these definitions with the actual service contract.