# Table of contents:
# Introduction
<NOTIFICATION> documents are the basis behind the NOT and IPG commands.
Being such, it was introduced with MSNP5.
This article only describes the <NOTIFICATION> element from .NET Alerts 5.0 and below,
and not the <Notify> element used in .NET Alerts 6.0 and above.
# NOTIFICATION
This is the root element of the document, and supports four attributes:
ver: This is always1. Seems optional, or was removed later.id: A 32-bit unsigned integer that is set by the sending party which uniquely identifies this notification.
NOTE: For IPG commands, this value is used as the Transaction ID if it is a response to a client-sent PAG or PGD command.siteid: The .NET Alerts Site ID, not to be confused with the .NET Passport Site ID. Setting this to some values changes the default icon:0: Use stocks (stack of coins or line-chart) icon.1: Use calendar (clock) icon.- Other values: Use default bell icon or custom icon.
siteurl: The base URL to the service used in later relative URL attributes.
This element supports three attributes:
pid: The recipient's Passport Unique ID. The format for the PUID is0xHHHHHHHH:0xLLLLLLLL, whereHis the hexadecimal representation of the profile'sMemberIdHighvariable, and whereLis the hexadecimal representation of the profile'sMemberIdLowvariable.name: The recipient's display name or user handle. Optional.email: The e-mail address that will receive the e-mail version of this notification.
If this element (<TO>) does not have a (<VIA>) element, it is to be empty.
This empty element only supports one attribute:
agent: What this alert was generated by:email: A e-mail message.messenger: A message from the Official Client.mobile: A text message from a mobile device.
NOTE: This element should NOT be added to any <NOTIFICATION> documents.
This optional empty element supports two attributes:
pid: The sender's Passport Unique ID. Follows the same format as the<TO>element'spidparameter.from: The sender's display name or user handle. Optional.
This is the primary element of the document, and supports two attributes:
pri: The notification's priorty, defaulting to the value of1. May be omitted or empty in some circumstances.id: The notification's numeric ID, defaulting to the value of0.
NOTE: For IPG commands, this value is used as an status code:0: The message was received successfully.1: The message was received successfully.407: The message failed to send.
This element supports only one attribute:
url: The main URL that is used when this notification is activated, relative tositeurl.
When opened by a client, the following are added to the URL as query parameters:
to_pid: Thepidattribute from<TO>element.notification_id: Theidattribute from<NOTIFICATION>element.message_id: Theidattribute from<MSG>element.agent: The client that activated this notification. The Official Client sets this tomessenger. Optional.
This element supports only one attribute:
url: The configuration URL that is used when the notification'schangeoption is activated, relative tositeurl.
When opened by a client, the following are added to the URL as query parameters:
to_pid: Thepidattribute from<TO>element.notification_id: Theidattribute from<NOTIFICATION>element.message_id: Theidattribute from<MSG>element.agent: The client that activated this notification. The Official Client sets this tomessenger. Optional.
NOTE: This element is obsolete and
should NOT be added to any new <NOTIFICATION> documents.
This optional empty element only supports one attribute:
id: The category ID of this notification.
This is the main body of the document, and supports three attributes:
lang: The decimal LCID that this notification document is meant to display in. Optional, but should be set.lcid: The decimal LCID that this notification document is meant to display in. Optional, but is exclusive withlang.icon: The custom 32x32 PNG icon URL, relative tositeurl. Optional.
NOTE: Client Version 6.0 (MSNP9) and above support 48x32 icons and will attempt to automatically use them if your icon URL includes the substring_32x32, if it does, the client will replace the substring of_32x32with the value of_48x32.
If you do not have a 48x32 icon when this happens, the client will fallback to the original 32x32 icon specified.
The default element that this parents is <TEXT>. It may also contain other types of data.
One such data type is the <NotificationData> sub-document.
This element (including the <BODY> and </BODY>) are restricted in size to 1024 bytes.
NOTE: This element should NOT be added to any <NOTIFICATION> documents.
This optional element contains the friendly name of the recipient.
# TEXTThis optional element contains the text data of the notification.
# EMAILTEXTThis optional element contains the text data of the notification that
is sent to the e-mail address specified as the <TO> element's email attribute.
This optional element contains the extended text data of the notification, supported by MSNP9 and higher.
The <TEXT> element is required for this to be parsed by the Official Client.
The inner document of this is required to be XML encoded.
# PA paragraph, required for <TEXTX> elements to parse correctly.
This element supports one attribute:
align: The extended notification's text alignment:leftcenterright
This element may contain any of the following elements:
P: Nested paragraph, also supporting thealignelement.B: Bold text.I: Italic text.BR: This empty element denotes a line-break.
# NotificationData
This element may instead be contained in the <BODY> element entirely,
replacing all of it's children.
This sub-document is XML encoded if set as the inner data of the <BODY> element.
This element supports two attributes:
xmlns:xsd: is always set tohttp://www.w3.org/2001/XMLSchemaxmlns:xsi: is always set tohttp://www.w3.org/2001/XMLSchema-instance
Contains only ABCHInternal. Unknown if there are other values supported.
This element is exclusive to notifications generated by the Address Book Service.
# CIDContains only the Common ID of the user associated with this notification.
This element is exclusive to notifications generated by the Address Book Service.
# SpaceHandleThis element only has one child named ResourceID.
This element and it's children are exclusive to notifications generated by the blog service.
# ResourceIDContains the blog service's ID for this user.
# ComponentHandleThis element only has one child named ResourceID.
This element and it's children are exclusive to notifications generated by the blog service.
# ResourceIDContains the blog service's ID for the main component.
# OwnerCIDThis element only contains a signed 64-bit integer for the Common ID. Added since MSNP13.
This element and it's children are exclusive to notifications generated by the blog service.
# LastModifiedDateContains a ISO 8601-compatible timestamp with 7 millisecond digits.
This element is omitted in notifications generated by the persistent group service.
# ActionOnly observed to contain Add. Unknown if there are other values supported.
This element is exclusive to notifications generated by the blog service.
# HasNewItemContains either true or false.
This element has two children named <Component> and <Items>.
This element and it's children are exclusive to notifications generated by the blog service.
# ComponentThis element has one child named ResourceID and supports one attribute:
xsi:type: The type of this<Component>:List: A list.Folder: A photo collection.MessageContainer: A text message container.
Contains the blog service's ID for this <Component>.
This element supports multiple <Item> child elements.
This element has one child named ResourceID and supports one attribute:
xsi:type: The type of this<Component>:ListEntry: An entry on a list.Photo: A photo.Message: A text message.
Contains the blog service's ID for this <Item>.
Contains the GUID of the persistent group.
This element is exclusive to notifications generated by the persistent group service.