Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AF SDK Reference

AFNotificationContactTemplate Class

  • Last UpdatedNov 18, 2025
  • 11 minute read
AFNotificationContactTemplate Class
The AFNotificationContactTemplate provides the definition used to create AFNotificationContact objects within an AFNotification or AFNotificationRuleSubscriber objects within an AFNotificationRule.

Inheritance Hierarchy

SystemObject
  OSIsoft.AFAFObject
    OSIsoft.AF.NotificationAFNotificationContactTemplate

Namespace:  OSIsoft.AF.Notification
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182

Syntax

[SerializableAttribute]
public sealed class AFNotificationContactTemplate : AFObject, 
	IAFNotificationContact, IAFTransactable, IAFChangedEvent, IAFSecurable, IComparable<AFNotificationContactTemplate>
<SerializableAttribute>
Public NotInheritable Class AFNotificationContactTemplate
	Inherits AFObject
	Implements IAFNotificationContact, IAFTransactable, IAFChangedEvent, IAFSecurable, 
	IComparable(Of AFNotificationContactTemplate)

Dim instance As AFNotificationContactTemplate
[SerializableAttribute]
public ref class AFNotificationContactTemplate sealed : public AFObject, 
	IAFNotificationContact, IAFTransactable, IAFChangedEvent, IAFSecurable, IComparable<AFNotificationContactTemplate^>
[<SealedAttribute>]
[<SerializableAttribute>]
type AFNotificationContactTemplate =  
    class
        inherit AFObject
        interface IAFNotificationContact
        interface IAFTransactable
        interface IAFChangedEvent
        interface IAFSecurable
        interface IComparable<AFNotificationContactTemplate>
    end

The AFNotificationContactTemplate type exposes the following members.

Constructors

  NameDescription
Public method
AFNotificationContactTemplate(AFContact, String)
Initializes a new instance of the class with default values.
Public method
AFNotificationContactTemplate(PISystem, String)
Initializes a new instance of the class with the specified name.

Properties

  NameDescription
Public property
Available
This property indicates whether the AFNotificationContact objects created from this template are available to receive notifications.
Public property
CategoryString Obsolete.
This property is used by the AFNotificationContent object to determine if the AFNotificationContact is interested in the Category of the AFNotificationContent.
Public property
CheckOutInfo
This read-only property returns the checked out status information for the object.
Public property
ConfigString
This property returns the current configuration of the contact's delivery channel as a string suitable for displaying to an end-user.
Public property
Contact
This read-only property gets the AFContact associated with the notification contact template.
Public property
ContactType
The type of the AFNotificationContact to create from this template.
Public property
DeliveryChannel
The instance of the delivery channel that is associated with the AFNotificationContactTemplate to configure deliver notifications.
Public property
DeliveryChannelPlugIn
The delivery channel plugin property is used to specify which delivery channel will be used in the AFNotificationContact created from this AFNotificationContactTemplate to deliver the notification.
Public property
Description
Read/write property that provides a more detailed description of the object.
Public property
EscalationTimeout
This property is for an EscalationAFNotificationContact to specify the retry interval if the notification send was not successful.
Public property
ExpirationPeriod Obsolete.
This property is for an IndividualAFNotificationContact to specify the expiration period for the notification.
Public property
HasChildren
This read-only property returns if the notification contact template has child templates.
Public property
ID
Read-only property that provides a unique identifier for the object to be used for quick access that is not dependent upon the index.
(Inherited from AFObject.)
Public property
Identity
This read-only property contains identity of the object.
(Inherited from AFObject.)
Public property
IsDeleted
This read-only property indicates whether the object has been deleted.
(Inherited from AFObject.)
Public property
IsDirty
This read-only property indicates whether the object has been modified since the last save to the PI AF Server.
Public property
IsInternal
This property indicates that the AFNotificationContactTemplate is an internal template.
Public property
IsNew
This read-only property indicates whether the object is new and has never been saved to the PI AF Server.
Public property
MaximumRetries
This property is for an IndividualAFNotificationContact to specify the maximum number of times to retry sending the notification if it was not successful.
Public property
MinimumAcknowledgements
This property is for an GroupAFNotificationContact to specify the minimum number of acknowledgments before the group is considered to be acknowledged.
Public property
Name
This property defines the name that identifies the object.
Public property
NotificationContactTemplates
This property returns the collection of child notification contact templates.
Public property
NotifyWhenInstanceEnded
This property is for an IndividualAFNotificationContact to specify that the notification contact should be notified when the instance of the notification ends.
Public property
PISystem
This read-only property allows access to the PISystem associated with this object.
(Inherited from AFObject.)
Public property
RetryInterval
This property is for an IndividualAFNotificationContact to specify the retry interval if the notification send was not successful.
Public property
Security
This read-only property returns the AFSecurity information for the object.
Public property
UniqueID
Read-only property that provides the object's ID as a String.
(Inherited from AFObject.)

Methods

  NameDescription
Public methodCode example
ApplyChanges
This method applies the changes to the object and makes those changes available to other objects for the current user.
Public methodCode example
CheckIn
This method checks in (commits) all the changes to the object by saving the information to persistent storage.
Public method
CheckOut
This method locks the object so that its configuration can be modified.
Public methodStatic member
CheckOutNotificationContactTemplates
Check out the objects with the specified unique identifiers at the specified query date.
Public method
CompareTo(Object)
Compares this instance with a specified Object.
(Inherited from AFObject.)
Public method
CompareTo(AFObject)
Compares this instance with a specified AFObject.
(Inherited from AFObject.)
Public methodStatic member
DeleteNotificationContactTemplates
Delete the objects with the specified unique identifiers.
Public method
Equals(Object)
Determines whether the specified Object is equal to the current object.
(Inherited from AFObject.)
Public method
Equals(AFObject)
Indicates whether the current object is equal to another object of the same type.
(Inherited from AFObject.)
Public methodStatic member
FindNotificationContactTemplate
Retrieves the AFNotificationContactTemplate object with the specified unique identifier.
Public methodStatic member
FindNotificationContactTemplates(PISystem, Guid)
Performs a search within the PISystem to retrieve a collection of AFNotificationContactTemplate objects with the specified list of unique identifiers.
Public methodStatic member
FindNotificationContactTemplates(PISystem, String, AFSearchField, AFSortField, AFSortOrder, Int32)
Performs a text search within the PISystem to retrieve a collection of AFNotificationContactTemplate objects that match the specified query string.
Public methodStatic member
FindNotificationContactTemplatesByContact Obsolete.
Performs a search to retrieve a collection of all the AFNotificationContactTemplate objects that have the specified AFContact configured to receive the notification.
Public methodStatic member
FindNotificationContactTemplatesByDatabase Obsolete.
Retrieves AFNotificationContactTemplate objects referenced within the AFDatabase.
Public method
GetHashCode
Gets the hash code for this instance of the object which is suitable for use in hashing algorithms and data structures like a hash table.
(Inherited from AFObject.)
Public method
GetPath
Returns the full path to the object, using just the names.
(Inherited from AFObject.)
Public method
GetPath(AFObject)
Returns the path to the object relative from another object.
(Inherited from AFObject.)
Public method
GetPath(AFEncodeType, AFObject)
Returns the path to the object relative from another object, using the name and/or id as specified by encodeType.
(Inherited from AFObject.)
Public method
GetSecurity
Gets the AFSecurity information of the specified security item associated with the object.
Public method
GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodStatic member
LoadNotificationContactTemplates(IListAFNotificationContactTemplate)
Loads the specified list AFNotificationContactTemplate objects.
Public methodStatic member
LoadNotificationContactTemplates(PISystem, Guid)
Loads the AFNotificationContactTemplate objects with the specified unique identifiers.
Public method
Persist
This method returns the persistence string for the object.
(Inherited from AFObject.)
Public method
Refresh
Refreshes the client with any changes that have been made to the object since loaded.
Public method
ToString
Returns a String that represents the current object.
(Inherited from AFObject.)
Public method
UndoCheckOut
This method discards all the changes to the object and all sub-objects since the last call to CheckOut. Any changes since the check out will be lost.

Events

  NameDescription
Public eventCode example
Changed
Event is raised when the object or one of its sub-objects is changed.

Remarks

When using AFNotificationRule objects, a template specifies the value of the Name, Description, ContactType, and Subscribers properties of the AFNotificationRuleSubscriber created from this template. This template also provides default values for the other properties of the AFNotificationRuleSubscriber created from this template.

When using AFNotification objects, a template specifies the value of the Name, Description, ContactType, Available and NotificationContacts properties of the AFNotificationContact created from this template. This template also provides default values for the other properties of the AFNotificationContact created from this template.

Note Note
An AFNotificationContactTemplate is sometimes referred to a Delivery Endpoint, for example when importing/exporting in PI AF Builder.

Examples

// This example demonstrates how to create a hierarchy of notification
// contact templates and use them to create a hierarchy of notification
// contacts in a new notification. Then information about the created
// notification contacts is displayed.

// Get the Database
PISystems myPISystems = new PISystems();
PISystem myPISystem = myPISystems.DefaultPISystem;
AFDatabase myDB = myPISystem.Databases.DefaultDatabase;

// Create a Hierarchy of Notification Contact Templates
AFNotificationContactTemplate myContactTemplate1 = new AFNotificationContactTemplate(myPISystem, "MyContact#1");
AFNotificationContactTemplate myContactTemplate2 = new AFNotificationContactTemplate(myPISystem, "MyContact#2");
AFNotificationContactTemplate myGroupContactTemplate = new AFNotificationContactTemplate(myPISystem, "MyGroup");
myGroupContactTemplate.ContactType = AFNotificationContactType.Group;
myGroupContactTemplate.NotificationContactTemplates.Add(myContactTemplate1);
myGroupContactTemplate.NotificationContactTemplates.Add(myContactTemplate2);

// Create a Notification with Notification Contacts
AFNotification myNotification = new AFNotification(myDB, "MyNotification");
myNotification.NotificationContacts.Add("MyLocalContact#1");
myNotification.NotificationContacts.Add(myGroupContactTemplate);

// Display Information for the Created Notification Contacts
foreach (AFNotificationContact item in myNotification.NotificationContacts)
{
    Console.WriteLine("Name of Notification Contact = {0}", item.Name);
    foreach (AFNotificationContact subItem in item.NotificationContacts)
    {
        Console.WriteLine("  Name of Notification Contact = {0}", subItem.Name);
    }
}
' This example demonstrates how to create a hierarchy of notification
' contact templates and use them to create a hierarchy of notification
' contacts in a new notification. Then information about the created
' notification contacts is displayed.

' Get the Database
Dim myPISystems As PISystems = New PISystems
Dim myPISystem As PISystem = myPISystems.DefaultPISystem
Dim myDB As AFDatabase = myPISystem.Databases.DefaultDatabase

' Create a Hierarchy of Notification Contact Templates
Dim myContactTemplate1 As AFNotificationContactTemplate = New AFNotificationContactTemplate(myPISystem, "MyContact#1")
Dim myContactTemplate2 As AFNotificationContactTemplate = New AFNotificationContactTemplate(myPISystem, "MyContact#2")
Dim myGroupContactTemplate As AFNotificationContactTemplate = New AFNotificationContactTemplate(myPISystem, "MyGroup")
myGroupContactTemplate.ContactType = AFNotificationContactType.Group
myGroupContactTemplate.NotificationContactTemplates.Add(myContactTemplate1)
myGroupContactTemplate.NotificationContactTemplates.Add(myContactTemplate2)

' Create a Notification with Notification Contacts
Dim myNotification As AFNotification = New AFNotification(myDB, "MyNotification")
myNotification.NotificationContacts.Add("MyLocalContact#1")
myNotification.NotificationContacts.Add(myGroupContactTemplate)

' Display Information for the Created Notification Contacts
For Each item As AFNotificationContact In myNotification.NotificationContacts
    Console.WriteLine("Name of Notification Contact = {0}", item.Name)
    For Each subItem As AFNotificationContact In item.NotificationContacts
        Console.WriteLine("  Name of Notification Contact = {0}", subItem.Name)
    Next
Next

No code example is currently available or this language may not be supported.

No code example is currently available or this language may not be supported.

Version Information

AFSDK


See Also

TitleResults for “How to create a CRG?”Also Available in