Subscribe to request for entry updates

  • Freigeben Version: Australia
  • Aktualisiert 12. März 2026
  • 2 Minuten Lesedauer
  • Send the result of each Employee Health Screening entry request to a third-party system by configuring a webhook.

    Vorbereitungen

    Sending outbound webhook calls requires the following plugins.
    • ServiceNow Integration Hub Runtime (com.glide.hub.integration.runtime)
    • Workflow Studio Action Step - Payload Builder (com.glide.hub.action_step.payload)
    • ServiceNow Integration Hub Action Step - REST (com.glide.hub.action_step.rest)
    These plugins must be requested through the Now Support Service Catalog. For instructions, see Request a plugin.
    When you set up the webhook, the system automatically sends a REST request to a third-party endpoint every time an employee or visitor requests entry. Work with an administrator for the third-party system to determine the correct endpoint to provide.
    Hinweis:
    The webhook does not include authentication headers in the request. Ensure that you provide an endpoint that includes query parameters to authenticate the request.

    To learn more about the Employee Health Screening Request Entry module, see Conduct a health screen for entry Screen an employee for return to the workplace.

    Role required: sn_imt_core.admin or admin

    Prozedur

    1. Navigate to All > Employee Health and Safety Status > Outbound Webhooks.
    2. In the Webhook [sn_imt_core_webhook] table, click New.
    3. On the form, fill in the fields.
      Tabelle : 1. Webhook form
      Field Description
      Name Internal identifier for the third-party endpoint.
      Event Event that you want to subscribe to. Options include:
      • Employee requested entry: Sends an update every time an employee requests entry.
      • Visitor requested entry: Sends an update every time a visitor requests entry.
      Endpoint Endpoint to send the Employee Health Screening Request Entry data to.
      Hinweis:
      The webhook does not include authentication headers in the request. Ensure that you provide an endpoint that includes query parameters to authenticate the request.
      Secure parameters Query parameters for the endpoint that must be handled securely, such as an authorization token. Provide parameters in the format ?param1=value&param2=othervalue.
      Tipp:
      If the third-party system that you're sending data to doesn't provide a securely generated authorization token, you can generate a token in your ServiceNow instance with the following script.
      var secureRandom = GlideSecureRandomUtil;
      var secret = secureRandom.getSecureRandomString(30);
      gs.log(secret);
      Active Option to set the record to active.
    4. Click Submit.

    Ergebnisse

    The Employee Health Screening application sends request entry data to the third-party endpoint every time an employee requests entry. The JSON payload contains the following data.
    {
      "event": "entry.requested",
      "email": "aileen.mottern@example.com",
      "username": "aileen.mottern",
      "user_id": "a8f98bb0eb32010045e1a5115206fe3a",
      "location": "San Antonio",
      "location_id": "108486c7c611227500b093211aa88dcc",
      "access_granted": false,
      "updated": "2020-07-01 22:19:03"
    }
    Property Description
    event Type of event defined in the Webhook table.

    Data type: String

    email Email address of the employee.

    Data type: String

    username Username of the employee from the Health and Safety Users [sn_imt_core_health_and_safety_user] table.

    Data type: String

    user_id Sys_id of the user record from the Health and Safety Users [sn_imt_core_health_and_safety_user] table.

    Data type: String

    location Location of the health screening.

    Data type: String

    location_id Sys_id of the location record from the Location [cmn_location] table.

    Data type: String

    access_granted Flag that indicates whether the employee was granted access as a result of the health screening. Valid values:
    • true: The employee passed the health screening and was granted access.
    • false: The employee did not pass the health screening and was not granted access.

    Data type: Boolean

    updated Date and time when the employee or visitor requested entry.

    Data type: Date/Time