The SNEventSenderProvider API provides a method to instantiate an IEventSender instance.

Use this API when writing scripts that will run on MID Servers to instantiate the object to send an event to your ServiceNow instance.

Use the IEventSender API to send the event to the ServiceNow instance. Use the Event API to add/update fields within an event.

You must activate the Event Management (com.glideapp.itom.snac) plugin before attempting to access this API. The Event Management plugin requires a separate subscription and must be activated. This plugin includes demo data and activates related plugins if they are not already active.

For additional information on event management, see Event Management.

EventSender - getEventSender()

Returns an IEventSender object to use to send events from a MID Server to a ServiceNow instance.

You must call this method before calling any IEventSender API methods.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
IEventSender IEventSender object to use to send an event to a ServiceNow instance.

Example

var eventSender = SNEventSenderProvider.getEventSender();