Product documentation

02. HTTP_WEB_HOOK_ROUTINE

This executes an http request based on the data configured in the routine. The data between {{ }} is replaced with the data coming from the related event.

ex: {{trackableId}} will be replaced with the event trackable id. The field executionOrder configures the order of the routines executions in case a managed event has more than one routine assigned.

{
  "name": "http_post_web_hook",
  "rootVenueScopeId": "42",
  "description": "This routine executes an http request.",
  "routineType": "HTTP_WEB_HOOK_ROUTINE",
  "body": "trackableId={{trackableId}},geofenceId={{geofenceId}},eventType={{eventType}}, assetName={{name}}, externalId={{externalId}}, custom_prop_name={{custom_prop_name}} event_custom_data={{event_custom_data}}",
  "requestUrl": "http://localhost:1080/test_path?query_string_param={{trackableId}}",
  "httpMethod": "POST",
  "httpHeaders": {
    "custom_http_header": "custom_http_header_value"
  },
  "executionOrder": 1,
  "conditionalExpression":"assignedAssetDto!=null",
  "remoteExecutorAgentId": "125487"
}
FieldDescriptionPossible values
nameThe name of the routine.

Any text (has to be unique)
For example:
  • “http_post_web_hook”
descriptionThe description of the routine.Any text.
For example:
  • “This routine executes an http request.”
rootVenueScopeIdDelivered by Favendo. This is the ID of the venue.A specific integer
routineTypeThe type of the routine.HTTP_WEB_HOOK_ROUTINE
bodyOnly needed when the routineType “HTTP_WEB_HOOK_ROUTINE” is selected.Body of the webhook (optional)
requestUrlOnly needed when the routineType “HTTP_WEB_HOOK_ROUTINE” is selected.URL of the webhook
httpMethodOnly needed when the routineType “HTTP_WEB_HOOK_ROUTINE” is selected.
  • DELETE
  • GET
  • HEAD
  • OPTIONS
  • PATCH
  • POST
  • PUT
  • TRACE
httpHeadersOnly needed when the routineType “HTTP_WEB_HOOK_ROUTINE” is selected.Header of the webhook (optional)
TitleOnly needed when the routineType “NOTIFICATION” is selected.N.A.
TextOnly needed when the routineType “NOTIFICATION” is selected.N.A.
PriorityOnly needed when the routineType “NOTIFICATION” is selected.N.A.
targetListOnly needed when the routineType “NOTIFICATION” is selected.N.A.
durationInSecondsOnly needed when the routineType “NOTIFICATION” is selected.N.A.
executionOrderDescribes the order of the routines executions in case a managed event has more than one routine assigned.Integer
conditionalExpressionCondition that needs to be met in order for the routine to be executed.
It is expressed in SpEL, and it always needs to return a boolean value.
The expression can also reference properties from the triggered event. 

If the field is empty, the routine is always executed (defaults to true).

For SpEL docs see https://docs.spring.io/spring-framework/docs/4.1.x/spring-framework-reference/html/expressions.html
Spring expression language.
See 04. Spring expression language for more information.