How to Setup Heartbeat Messages

Heartbeat messages can be used to help identify if the integration is up or down. Both inbound and outbound heartbeat messages are supported.

The Heartbeat Message

Create a new Message and select type Heartbeat. Although specific configuration is not required, you can configure Heartbeat messages as you would any other message. The only difference is the Heartbeat transactions are bonded to the active connection.

You should only have one active Heartbeat message per integration. Activating an outbound Heartbeat message will create a scheduled job which sends the message according to the frequency set on the Integration.

No response message is required for Heartbeat messages unless you would like to customise how responses are sent and received.

Outbound

When an outbound heartbeat message is sent and fails, the integration will be paused and its Status marked as "Down". This will force all outbound messages to be queued. When a future outbound heartbeat message is successful, the integration will be resumed and its Status marked as "Up".

The frequency of outbound heartbeat messages is controlled by the Heartbeat Frequency setting on the Integration. By default, this is set to 300 seconds (5 minutes), meaning a heartbeat is sent every 5 minutes to the endpoint specified by the connection and message.

A heartbeat is seen to fail when it does not receive a 2xx status code response, e.g. 200. If you need to support other status codes, you can use Response Actions to intercept and modify the request response.

To help identify heartbeat messages, all outbound heartbeat messages contain the header x-snd-eb-heartbeat with a value of 1.

Inbound Heartbeat Messages

You can allow third party systems to send a heartbeat request. A Heartbeat message configured for Inbound processing is required. It can be configured to operate similarly to any other message, although no additional configuration is required.

Inbound heartbeats will run through the full connection process for the integration. By default, a 200 response is returned when authentication and Heartbeat message processing has been successful.

Check for Heartbeat Example

POST https://myinstancename.service-now.com/api/x_snd_eb/unifi/incident

Example to send a Heartbeat message to check if the API is available.

Headers