OSIsoft: How to Customize Notifications Message Content & Format [2016 R2] – Howtoshtab – how to, lifehacks, tips and tricks

Here I’ll be showing you how to customize your notifications message format to send just the specific details in your message that make the most sense for your user, and to be able to really specify the format. In the previous video, we setup this notification for the unplanned maintenance equipment downtime. And for the format, we are just using the global default email format here. As a result, when our notifications were generated, we received a message like this. And this provides us some basic information like for example what was the name of the event, what piece of equipment is affected and where it’s from.

As well as things like the start time. But there might be some other information that we’d like to include instead. For example in my case, I would like the subject message to actually say why the downtime is occurring and what piece of equipment it’s on. Maybe I’d like to know additional information like what shift is this occurring in? And things like what is the current status of the piece of equipment when the notification actually gets sent? So these are all things that we can go ahead and customize and setup. And as a result, we would get a notification that looks like this. So I’m going to show you how you can customize your formats. To do this we are going to go ahead and back in PI System Explorer, pick our specific notification rule which in this case this particular notification rule template that I’m working with. And this is all done under manage formats for our particular notification. So right now there is the global default email and if we look at this message here, we can see that this format is actually read only.

So we don’t make changes to the global default email here but we can go ahead and copy it and use it as a template which is something that I’ll do here in addition to duplicating it and creating a copy and working off of that and changing it. You can also just start from scratch using this button here to create a new format. So in my case let me go ahead and rename this so I’ll be really clear what this format is. And now I’m going to go ahead and start. You’ll notice that I’m now able to for example make some changes. So let’s go ahead and start with modifying the subject like I had mentioned earlier. And the information that we can include in our notification could be obviously type free text but there is also over here on the right, all of the additional things that we can bring in.

Like for example properties of our AF Server or Database. Or the notifications as well as things from the Event Frame or the element templates. So let’s start with the subject. I’m going to go ahead and start here and the first thing I want to do is put the reason that this is occurring. And in my case, the reason would be unplanned maintenance but that’s actually the value of the fault code at the start time of the Event Frame. And I can get that attribute if I go over to the Event Frame attributes and actually pick the fault code and I could do for example the value of the attribute at the start time of the Event Frame. So I’ll go ahead and bring that here. And again essentially what we are doing is specifying specific Event Frame attributes that we want to bring in. We could for example include their name, their values as well as the timestamp. So this is all information that we can add to our notification. And the way that we add it you can see it is essentially, I have basically selected one and dragged it over.

So let’s keeping working on the subject here. So fault code which is going to be our unplanned maintenance and I’m going to go ahead and add some text here. So this would be occurring on. And now I would like to go ahead and make this section save the path of the element. So I’m going to go ahead and add that by going to our element templates and one of the properties of our element template is the name. So I can do the name but in my case I want to do the whole element hierarchy, so I’ll pick the path. So I’ll select and I’ll hold and I’ll drag it over just like that. And I can do all of the configuration in the same manner. There is a couple of really useful things that I want to point out. You’ll notice that there is this notification roll message for close notification and that’s a nice thing to leave in if you want the subject to say whether or not the Event Frame has been closed. So by comparison, we can see that that’s the message that got written right here.

And so if I was just looking at the emails, I could see right away that this is something that’s already been fixed, there is no longer a problem. So now I’m going to go ahead and change the body of the email as well to be exactly the format type that I’m interested in. So I’ve just about made this notification format exactly the way I wanted to. Basically I ended up bringing in information not only from my Event Frame attributes but also from those that are part of my element, say from my element template. As well as just properties of the element like its name and path. So these are all things I was able to add as well as specific Event Frame properties. And in addition to using the select and then drag and drop technique that I taught you, there is actually one more thing that you could do. If you have the cursor in the body, you can actually pick an item and double click on it and that will also add it.

And the one thing I just added was this event details hyperlink which is a new option that is really helpful if you want people to be able to look at a visualization of the event with a web browser. In addition to customizing the text and the content, we can also do custom formatting. In my case, maybe I want to bold specific items. Or have them be highlighted in a specific color. So maybe if the notification is closed, in that case there will be this message here and I want it to be highlighted in green. So if there is a green line in the email, I now right away that things are in a good state. And again just really customize this to meet your needs. Once you are finished and everything looks good, you could also go ahead and use the preview options if you want to see how it looks.

In my case I’m going to go ahead and hit OK. Now just because we’ve created a new format, that doesn’t mean that our subscribers are going to receive that format. To configure this, we’ll need to go to edit subscriptions and right now you can see that we have the global default email selected. But in my case, I want to go ahead and change this to our new equipment downtime email. So I’ll go ahead and make that configuration change and then I’ll go ahead and check in these changes. OK, so now we’ve changed the subscription format and you might have noticed that while we did have that new format available when we went to edit subscriptions, that’s only going to be for this particular notification rule template.

However you can actually setup global formats like the global default email that we saw. To set those up, that’s actually under tools and then global formats. So this is where changes could be done to the global default email if you have the appropriate permissions. Or you could go ahead and create a new default global format. And again,  there are similar options here but keep in mind you won’t have the Event Frame attributes or the referenced element attributes. These are something that would have to get added for a specific Event Frame. But you can still setup a global format for some specific information that’s important to get included in any notification and make a copy of that and add-on to it in a given notification. In the next video we’ll look at how we can go ahead and actually customize who receives the notifications using groups and things called escalation teams.

.

You may also like