Receiving EventNotification data from Plugin

The Event Service is a REST/JSON web service which conforms to contracts so that it is compatible with the Event Plugin that is sending messages. Corrigo can provide a C# solution that provides basic functionality of this service. Or, developers may choose to build their own web service that conforms to the same contracts.

The function of this service is to receive EventNotification messages and use the data contained in the message as input to external interfaces. Typically, the service resides on the same local network as the integrated system interface and/or database. Because of this, an Event Service may NOT be hosted by Corrigo.

This is an extremely simple service, with only 1 method, Notify. This method receives only one argument which conforms to the EventNotification class. Developers can now receive message data directly from Corrigo Enterprise, in real time. This message data can be unpacked and used for any integration purpose.

public IHttpActionResult Notify([FromBody]DataToSend notification)
{
  //unpack EventNotification data
  //send to target API
  //return success/failure
  if(error)
  {
    throw new Exception("Error message here");
  }
	return Ok();
}