Thanks.  Didn't like the "set RawContent = ##class(EnsLib.HL7.Message).%OpenId(pID).OutputToString()" piece for some reason, so ended up with a seoncd SQL statement to pull the data.  Here is my custom function code:

ClassMethod CHNwGetRawMessageForAlerts(
pSessionID As %String = "",
pTargetName As %String = "") As %String
{
    set HL7RawContent= "Message Not Found: Contact Interface Team"
    set pID = ""
    
         &sql(
            SELECT TOP 1 MessageBodyId INTO :pID
            FROM Ens.MessageHeader
            WHERE (TargetConfigName=:pTargetName AND SessionId=:pSessionID)
            OR (SourceConfigName=:pTargetName AND SessionId=:pSessionID)
        )
        if SQLCODE '= 0 {
            set HL7RawContent = "SQL1 Message Not Found: Contact Interface Team"
        }
        else
        {
            &sql(
            SELECT RawContent INTO :HL7RawContent
            FROM EnsLib_HL7.Message
            WHERE ID=:pID
           
        )
        if SQLCODE '= 0 {
            set HL7RawContent = "SQL2 Message Not Found: Contact Interface Team"
        }
        }
    
       Quit HL7RawContent
}

Thanks for the suggestions.  Here's what I have in place.  Added two global variables to track last Alert Text & Date/Time sent out (updated as part of the DTL for alerts sent to outbound smtp).  Created a custom function to call as part of the Ens.Alert rule (which takes in the current Alerts text & Date/Time).

 

Function:

ClassMethod CHNwCheckLastErrorAlert(
CurrentAlertText As %String,
CurrentAlertTime As %String) As %Boolean [ Final ]
{
Set SkipAlert = 0
Set AlertSeconds = 0

If CurrentAlertText = $GET(^LastErrorAlertText)

{
    Set AlertSeconds = $SYSTEM.SQL.DATEDIFF("s",$GET(^LastErrorAlertTime),CurrentAlertTime)

    If AlertSeconds < 300
        // If the Alert Text is the same as previous alert amd time stamp is less than 5 minutes, set to true (do not process alert)

         {
          Set SkipAlert = 1
         }
}


 quit SkipAlert
}