How do I use the Dynamic Listener flow?

Orbita has an endpoint that dynamically captures and processes new data (Tasks, Survey, Healthcare Data, and Rules) to Experience Designer.

New data that is obtained from any of the following sources is stored in the database.

  • Health Care Data. Heart Rate, Blood Pressure, Step Count, Calories Burnt, and so on.

  • Task. Accept / Reject.

  • Rule. Figured.

  • Survey. Completed.

Health Care Data should be structured before storing it in the database because it is sourced from third-party applications.

As soon as the new data is stored in the database, the dynamic listening endpoint is triggered in the Experience Designer, and the respective flow is executed thereafter.

Dynamic Listener

The structure of endpoint is /orbita/data/:name. This endpoint constantly monitors for any new data (Task, Rule, Healthcare Data or Survey) that is added to the database.

Note: In the above code parameter, name assumes the collection. It can be data from Tasks, Rules, Survey, or any of the Health Care Data.

You must place /orbita/data/:name in the http node.

  1. Go to or search for http node.

  2. Drag and drop the http in node into the canvas.

  3. Double click the http in node to edit the settings.

  4. Enter the following information:

    • Method. Mention if the URL provided is to post or get data. Should be set POST for Dynamic Listener node.

    • URL. Place the URL of the endpoint (/orbita/data/:name).

    • Name. Enter a name for the function.

Post-processing data

After the Dynamic Listener fetches new data to Experience designer, you can create custom flows to use the data. For example, the following flow captures and compares today’s weight data, from the tasks, with the previous day’s weight data and creates an alert if the difference is greater than # pounds.

The Switch node is used to separate the flows based on the data type received.

In the example, the Switch node (is Weight?) is linked after the http node to perform logical operations based on the parameter name.

The following image shows that the switch node checks if the data received, is that of a survey or bodyweight and sends the output accordingly.

The parameter name can assume the following values.

Perform Exercise

  • journey_exercise

Take medication

  • journey_medication

Data Collection

  • ambienttemperature

  • bloodglucose

  • bloodoxygen

  • bloodpressure

  • bodyfatpercentage

  • bodyheight

  • bodymass

  • bodytemperature

  • bodyweight

  • caloriesburned

  • caloriesintake

  • heartrate

Survey

  • survey_surveydata

Simple Task

  • task

Rule

  • notification

The function node (Get Weight) contains the logic on what kind of data to be read.

Read Health data grabs specific health data based on the measurement value provided.

Measurement values

  • body fat

  • body mass index

  • calories

  • calories burned

  • calories intake

  • glucose

  • blood glucose

  • sugar

  • sugar level

  • heart rate

  • pulse

  • height

  • oximetry

  • oxygen

  • oxygen level

  • resting heart rate

  • skin temperature

  • sleep duration

  • spo2

  • temperature

  • body temperature

  • outside temperature

  • room temperature

  • weight

  • weigh

  • blood pressure

  • spirometry

  • steps

  • step count

  • walk

  • rr Interval

  • medicine

  • medication

  • pills

  • drugs

  • prescription

The function contains (Get Weight) the logic to get the current weight and the weight of the previous day and compare.

The Dynamic Data manager is used to create an alert based on the compared result.

Also see, How to mark a task complete, based on the posted data

Related Articles