AFNotificationContact Class
- Last UpdatedNov 18, 2025
- 10 minute read
- PI System
- AF SDK 2024 R2
- Developer
The AFNotificationContact defines the information needed to
deliver notifications.

Inheritance Hierarchy
Namespace: OSIsoft.AF.Notification
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
[SerializableAttribute] public sealed class AFNotificationContact : AFObject, IAFNotificationContact, IComparable<AFNotificationContact>, IAFTrace
<SerializableAttribute> Public NotInheritable Class AFNotificationContact Inherits AFObject Implements IAFNotificationContact, IComparable(Of AFNotificationContact), IAFTrace Dim instance As AFNotificationContact
[SerializableAttribute] public ref class AFNotificationContact sealed : public AFObject, IAFNotificationContact, IComparable<AFNotificationContact^>, IAFTrace
[<SealedAttribute>] [<SerializableAttribute>] type AFNotificationContact = class inherit AFObject interface IAFNotificationContact interface IComparable<AFNotificationContact> interface IAFTrace end
The AFNotificationContact type exposes the following members.
Properties
| Name | Description | |
|---|---|---|
| Available |
This property indicates whether the AFNotificationContact
is available to receive notifications.
| |
| CategoryString | Obsolete.
This property is used by the AFNotificationContent object to determine if the
AFNotificationContact is interested in the category of the AFNotificationContent | |
| ConfigString |
This property returns the current configuration of the contact's delivery channel
as a string suitable for displaying to an end-user.
| |
| Contact |
This read-only property gets the AFContact associated with the
Notification contact.
| |
| ContactDefinition |
This read-only property returns the AFNotificationContact
that was used to create this AFNotificationContact from the
AFNotificationTemplate.
| |
| ContactType |
The type of the notification contact.
| |
| Database |
This read-only property returns the AFDatabase where this object is defined.
| |
| DeliveryChannel |
The instance of the delivery channel that is used by the
AFNotificationContact to deliver notifications.
| |
| DeliveryChannelPlugIn |
The delivery channel plugin property is used to specify which
delivery channel will be used in the AFNotificationContact to deliver the notification.
| |
| Description |
Read/write property that provides a more detailed description of the object.
| |
| EscalationTimeout |
This property is for an EscalationAFNotificationContact to specify the retry interval if the notification
send was not successful.
| |
| ExpirationPeriod | Obsolete.
This property is for an IndividualAFNotificationContact to specify the expiration period for
the notification.
| |
| 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.) | |
| Identity |
This read-only property contains identity of the object.
(Inherited from AFObject.) | |
| IsDeleted |
This read-only property indicates whether the object has been deleted.
(Inherited from AFObject.) | |
| MaximumRetries |
This property is for an IndividualAFNotificationContact to specify the maximum number of times
to retry sending the notification if it was not successful.
| |
| MinimumAcknowledgements |
This property is for an GroupAFNotificationContact to specify the minimum number of
acknowledgments before the group is considered to be acknowledged.
| |
| Name |
This property defines the name that identifies the object.
| |
| Notification |
This property returns the AFNotification object which owns the
notification contact.
| |
| NotificationContacts |
This is a collection of child contacts that have been added to this notification contact.
| |
| NotificationTemplate |
This property returns the AFNotificationTemplate object which owns the
notification contact.
| |
| NotifyWhenInstanceEnded |
This property is for an IndividualAFNotificationContact to specify that the notification
contact should be notified when the instance of the notification ends.
| |
| Parent |
This read-only property returns the AFNotificationContact that
is the parent of this notification contact.
| |
| PISystem |
This read-only property allows access to the PISystem associated with this
object.
(Inherited from AFObject.) | |
| RetryInterval |
This property is for an IndividualAFNotificationContact to specify the retry interval if the notification
send was not successful.
| |
| Template |
This read-only property returns the AFNotificationContactTemplate
that was used to create this AFNotificationContact.
| |
| UniqueID |
Read-only property that provides the object's ID as a String.
(Inherited from AFObject.) |
Methods
| Name | Description | |
|---|---|---|
| CompareTo(Object) |
Compares this instance with a specified Object.
(Inherited from AFObject.) | |
| CompareTo(AFObject) |
Compares this instance with a specified AFObject.
(Inherited from AFObject.) | |
| Equals(Object) |
Determines whether the specified Object is equal to the current object.
(Inherited from AFObject.) | |
| Equals(AFObject) |
Indicates whether the current object is equal to another object of the same type.
(Inherited from AFObject.) | |
| FindContact |
Used for finding the AFNotificationContact with a given ID for
the notification contact or its template.
| |
| FindNotificationContact(AFNotification, Guid) |
Retrieves the AFNotificationContact object with the specified unique identifier within
the AFNotification.
| |
| FindNotificationContact(AFNotificationTemplate, Guid) |
Retrieves the AFNotificationContact object with the specified unique identifier within
the AFNotificationTemplate.
| |
| FindNotificationContact(AFNotification, Guid, Guid) |
Retrieves the AFNotificationContact object with the specified unique identifier
and parent unique identifier within the AFNotification.
| |
| FindNotificationContact(AFNotificationTemplate, Guid, Guid) |
Retrieves the AFNotificationContact object with the specified unique identifier
and parent unique identifier within the AFNotificationTemplate.
| |
| 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.) | |
| GetPath |
Returns the full path to the object, using just the names.
(Inherited from AFObject.) | |
| GetPath(AFObject) |
Returns the path to the object relative from another object.
(Inherited from AFObject.) | |
| 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.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| IsTraced |
Indicates if a specified level is being traced.
| |
| Persist |
This method returns the persistence string for the object.
(Inherited from AFObject.) | |
| ToString |
Returns a String that represents the current object.
(Inherited from AFObject.) | |
| TraceData |
Output a data trace event.
| |
| TraceDetail |
Output a detail trace event.
| |
| TraceError |
Output an error trace event.
| |
| TraceEvent(AFTraceSwitchLevel, String) |
Output a trace event with a message.
| |
| TraceEvent(AFTraceSwitchLevel, String, Int32) |
Output a trace event with a message and a duration.
| |
| TraceEvent(AFTraceSwitchLevel, String, Object) |
Output a trace event as a formatted message with a variable number of arguments.
| |
| TraceInformation |
Output an information trace event.
| |
| TraceSummary |
Output a summary trace event.
| |
| TraceWarning |
Output a warning trace event.
|
Remarks
A notification contact provides additional information to an AFContact
needed to deliver notifications. An AFNotificationContactTemplate
can be used as a template for creating a notification contact. If an
AFNotification is created from an AFNotificationTemplate,
then the notification contact hierarchy can be defined by notification template's
NotificationContacts collection.
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.