Subscribe to request for entry updates
Send the result of each Employee Health Screening entry request to a third-party system by configuring a webhook.
Before you begin
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.
Note: 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.
Role required: sn_imt_core.admin or admin
Procedure
Navigate to All > Employee Health and Safety Status > Outbound Webhooks.
In the Webhook [sn_imt_core_webhook] table, click New.
On the form, fill in the fields.
| 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.Note: 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 |
| Active | Option to set the record to active. |
- Click Submit.
Result
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 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 |