go to post Rick Prichett · Sep 2, 2021 Thanks Sean! I was able to trouble shoot and came up with the below code that does add my ZM1 segment. Method OnRequest(pRequest As EnsLib.HL7.Message, Output pResponse As Ens.Response) As %Status{#dim newrequest = pRequest.%ConstructClone()#dim eException As %Exception.AbstractException#dim tSC As %Status =$$$OK SET FedExID = "123456" SET segcount = newrequest.SegCountGet() $$$LOGINFO("segcount "_segcount) SET newsegpos = segcount +1 $$$LOGINFO("newsegpos "_newsegpos) SET zm1str = "ZM1|1|||||||||||||||||||" _FedExID #;SET zm1str = "ZM1|1|||||||||||||||||||" _FedExID _"|" SET zm1 = ##class(EnsLib.HL7.Segment).ImportFromString(zm1str,.sc,pRequest.Separators) $$$QuitOnError(sc) SET newseg = newrequest.SetSegmentAt(zm1,newsegpos)$$$QuitOnError(newseg) SET pRequest = newrequest#;SET tSC = ..SendRequestSync("HL7FileOperation", newrequest)SET tSC = ..SendRequestSync(..TargetConfigName, newrequest)#;return newrequest Quit tSC}