Incident Preview

Note: This page has not yet been converted to the new developer portal format. Please use Swagger to test this API.

Incident Preview

Preview the contacts/groups (Static as well as Dynamic), message texts, settings, and other information that will be used in the notification.

🚧

Deprecation warning

POST incidents/preview/{organizationId} will be deprecated.
Use POST incidents/{organizationId}/preview instead

POST incidents/{organizationId}/preview

The minimum request body:

Launch

{
  "id": -1,
  "name": "preview",
  "incidentAction": "Launch",
  "incidentPhases": [
    {
      "phaseTemplate": {
        "templateId": "4402341479635"
      }
    }
  ]
}

Update

{
  "id": "28904487957655",
  "name": "preview",
  "incidentAction": "Update",
  "incidentPhases": [
    {
      "phaseTemplate": {
        "templateId": 4402341479635
      }
    }
  ]
}

📘

Other fields

The other json fields are the same as Launch/Update Incident API.

Post Parameters

NameTypeOptional?Description
idlongnThe Incident ID. This is required for incidentAction “Update”, “UpdateThenClose”, and “CloseWithNotification”
incidentActionstringnenum {“Launch”, “LaunchThenClose”, “Update”, “UpdateThenClose”, “closeWithNotification”}
incidentPhases.phaseTemplate.templateIdlongnTemplate ID.
namestringnIncident name. This is required for incident update preview, optional for incident launch preview.
enableMessageTruncatebooleann21.4.0 - Truncate the message by 2500 f the value is true.
22.2.0 - Truncate the custom SMS message by 2500 if the value is true.
NOTE:
◊ Truncating SMS to 2500 is a guardrail (if enableMessageTruncate boolean is true) but the SMS message will still be 160 characters or 459 characters according to the organization setup

Response

{
  "message": "OK",
  "result": {
    "id": 999999999,
    "name": "Incident preivew test",
    "notificationInfo": {
      "messageFlag": 1,
      "contactsFlag": 0,
      "settingsFlag": 1,
      "permissionMessages": "CONTACTS HAS NO VIEW PERMISSION",
      "message": {
        "title": "Message Title",
        "textMessage": "This is a test message",
        "messageLength": 35,
        "estimatedSmsCount": 1,
        "rtfMessage": "<meta id=\"meta\" name=\"viewport\" content=\"width=device-width; initial-scale=1.0\">rtf message body",
        "conferenceBridgeName": "conference 1",
        "rtfViewMessage": "<!doctype html>\n        <html>\n        <head>\n            <meta charset=\"UTF-8\">\n           <title>incident-4852</title>\n        </head>\n\n        <body style=\"font-family: Helvetica, Arial; line height:1.5\">\n        <!-- Header start-->\n        <div>\n            <div>\n            </div>\n            <!-- Header end-->\n            <!-- Messages  start-->\n            <div   >\n                <p> pre message\r\nIncidentID: 999999999   \r\nMessage Sender: parker yan   \r\npostmessage</p>\n                <div style=\"margin:30px 0px\">\n                </div>\n            </div>\n            <!-- Messages end-->\n            <!-- Footer start-->\n            <div style=\"color:#777777; margin-top:20px\">\n                <hr/><p style=\"text-align:center;\">To stop receiving future email notifications from this organization <a href=http://unsubscribe.url/0w7GGjjxnZ3UU4-MLFxnu-p9fasug0Ckpkoy9oHfJadv3vm5ddtHaHJRJF2f-uBKj-D-gkghaQYxppvKTRpvG_503lCSO6DIMo5apPPH_HFq7QOlEbciHt1EBN08ruAVkGunYeFYvrgKDxwUcc3NRbRbBJ5tt47vBo9Izx_uCboYBc5UcIbloC7fWGcAzSCkN_ngDjATMQQYO2rr5_YQcbXr6EPUIpm3jowgkrd0v8NrAGrtZfr_5T4aohAvhEJE5pkEgbRKd6eOHqiRWez-egRuoZlDmjVbmy1F94nFJSEE-P9jaFyHwKOvBxqxzaTiCg8cFHHNzUUyx6obJbdSeKbCIKar47ArnqcskKI_4MCkgHdWn6_eBSo9SFVKKKLIQ68ejeMol9akgHdWn6_eBRj4AgCF_seV?language=en-US style=\"color:#0000EE;font-weight:bold;text-decoration:underline;\">unsubscribe here</a>.</p></div>\n        </div>\n        <!--Footer end-->\n        </body>\n        </html>\n",
        "textSmsViewMessage": "smsPSC sms message https://neconfirm-dev3.everbridge.net/n#xxxxxxxxx",
        "questionaire": {
          "inputOptionAllowable": false,
          "multipleSelected": false,
          "answers": [
            {
              "quotaNum": 2,
              "name": "request1"
            },
            {
              "quotaNum": 2,
              "name": "request2"
            }
          ],
          "required": false
        }
      },
      "contacts": {
        "staticContacts": {
          "totalContactCount": 2,
          "individualCount": 1,
          "groupContactCount": 2,
          "ruleContactCount": 1,
          "mapContactCount": 0,
          "groupInfo": [
            {
              "id": 241896853078135,
              "name": "New Group"
            }
          ],
          "ruleInfo": [
            {
              "id": 241896853078036,
              "name": "rule2"
            }
          ]
        },
        "conditionsContacts": {
          "totalContactCount": 2,
          "individualCount": 1,
          "groupContactCount": 2,
          "ruleContactCount": 1,
          "mapContactCount": 0,
          "groupInfo": [
            {
              "id": 241896853078135,
              "name": "New Group"
            }
          ],
          "ruleInfo": [
            {
              "id": 241896853078036,
              "name": "rule2"
            }
          ]
        },
        "incidentRuleContacts": {
          "individualRuleContactCount": 1,
          "incidentGroupContactCount": 1,
          "groupInfo": [
            {
              "id": 241896853078132,
              "name": "ContactGroup1"
            }
          ]
        }
      },
      "settings": {
        "deliveryPathOrder": "Organization",
        "deliverPaths": [
          {
            "pathId": 241901148045316,
            "id": 1328214341321110,
            "seq": 1,
            "prompt": "email1"
          },
          {
            "pathId": 219910915489799,
            "id": 1328214341321127,
            "seq": 18,
            "prompt": "Phone 4"
          }
        ]
      },
      "priority": "NonPriority",
      "enableLifeSafety": false,
      "enableExerciseMode": false,
      "type": "Quota"
    }
  }
}

Response Details

NodeComments
idIf incidentAction is Launch or LaunchThenClose then this value will always be 999999999.
messageFlagUse bits to indicate permissions, 1: VIEW, 2: EDIT, 3:VIEW & EDIT, 0: NO PERMISSION, Boolean hasEditPermission = (2 & messageFlag) == 2;
permissionMessages"CONTACTS HAS NO VIEW PERMISSION", or "SETTINGS HAS NO VIEW PERMISSION", "SETTINGS AND CONTACTS HAVE NO VIEW PERMISSION"
messageLengthThe sum of messageTitle length and messageBody length
estimatedSmsCountRough estimate of sms count,based on 120 characters for each sms.
rtfMessageThis may not be present if there is no rtf content
conferenceBridgeNameThis field is only present if notification type is Conference
questionaireOnly present if notification type is Polling or Quota
deliveryPathOrderEnum: Account, Organization, Contact or Custom
typeEnum: Standard, Polling, Conference, Quota

Error Codes

StatusMessage
400Missing or invalid request input.
401Invalid or missing credentials.
500Internal Error.