Create Event Rule (US)

Allows you to create and define a Rule and its logic (based on the combination of Operators and Conditions) for future events creation within Otonomo's platform.

When the conditions are met an event will be triggered and sent to the configured callback URL.
Read about Events: Create Callback (US)

📘

Read more about Error Codes.

📘

Postman Collection

Use the link below to download Otonomo's collection

Run in PostmanRun in Postman

There are two types of conditions that can be used to define the rule's logic:

  1. Geo Condition - Based on a Polygon inserted by the user
  2. Attribute Condition - Based on supported attributes on Otonomo's platform

Rule Logic configuration allows the existence of a single condition or multiple conditions as follows:

  • Single Condition - Static value (Geo condition or Attribute condition)
    [Operator, "attr:Attribute_Name",Selected_Static_Value]

    "rule_logic": [">=", "attr:vehicle_fuel_level",60],

  • Single Condition - Dynamic Value (Attribute as selected value)
    [Operator, "attr:Attribute_Name","attr:Attribute_Name"]

    "rule_logic": [">=", "attr:mobility_speed_value","attr:environment_road_speed_limit"],

  • Multiple Conditions (Attribute condition & Geo condition)
    Condition_1:[Operator, "attr:Attribute_Name",Selected_Static_Value], Condition_2:[Operator, "geo","{“type”:“Feature”,“properties”:{}, “geometry”:{“type”:“Polygon”, “coordinates”:[Coordinates_Array]]

    "rule_logic": [“AND” , [“>=“, “attr:fuel_level”,50], [“ENTER”, “geo”,{“type”:“Feature”,“properties”:{},
    “geometry”:{“type”:“Polygon”,
    “coordinates”:[[[34.78700637817383,32.13826333972435],
    [34.73945617675781,32.058427359636184],
    [34.77945327758789,32.03514691625102],
    [34.836273193359375,32.129250750311066],
    [34.78700637817383,32.13826333972435]]]}}]]

👍

Supported Operators

OperatorDescription
==Equal To
!=Not Equal To
>Greater Than
>=Greater Than 'OR' Equal To
<Lower Than
<=Lower Than 'OR' Equal To
-Subtraction
+Addition
ANDand
ORor
ENTERenter
EXITexit

👍

Supported Attributes

See the following attributes list that can be used within a rule logic configuration:
Attributes: Fleet Points Data Set

Language