{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":1148,"path":"api-reference/server-api-reference/tmftopiceventapiutiloobScopedAPI.md","title":"TMFTopicEventAPIUtilOOB - Scoped","bundle":null,"doc_type":null,"release":"australia","body":"\n# TMFTopicEventAPIUtilOOB- Scoped\n\nThe `TMFTopicEventAPIUtilOOB` script include contains functions to handle Event Notification Management Open API requests that are triggered by external trigger definitions to create, update, and delete events in the Event \\[em\\_event\\] table.\n\nThis script include contains the default implementation for the Event Notification Management Open API. If you want to change the default functionality of this API, you need to override the functions contained in this script include in the `TMFTopicEventAPIUtil` script include.\n\nThis script include runs in the `sn_ind_tmf642` namespace and requires the Telecommunications Alarm Management Open API \\(app-ind-tmfapi-alarm\\) plugin to be activated.\n\nFor additional information on how to override these functions, see the [Event Notification Management Open API Developer Guide](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/developer-guides/event-mgmt-notif_dev-guide.md).\n\nFor additional information on the Event Notification Management Open API, see [Event Notification Management Open API](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/rest-apis/event_open-api.md).\n\n**Parent Topic:**[Server API reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/api-server.md)\n\n## TMFTopicEventAPIUtilOOB - getAlarmChangeEventSchema\\(\\)\n\nReturns the payload schema used when processing an alarm change event \\(ALARM\\_CHANGE\\_EVENT\\_SCHEMA\\).\n\nThis function is called as part of the `AlarmChangeEvent` flow action call process. You can change the functionality of this function by overriding the default functionality in the `TMFTopicEventAPIUtil` script include and the schema in the `TMFAlarmAPIConstants` script include.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n|Type|Description|\n|----|-----------|\n|String|Schema defined in `TMFAlarmAPIConstants.ALARM_CHANGE_EVENT_SCHEMA`.|\n\n```\n// Schema validation\nvar schema = this.getAlarmChangeEventSchema();\nvar validationResults = this.schemaValidator.validateJSON(changeAlarmPayload, schema);\nif (validationResults.length > 0) {\n  this.responseObject.status = TMFAlarmAPIConstants.EVENT_TRANSFORMATION_ERROR;\n  this.responseObject.responseError.errorMessage = TMFAlarmAPIConstants.MESSAGES.CHANGE_ERROR;\n  this.responseObject.responseError.errorReason = TMFAlarmAPIConstants.MESSAGES.CHANGE_ERROR_PAYLOAD;\n  var messageDetails = [];\n  for (var i = 0; i < validationResults.length; i++)\n    messageDetails.push(this.createErrorObject(validationResults[i].message, validationResults[i].dataPath));\n  this.responseObject.responseError.details = messageDetails;\n  return this.responseObject;\n```\n\n## TMFTopicEventAPIUtilOOB - getAlarmCreateEventSchema\\(\\)\n\nReturns the payload schema used when processing an alarm create event \\(ALARM\\_CREATE\\_EVENT\\_SCHEMA\\).\n\nThis function is called as part of the `AlarmCreateEvent` flow action call process. You can change the functionality of this function by overriding the default functionality in the `TMFTopicEventAPIUtil` script include and the schema in the `TMFAlarmAPIConstants` script include.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n|Type|Description|\n|----|-----------|\n|String|Schema defined in `TMFAlarmAPIConstants.ALARM_CREATE_EVENT_SCHEMA`|\n\n```\n// Schema validation\nvar schema = this.getAlarmCreateEventSchema();\nvar validationResults = this.schemaValidator.validateJSON(eventAlarmObject, schema);\nif (validationResults.length > 0) {\n  this.responseObject.status = TMFAlarmAPIConstants.EVENT_TRANSFORMATION_ERROR;\n  this.responseObject.responseError.errorMessage = TMFAlarmAPIConstants.MESSAGES.CREATE_ERROR;\n  this.responseObject.responseError.errorReason = TMFAlarmAPIConstants.MESSAGES.CREATE_ERROR_PAYLOAD;\n  var messageDetails = [];\n  for (var i = 0; i < validationResults.length; i++)\n    messageDetails.push(this.createErrorObject(validationResults[i].message, validationResults[i].dataPath));\n  this.responseObject.responseError.details = messageDetails;\n  return this.responseObject;\n}\n```\n\n## TMFTopicEventAPIUtilOOB - getAlarmDeleteEventSchema\\(\\)\n\nReturns the payload schema used when processing an alarm delete event \\(ALARM\\_DELETE\\_EVENT\\_SCHEMA\\).\n\nThis function is called as part of the `AlarmDeleteEvent` flow action call process. You can change the functionality of this function by overriding the default functionality in the `TMFTopicEventAPIUtil` script include and the schema in the `TMFAlarmAPIConstants` script include.\n\n|Name|Type|Description|\n|----|----|-----------|\n|None| | |\n\n|Type|Description|\n|----|-----------|\n|String|Schema defined in `TMFAlarmAPIConstants.ALARM_DELETE_EVENT_SCHEMA`.|\n\n```\n// Schema validation\nvar schema = this.getAlarmDeleteEventSchema();\nvar validationResults = this.schemaValidator.validateJSON(deleteAlarmPayload, schema);\nif (validationResults.length > 0) {\n  this.responseObject.status = TMFAlarmAPIConstants.EVENT_TRANSFORMATION_ERROR;\n  this.responseObject.responseError.errorMessage = TMFAlarmAPIConstants.MESSAGES.CLEAR_ERROR;\n  this.responseObject.responseError.errorReason = TMFAlarmAPIConstants.MESSAGES.CLEAR_ERROR_PAYLOAD;\n  var messageDetails = [];\n  for (var i = 0; i < validationResults.length; i++)\n    messageDetails.push(this.createErrorObject(validationResults[i].message, validationResults[i].dataPath));\n  this.responseObject.responseError.details = messageDetails;\n  return this.responseObject;\n}\n```\n\n## TMFTopicEventAPIUtilOOB - mapAlarmChangeObjectToEvent\\(alarmObject, GlideRecord newEventGr\\)\n\nMaps the parameters in the passed change request payload to fields in the specified record in the Event \\[em\\_event\\] table.\n\nYou can customize field mappings to add data to the Event \\[em\\_event\\] table or change the default field mappings. To modify mappings, create functions with identical names and parameters in the `TMFTopicEventAPIUtil` script include to override the mappings in the `TMFTopicEventAPIUtilOOB` script include. If you add fields to the mappings, these fields must also be added to the associated schema \\(`TMFAlarmAPIConstants.ALARM_CHANGE_EVENT_SCHEMA`\\).\n\nThis function is called as part of the transformAndPersistChangeEvent\\(\\) function.\n\n|Name|Type|Description|\n|----|----|-----------|\n|alarmObject|Object|Payload should match what is defined in the schema defined in `TMFAlarmAPIConstants.ALARM_CHANGE_EVENT_SCHEMA`.|\n|newEventGr|GlideRecord|GlideRecord of the record to updated in the Event \\[em\\_event\\] table.|\n\n|Type|Description|\n|----|-----------|\n|None| |\n\n```\nthis.mapAlarmChangeObjectToEvent(additionalInfoObj, newEventGr);\n\nvar id = newEventGr.insert();\nreturn gs.nil(id) ? id : newEventGr.message_key;\n```\n\n## TMFTopicEventAPIUtilOOB - mapCreateAlarmObjectToEvent\\(Object alarmObject, GlideRecord eventGr\\)\n\nMaps the parameters in the passed create request payload to fields in the specified record in the Event \\[em\\_event\\] table.\n\nYou can customize field mappings to add data to the Event \\[em\\_event\\] table or change the default field mappings. To modify mappings, create functions with identical names and parameters in the `TMFTopicEventAPIUtil` script include to override the mappings in the `TMFTopicEventAPIUtilOOB` script include. If you add fields to the mappings, these fields must also be added to the associated schema \\(`TMFAlarmAPIConstants.ALARM_CREATE_EVENT_SCHEMA`\\).\n\nThis function is called as part of the transformAndPersistAlarmCreateEvent\\(\\) function.\n\n|Name|Type|Description|\n|----|----|-----------|\n|alarmObject|Object|Payload should match what is defined in the schema defined in `TMFAlarmAPIConstants.ALARM_CREATE_EVENT_SCHEMA`.|\n|eventGr|GlideRecord|GlideRecord of the record in the Event \\[em\\_event\\] table.|\n\n|Type|Description|\n|----|-----------|\n|None| |\n\n```\nthis.mapCreateAlarmObjectToEvent(eventAlarmObject, eventGr);\nvar id = eventGr.insert();\nreturn gs.nil(id) ? id : msgKey;\n```\n\n## TMFTopicEventAPIUtilOOB - mapDeleteAlarmObjectToEvent\\(Object additionalInfoObj, GlideRecord newEventGr\\)\n\nMaps the parameters in the passed delete request payload to fields in the specified record in the Event \\[em\\_event\\] table.\n\nYou can customize field mappings to add data to the Event \\[em\\_event\\] table or change the default field mappings. To modify mappings, create functions with identical names and parameters in the `TMFTopicEventAPIUtil` script include to override the mappings in the `TMFTopicEventAPIUtilOOB` script include. If you add fields to the mappings, these fields must also be added to the associated schema \\(`TMFAlarmAPIConstants.ALARM_DELETE_EVENT_SCHEMA`\\).\n\nThis function is called as part of the transformAndPersistDeleteEvent\\(\\) function.\n\n|Name|Type|Description|\n|----|----|-----------|\n|alarmObject|Object|Payload should match what is defined in the schema defined in `TMFAlarmAPIConstants.ALARM_DELETE_EVENT_SCHEMA`.|\n|newEventGr|GlideRecord|GlideRecord of the record to use to map the fields in the payload to those in the Event \\[em\\_event\\] table.|\n\n|Type|Description|\n|----|-----------|\n|None| |\n\n```\nthis.mapDeleteAlarmObjectToEvent(additionalInfoObj, newEventGr);\nvar id = newEventGr.insert();\nreturn gs.nil(id) ? id : newEventGr.message_key;\n```\n\n## TMFTopicEventAPIUtilOOB - prepareEventAlarmRecordResponse\\(String msgKey Object alarmObject, Object responseObject\\)\n\nGenerates the response object after event creation or update, including the clearing of an event.\n\nThis function is called by the processAlarmCreateEvent\\(\\), processChangeAlarm\\(\\), and processDeleteAlarmEvent\\(\\) functions. You can change the functionality of this function by overriding the default functionality in the `TMFTopicEventAPIUtil` script include.\n\n<table id=\"table_tnr_qxs_zyb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nmsgKey\n\n</td><td>\n\nString\n\n</td><td>\n\nMessage key. This key is generated when an event is created. Table: In the Message key field in the Events \\[em\\_event\\] table.\n\n</td></tr><tr><td>\n\nalarmObject\n\n</td><td>\n\nObject\n\n</td><td>\n\nEvent payload to process. The format of this payload should correlate to the event type that is being processed. The schemas for these payloads are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject\n\n</td><td>\n\nObject\n\n</td><td id=\"responseObject-TMFEvtOOO-entry\">\n\nEmpty response object. Use this object to record any issues with the verification of the payload schema.Data type: Object\n\n```\n\"responseObject\": {\n  \"responseError\": {Object},\n  \"status\": \"String\",\n  \"successResponse\": {Object}\n}\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError\n\n</td><td>\n\nObject\n\n</td><td id=\"responseObject_responseError-TMFEvtOOO-entry\">\n\nDetails about any error that occurred during validation.```\n\"responseError\": {\n  \"details\": [Array],\n  \"errorMessage\": \"String\",\n  \"errorReason\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​details\n\n</td><td>\n\nArray\n\n</td><td id=\"responseObject_responseError_details-TMFEvtOOO-entry\">\n\nAny additional information to pass back to the calling routine.For example:\n\n```\nvar messageDetails = [];\nfor (var i = 0; i < validationResults.length; i++)\n  messageDetails.push(this.createErrorObject(validationResults[i].message, validationResults[i].dataPath));\nthis.responseObject.responseError.details = messageDetails;\nreturn this.responseObject\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​errorMessage\n\n</td><td>\n\nString\n\n</td><td id=\"responseObject_responseError_errorMessage-TMFEvtOOO-entry\">\n\nError message that describes the error that occurred. The available error messages are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​errorReason\n\n</td><td>\n\nString\n\n</td><td id=\"responseObject_responseError_errorReason-TMFEvtOOO-entry\">\n\nReason why the endpoint failed. The available error reasons are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​status\n\n</td><td>\n\nString\n\n</td><td id=\"responseObject_status-TMFEvtOOO-entry\">\n\nStatus of the function call. The available status messages are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​successResponse\n\n</td><td>\n\nObject\n\n</td><td id=\"responseObject_successResponse-TMFEvtOOO-entry\">\n\nSuccessful response from the function call. For example, you could store the payload object in this value.\n\n</td></tr></tbody>\n</table><table id=\"table_unr_qxs_zyb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nresponseObject\n\n</td><td>\n\nDetails about the status of the function call.```\n\"responseObject\": {\n  \"responseError\": {Object},\n  \"status\": \"String\",\n  \"successResponse\": {Object}\n}\n```\n\n</td></tr><tr><td>\n\nresponseObject.​status\n\n</td><td>\n\nStatus of the function call. The available status messages are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​successResponse\n\n</td><td>\n\nSuccessful response from the function call. For example, you could store the payload object in this value.\n\n</td></tr><tr><td>\n\nresponseObject.​responseError\n\n</td><td>\n\nDetails about any error that occurred during validation.```\n\"responseError\": {\n  \"details\": [Array],\n  \"errorMessage\": \"String\",\n  \"errorReason\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​details\n\n</td><td>\n\nAny additional information to pass back to the calling routine.For example:\n\n```\nvar messageDetails = [];\nfor (var i = 0; i < validationResults.length; i++)\n  messageDetails.push(this.createErrorObject(validationResults[i].message, validationResults[i].dataPath));\nthis.responseObject.responseError.details = messageDetails;\nreturn this.responseObject\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​errorMessage\n\n</td><td>\n\nError message that describes the error that occurred. The available error messages are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​errorReason\n\n</td><td>\n\nReason why the endpoint failed. The available error reasons are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr></tbody>\n</table>```\nprocessDeleteAlarm: function(additionalInfoObj, gr, deleteAlarmPayload, responseObject) {\nvar msgKey = this.transformAndPersistDeleteEvent(additionalInfoObj, gr);\nvar responsePayload = this.prepareEventAlarmRecordResponse(msgKey, deleteAlarmPayload, responseObject);\nthis._logger.logDebug(\"processDeleteAlarmEvent\");\nreturn responsePayload;\n},\n```\n\n## TMFTopicEventAPIUtilOOB - processAlarmChangeEvent\\(Object changeAlarmPayload\\)\n\nStarts the process of updating a record in the Event \\[em\\_event\\] table when the **eventType** is set to `AlarmChangeNotification`.\n\nThis function is called by the `AlarmChangeEvent` flow action. You can change the functionality of this function by overriding the default functionality in the `TMFTopicEventAPIUtil` script include.\n\n|Name|Type|Description|\n|----|----|-----------|\n|changeAlarm​Payload|Object|Event change payload to process. The payload should match the schema defined in `TMFAlarmAPIConstants.ALARM_CHANGE_EVENT_SCHEMA`.|\n\n<table id=\"table_unr_qxs_zyb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nresponseObject\n\n</td><td>\n\nDetails about the status of the function call.```\n\"responseObject\": {\n  \"responseError\": {Object},\n  \"status\": \"String\",\n  \"successResponse\": {Object}\n}\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError\n\n</td><td>\n\nDetails about any error that occurred during validation.```\n\"responseError\": {\n  \"details\": [Array],\n  \"errorMessage\": \"String\",\n  \"errorReason\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​details\n\n</td><td>\n\nAny additional information to pass back to the calling routine.For example:\n\n```\nvar messageDetails = [];\nfor (var i = 0; i < validationResults.length; i++)\n  messageDetails.push(this.createErrorObject(validationResults[i].message, validationResults[i].dataPath));\nthis.responseObject.responseError.details = messageDetails;\nreturn this.responseObject\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​errorMessage\n\n</td><td>\n\nError message that describes the error that occurred. The available error messages are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​errorReason\n\n</td><td>\n\nReason why the endpoint failed. The available error reasons are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​status\n\n</td><td>\n\nStatus of the function call. The available status messages are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​successResponse\n\n</td><td>\n\nSuccessful response from the function call. For example, you could store the payload object in this value.\n\n</td></tr></tbody>\n</table>```\nCalled by the `AlarmChangeEvent` flow action\n```\n\n## TMFTopicEventAPIUtilOOB - processAlarmCreateEvent\\(Object eventAlarmObject\\)\n\nStarts the process of creating a record in the Event \\[em\\_event\\] table when the **eventType** is set to `AlarmCreateNotification`.\n\nThis function is called by the `AlarmCreateEvent` flow action. You can change the functionality of this function by overriding the default functionality in the `TMFTopicEventAPIUtil` script include.\n\n|Name|Type|Description|\n|----|----|-----------|\n|eventAlarm​Object|Object|Event create payload to process. The payload should match the schema defined in `TMFAlarmAPIConstants.ALARM_CREATE_EVENT_SCHEMA`.|\n\n<table id=\"table_unr_qxs_zyb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nresponseObject\n\n</td><td>\n\nDetails about the status of the function call.```\n\"responseObject\": {\n  \"responseError\": {Object},\n  \"status\": \"String\",\n  \"successResponse\": {Object}\n}\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError\n\n</td><td>\n\nDetails about any error that occurred during validation.```\n\"responseError\": {\n  \"details\": [Array],\n  \"errorMessage\": \"String\",\n  \"errorReason\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​details\n\n</td><td>\n\nAny additional information to pass back to the calling routine.For example:\n\n```\nvar messageDetails = [];\nfor (var i = 0; i < validationResults.length; i++)\n  messageDetails.push(this.createErrorObject(validationResults[i].message, validationResults[i].dataPath));\nthis.responseObject.responseError.details = messageDetails;\nreturn this.responseObject\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​errorMessage\n\n</td><td>\n\nError message that describes the error that occurred. The available error messages are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​errorReason\n\n</td><td>\n\nReason why the endpoint failed. The available error reasons are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​status\n\n</td><td>\n\nStatus of the function call. The available status messages are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​successResponse\n\n</td><td>\n\nSuccessful response from the function call. For example, you could store the payload object in this value.\n\n</td></tr></tbody>\n</table>```\nCalled by `AlarmCreateEvent` flow action.\n```\n\n## TMFTopicEventAPIUtilOOB - processDeleteAlarmEvent\\(Object deleteAlarmPayload\\)\n\nStarts the process of clearing the alarm event in the Event \\[em\\_event\\] table when the **eventType** is set to `AlarmDeleteNotification`.\n\nThis function clears the state field and closes the event alarm. It also updates any parameters in the passed payload.\n\nThis function is called by the `AlarmDeleteEvent` flow action. You can change the functionality of this function by overriding the default functionality in the `TMFTopicEventAPIUtil` script include.\n\n|Name|Type|Description|\n|----|----|-----------|\n|deleteAlarm​Payload|Object|Event delete payload to process. The payload should match the schema defined in `TMFAlarmAPIConstants.ALARM_DELETE_EVENT_SCHEMA`.|\n\n<table id=\"table_unr_qxs_zyb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nresponseObject\n\n</td><td>\n\nDetails about the status of the function call.```\n\"responseObject\": {\n  \"responseError\": {Object},\n  \"status\": \"String\",\n  \"successResponse\": {Object}\n}\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError\n\n</td><td>\n\nDetails about any error that occurred during validation.```\n\"responseError\": {\n  \"details\": [Array],\n  \"errorMessage\": \"String\",\n  \"errorReason\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​details\n\n</td><td>\n\nAny additional information to pass back to the calling routine.For example:\n\n```\nvar messageDetails = [];\nfor (var i = 0; i < validationResults.length; i++)\n  messageDetails.push(this.createErrorObject(validationResults[i].message, validationResults[i].dataPath));\nthis.responseObject.responseError.details = messageDetails;\nreturn this.responseObject\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​errorMessage\n\n</td><td>\n\nError message that describes the error that occurred. The available error messages are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​errorReason\n\n</td><td>\n\nReason why the endpoint failed. The available error reasons are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​status\n\n</td><td>\n\nStatus of the function call. The available status messages are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​successResponse\n\n</td><td>\n\nSuccessful response from the function call. For example, you could store the payload object in this value.\n\n</td></tr></tbody>\n</table>```\nCalled by `AlarmDeleteEvent` flow action.\n```\n\n## TMFTopicEventAPIUtilOOB - transformAndPersistAlarmCreateEvent\\(Object alarmObject\\)\n\nTransforms the passed in create event payload using the associated create event mapping values and stores the information in Event \\[em\\_event\\] table.\n\nThis function is called by the [processAlarmCreateEvent\\(\\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/tmftopiceventapiutiloobScopedAPI.md) function as part of the flow action. You can change the functionality of this function by overriding the default functionality in the `TMFTopicEventAPIUtil` script include.\n\n|Name|Type|Description|\n|----|----|-----------|\n|alarmObject|Object|Payload to use to create a record in the Event \\[em\\_event\\] table. The payload should match the schema defined in `TMFAlarmAPIConstants.ALARM_CREATE_EVENT_SCHEMA`.|\n\n|Type|Description|\n|----|-----------|\n|String|Unique ID \\(Message key\\) of the event.|\n\nThis function is only called by the `AlarmCreateEvent` flow action, so no code example is provided.\n\n## TMFTopicEventAPIUtilOOB - transformAndPersistChangeEvent\\(Object additionalInfoObj, GlideRecord existingGr\\)\n\nTransforms the passed in change event payload using the associated change event mapping values and stores the updated information in the passed GlideRecord within the Event \\[em\\_event\\] table.\n\nThis function is called by the [processAlarmChangeEvent\\(\\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/tmftopiceventapiutiloobScopedAPI.md) function as part of the flow action. You can change the functionality of this function by overriding the default functionality in the `TMFTopicEventAPIUtil` script include.\n\n|Name|Type|Description|\n|----|----|-----------|\n|additional​InfoObj|Object|Payload to use to update the fields in the record specified in the **existingGr** parameter. The payload should match the schema defined in `TMFAlarmAPIConstants.ALARM_CHANGE_EVENT_SCHEMA`.|\n|existingGr|GlideRecord|GlideRecord of the event record in the Event \\[em\\_event\\] table to update.|\n\n|Type|Description|\n|----|-----------|\n|String|Unique ID \\(Message key\\) of the event.|\n\nThis function is only called by the `AlarmChangeEvent` flow action, so no code example is provided.\n\n## TMFTopicEventAPIUtilOOB - transformAndPersistDeleteEvent\\(Object additionalInfoObj GlideRecord existingGr\\)\n\nTransforms the passed in delete \\(clear\\) event payload using the associated delete event mapping values and stores the updated information in the passed GlideRecord within the Event \\[em\\_event\\] table.\n\nThis function is called by the [&gt;processAlarmDeleteEvent\\(\\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/tmftopiceventapiutiloobScopedAPI.md) function as part of the flow action. You can change the functionality of this function by overriding the default functionality in the `TMFTopicEventAPIUtil` script include.\n\n|Name|Type|Description|\n|----|----|-----------|\n|additional​InfoObj|Object|Payload to use to update the clear event fields in the record specified in the **existingGr** parameter. The payload should match the schema defined in `TMFAlarmAPIConstants.ALARM_DELETE_EVENT_SCHEMA`.|\n|existingGr|GlideRecord|GlideRecord of the event record in the Event \\[em\\_event\\] table for which to clear the alarm.|\n\n|Type|Description|\n|----|-----------|\n|String|Unique ID \\(Message key\\) of the event.|\n\nThis function is only called by the `AlarmDeleteEvent` flow action, so no code example is provided.\n\n## TMFTopicEventAPIUtilOOB - validateSubscription\\(Object eventAlarmObject, Object responseObject\\)\n\nPerforms validation on the subscription.\n\nThis validation includes checking if the callback URL used to make the event notification and the **eventType** in the payload are registered.\n\nThis function is called by the processAlarmCreateEvent\\(\\), processChangeAlarm\\(\\), and processDeleteAlarmEvent\\(\\) functions. You can change the functionality of this function by overriding the default functionality in the `TMFTopicEventAPIUtil` script include.\n\n<table id=\"table_tnr_qxs_zyb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\neventAlarm​Object\n\n</td><td>\n\nObject\n\n</td><td>\n\nEvent payload to validate. The format of this payload should correlate to the event type that is being processed. The schemas for these payloads are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject\n\n</td><td>\n\nObject\n\n</td><td id=\"responseObject-TMFEvtOOO-entry\">\n\nEmpty response object. Use this object to record any issues with the verification of the payload schema.Data type: Object\n\n```\n\"responseObject\": {\n  \"responseError\": {Object},\n  \"status\": \"String\",\n  \"successResponse\": {Object}\n}\n```\n\n</td></tr><tr><td>\n\nresponseObject.​status\n\n</td><td>\n\nString\n\n</td><td id=\"responseObject_status-TMFEvtOOO-entry\">\n\nStatus of the function call. The available status messages are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​successResponse\n\n</td><td>\n\nObject\n\n</td><td id=\"responseObject_successResponse-TMFEvtOOO-entry\">\n\nSuccessful response from the function call. For example, you could store the payload object in this value.\n\n</td></tr><tr><td>\n\nresponseObject.​responseError\n\n</td><td>\n\nObject\n\n</td><td id=\"responseObject_responseError-TMFEvtOOO-entry\">\n\nDetails about any error that occurred during validation.```\n\"responseError\": {\n  \"details\": [Array],\n  \"errorMessage\": \"String\",\n  \"errorReason\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​details\n\n</td><td>\n\nArray\n\n</td><td id=\"responseObject_responseError_details-TMFEvtOOO-entry\">\n\nAny additional information to pass back to the calling routine.For example:\n\n```\nvar messageDetails = [];\nfor (var i = 0; i < validationResults.length; i++)\n  messageDetails.push(this.createErrorObject(validationResults[i].message, validationResults[i].dataPath));\nthis.responseObject.responseError.details = messageDetails;\nreturn this.responseObject\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​errorMessage\n\n</td><td>\n\nString\n\n</td><td id=\"responseObject_responseError_errorMessage-TMFEvtOOO-entry\">\n\nError message that describes the error that occurred. The available error messages are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​errorReason\n\n</td><td>\n\nString\n\n</td><td id=\"responseObject_responseError_errorReason-TMFEvtOOO-entry\">\n\nReason why the endpoint failed. The available error reasons are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr></tbody>\n</table><table id=\"table_unr_qxs_zyb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nresponseObject\n\n</td><td>\n\nDetails about the status of the function call.```\n\"responseObject\": {\n  \"responseError\": {Object},\n  \"status\": \"String\",\n  \"successResponse\": {Object}\n}\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError\n\n</td><td>\n\nDetails about any error that occurred during validation.```\n\"responseError\": {\n  \"details\": [Array],\n  \"errorMessage\": \"String\",\n  \"errorReason\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​details\n\n</td><td>\n\nAny additional information to pass back to the calling routine.For example:\n\n```\nvar messageDetails = [];\nfor (var i = 0; i < validationResults.length; i++)\n  messageDetails.push(this.createErrorObject(validationResults[i].message, validationResults[i].dataPath));\nthis.responseObject.responseError.details = messageDetails;\nreturn this.responseObject\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​errorMessage\n\n</td><td>\n\nError message that describes the error that occurred. The available error messages are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​errorReason\n\n</td><td>\n\nReason why the endpoint failed. The available error reasons are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​status\n\n</td><td>\n\nStatus of the function call. The available status messages are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​successResponse\n\n</td><td>\n\nSuccessful response from the function call. For example, you could store the payload object in this value.\n\n</td></tr></tbody>\n</table>This function is only called by the `AlarmCHANGEEvent` flow action, so no code example is provided.\n\n## TMFTopicEventAPIUtilOOB - verifyAlarmChangeEventPayload\\(Object changeAlarmPayload, Object responseObject \\)\n\nProvides the ability to define additional verification of the passed in change event payload.\n\nThis function is called by the [processAlarmChangeEvent\\(\\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/tmftopiceventapiutiloobScopedAPI.md) function as part of the flow action. Currently there is no additional payload verification provided for the change payload. You can add functionality for this function by overriding the default functionality in the `TMFTopicEventAPIUtil` script include.\n\n<table id=\"table_tnr_qxs_zyb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nchangeAlarm​Payload\n\n</td><td>\n\nObject\n\n</td><td>\n\nPayload to verify. Payload should match the schema defined in `TMFAlarmAPIConstants.ALARM_CHANGE_EVENT_SCHEMA`.\n\n</td></tr><tr><td>\n\nresponseObject\n\n</td><td>\n\nObject\n\n</td><td id=\"responseObject-TMFEvtOOO-entry\">\n\nEmpty response object. Use this object to record any issues with the verification of the payload schema.Data type: Object\n\n```\n\"responseObject\": {\n  \"responseError\": {Object},\n  \"status\": \"String\",\n  \"successResponse\": {Object}\n}\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError\n\n</td><td>\n\nObject\n\n</td><td id=\"responseObject_responseError-TMFEvtOOO-entry\">\n\nDetails about any error that occurred during validation.```\n\"responseError\": {\n  \"details\": [Array],\n  \"errorMessage\": \"String\",\n  \"errorReason\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​details\n\n</td><td>\n\nArray\n\n</td><td id=\"responseObject_responseError_details-TMFEvtOOO-entry\">\n\nAny additional information to pass back to the calling routine.For example:\n\n```\nvar messageDetails = [];\nfor (var i = 0; i < validationResults.length; i++)\n  messageDetails.push(this.createErrorObject(validationResults[i].message, validationResults[i].dataPath));\nthis.responseObject.responseError.details = messageDetails;\nreturn this.responseObject\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​errorMessage\n\n</td><td>\n\nString\n\n</td><td id=\"responseObject_responseError_errorMessage-TMFEvtOOO-entry\">\n\nError message that describes the error that occurred. The available error messages are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​errorReason\n\n</td><td>\n\nString\n\n</td><td id=\"responseObject_responseError_errorReason-TMFEvtOOO-entry\">\n\nReason why the endpoint failed. The available error reasons are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​status\n\n</td><td>\n\nString\n\n</td><td id=\"responseObject_status-TMFEvtOOO-entry\">\n\nStatus of the function call. The available status messages are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​successResponse\n\n</td><td>\n\nObject\n\n</td><td id=\"responseObject_successResponse-TMFEvtOOO-entry\">\n\nSuccessful response from the function call. For example, you could store the payload object in this value.\n\n</td></tr></tbody>\n</table><table id=\"table_unr_qxs_zyb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nresponseObject\n\n</td><td>\n\nDetails about the status of the function call.```\n\"responseObject\": {\n  \"responseError\": {Object},\n  \"status\": \"String\",\n  \"successResponse\": {Object}\n}\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError\n\n</td><td>\n\nDetails about any error that occurred during validation.```\n\"responseError\": {\n  \"details\": [Array],\n  \"errorMessage\": \"String\",\n  \"errorReason\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​details\n\n</td><td>\n\nAny additional information to pass back to the calling routine.For example:\n\n```\nvar messageDetails = [];\nfor (var i = 0; i < validationResults.length; i++)\n  messageDetails.push(this.createErrorObject(validationResults[i].message, validationResults[i].dataPath));\nthis.responseObject.responseError.details = messageDetails;\nreturn this.responseObject\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​errorMessage\n\n</td><td>\n\nError message that describes the error that occurred. The available error messages are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​errorReason\n\n</td><td>\n\nReason why the endpoint failed. The available error reasons are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​status\n\n</td><td>\n\nStatus of the function call. The available status messages are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​successResponse\n\n</td><td>\n\nSuccessful response from the function call. For example, you could store the payload object in this value.\n\n</td></tr></tbody>\n</table>```\n // Apply customized validations if applicable, defaults to no error\nvar changePayloadResponse = this.verifyAlarmChangeEventPayload(changeAlarmPayload, this.responseObject);\nif (!gs.nil(changePayloadResponse.responseError.errorMessage))\n  return changePayloadResponse;\n```\n\n## TMFTopicEventAPIUtilOOB - verifyAlarmCreateEventPayload\\(Object alarmObject, Object responseObject\\)\n\nProvides the ability to define additional verification of the passed in create event payload.\n\nThis function is called by the [processAlarmCreateEvent\\(\\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/tmftopiceventapiutiloobScopedAPI.md) function as part of the flow action. Currently there is no additional payload verification provided for the create payload. You can add functionality for this function by overriding the default functionality in the `TMFTopicEventAPIUtil` script include.\n\n<table id=\"table_tnr_qxs_zyb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nalarmPayload\n\n</td><td>\n\nObject\n\n</td><td>\n\nPayload to verify. Payload should match the schema defined in `TMFAlarmAPIConstants.ALARM_CREATE_EVENT_SCHEMA`.\n\n</td></tr><tr><td>\n\nresponseObject\n\n</td><td>\n\nObject\n\n</td><td id=\"responseObject-TMFEvtOOO-entry\">\n\nEmpty response object. Use this object to record any issues with the verification of the payload schema.Data type: Object\n\n```\n\"responseObject\": {\n  \"responseError\": {Object},\n  \"status\": \"String\",\n  \"successResponse\": {Object}\n}\n```\n\n</td></tr><tr><td>\n\nresponseObject.​status\n\n</td><td>\n\nString\n\n</td><td id=\"responseObject_status-TMFEvtOOO-entry\">\n\nStatus of the function call. The available status messages are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​successResponse\n\n</td><td>\n\nObject\n\n</td><td id=\"responseObject_successResponse-TMFEvtOOO-entry\">\n\nSuccessful response from the function call. For example, you could store the payload object in this value.\n\n</td></tr><tr><td>\n\nresponseObject.​responseError\n\n</td><td>\n\nObject\n\n</td><td id=\"responseObject_responseError-TMFEvtOOO-entry\">\n\nDetails about any error that occurred during validation.```\n\"responseError\": {\n  \"details\": [Array],\n  \"errorMessage\": \"String\",\n  \"errorReason\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​details\n\n</td><td>\n\nArray\n\n</td><td id=\"responseObject_responseError_details-TMFEvtOOO-entry\">\n\nAny additional information to pass back to the calling routine.For example:\n\n```\nvar messageDetails = [];\nfor (var i = 0; i < validationResults.length; i++)\n  messageDetails.push(this.createErrorObject(validationResults[i].message, validationResults[i].dataPath));\nthis.responseObject.responseError.details = messageDetails;\nreturn this.responseObject\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​errorMessage\n\n</td><td>\n\nString\n\n</td><td id=\"responseObject_responseError_errorMessage-TMFEvtOOO-entry\">\n\nError message that describes the error that occurred. The available error messages are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​errorReason\n\n</td><td>\n\nString\n\n</td><td id=\"responseObject_responseError_errorReason-TMFEvtOOO-entry\">\n\nReason why the endpoint failed. The available error reasons are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr></tbody>\n</table><table id=\"table_unr_qxs_zyb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nresponseObject\n\n</td><td>\n\nDetails about the status of the function call.```\n\"responseObject\": {\n  \"responseError\": {Object},\n  \"status\": \"String\",\n  \"successResponse\": {Object}\n}\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError\n\n</td><td>\n\nDetails about any error that occurred during validation.```\n\"responseError\": {\n  \"details\": [Array],\n  \"errorMessage\": \"String\",\n  \"errorReason\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​details\n\n</td><td>\n\nAny additional information to pass back to the calling routine.For example:\n\n```\nvar messageDetails = [];\nfor (var i = 0; i < validationResults.length; i++)\n  messageDetails.push(this.createErrorObject(validationResults[i].message, validationResults[i].dataPath));\nthis.responseObject.responseError.details = messageDetails;\nreturn this.responseObject\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​errorMessage\n\n</td><td>\n\nError message that describes the error that occurred. The available error messages are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​errorReason\n\n</td><td>\n\nReason why the endpoint failed. The available error reasons are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​status\n\n</td><td>\n\nStatus of the function call. The available status messages are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​successResponse\n\n</td><td>\n\nSuccessful response from the function call. For example, you could store the payload object in this value.\n\n</td></tr></tbody>\n</table>```\n// Apply customized validations if applicable, defaults to no error\nvar creatPayloadResponse = this.verifyAlarmCreateEventPayload(eventAlarmObject, this.responseObject);\nif (!gs.nil(creatPayloadResponse.responseError.errorMessage))\n  return creatPayloadResponse;\n```\n\n## TMFTopicEventAPIUtilOOB - verifyDeleteEventPayload\\(Object deleteAlarmPayload, Object responseObject\\)\n\nProvides the ability to define additional verification of the passed in delete event payload.\n\nThis function is called by the [processDeleteAlarmEvent\\(\\)](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/api-reference/server-api-reference/tmftopiceventapiutiloobScopedAPI.md) function as part of the flow action. Currently there is no additional payload verification provided for the delete payload. You can add functionality for this function by overriding the default functionality in the `TMFTopicEventAPIUtil` script include.\n\n<table id=\"table_tnr_qxs_zyb\" class=\"parameters\"><thead><tr><th>\n\nName\n\n</th><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\ndeleteAlarm​Payload\n\n</td><td>\n\nObject\n\n</td><td>\n\nPayload to verify. Payload should match the schema defined in `TMFAlarmAPIConstants.ALARM_DELETE_EVENT_SCHEMA`.\n\n</td></tr><tr><td>\n\nresponseObject\n\n</td><td>\n\nObject\n\n</td><td id=\"responseObject-TMFEvtOOO-entry\">\n\nEmpty response object. Use this object to record any issues with the verification of the payload schema.Data type: Object\n\n```\n\"responseObject\": {\n  \"responseError\": {Object},\n  \"status\": \"String\",\n  \"successResponse\": {Object}\n}\n```\n\n</td></tr><tr><td>\n\nresponseObject.​status\n\n</td><td>\n\nString\n\n</td><td id=\"responseObject_status-TMFEvtOOO-entry\">\n\nStatus of the function call. The available status messages are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​successResponse\n\n</td><td>\n\nObject\n\n</td><td id=\"responseObject_successResponse-TMFEvtOOO-entry\">\n\nSuccessful response from the function call. For example, you could store the payload object in this value.\n\n</td></tr><tr><td>\n\nresponseObject.​responseError\n\n</td><td>\n\nObject\n\n</td><td id=\"responseObject_responseError-TMFEvtOOO-entry\">\n\nDetails about any error that occurred during validation.```\n\"responseError\": {\n  \"details\": [Array],\n  \"errorMessage\": \"String\",\n  \"errorReason\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​details\n\n</td><td>\n\nArray\n\n</td><td id=\"responseObject_responseError_details-TMFEvtOOO-entry\">\n\nAny additional information to pass back to the calling routine.For example:\n\n```\nvar messageDetails = [];\nfor (var i = 0; i < validationResults.length; i++)\n  messageDetails.push(this.createErrorObject(validationResults[i].message, validationResults[i].dataPath));\nthis.responseObject.responseError.details = messageDetails;\nreturn this.responseObject\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​errorMessage\n\n</td><td>\n\nString\n\n</td><td id=\"responseObject_responseError_errorMessage-TMFEvtOOO-entry\">\n\nError message that describes the error that occurred. The available error messages are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​errorReason\n\n</td><td>\n\nString\n\n</td><td id=\"responseObject_responseError_errorReason-TMFEvtOOO-entry\">\n\nReason why the endpoint failed. The available error reasons are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr></tbody>\n</table><table id=\"table_unr_qxs_zyb\" class=\"returns\"><thead><tr><th>\n\nType\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nresponseObject\n\n</td><td>\n\nDetails about the status of the function call.```\n\"responseObject\": {\n  \"responseError\": {Object},\n  \"status\": \"String\",\n  \"successResponse\": {Object}\n}\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError\n\n</td><td>\n\nDetails about any error that occurred during validation.```\n\"responseError\": {\n  \"details\": [Array],\n  \"errorMessage\": \"String\",\n  \"errorReason\": \"String\"\n}\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​details\n\n</td><td>\n\nAny additional information to pass back to the calling routine.For example:\n\n```\nvar messageDetails = [];\nfor (var i = 0; i < validationResults.length; i++)\n  messageDetails.push(this.createErrorObject(validationResults[i].message, validationResults[i].dataPath));\nthis.responseObject.responseError.details = messageDetails;\nreturn this.responseObject\n```\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​errorMessage\n\n</td><td>\n\nError message that describes the error that occurred. The available error messages are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​responseError.​errorReason\n\n</td><td>\n\nReason why the endpoint failed. The available error reasons are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​status\n\n</td><td>\n\nStatus of the function call. The available status messages are defined in the `TMFAlarmAPIConstants` script include.\n\n</td></tr><tr><td>\n\nresponseObject.​successResponse\n\n</td><td>\n\nSuccessful response from the function call. For example, you could store the payload object in this value.\n\n</td></tr></tbody>\n</table>```\n// Apply customized validations if applicable, defaults to no error\nvar deletePayloadResponse = this.verifyDeleteEventPayload(deleteAlarmPayload, this.responseObject);\nif (!gs.nil(deletePayloadResponse.responseError.errorMessage))\n  return deletePayloadResponse;\n```\n\n"}}