Originator Attributes
Most rule engine nodes work only with what is already in the message. Use this node to pull in additional context — device attributes, shared configuration values, or the latest sensor reading — and attach it to the message so that downstream nodes can act on it.
For example: fetch a tempThreshold server attribute and add it to metadata, then let a Script node compare the current telemetry against it without needing to query the database itself.
Configuration
Section titled “Configuration”- Client attributes — List of client-side attribute keys to fetch. Fetched keys are prefixed with
cs_. - Shared attributes — List of shared attribute keys to fetch. Fetched keys are prefixed with
shared_. - Server attributes — List of server-side attribute keys to fetch. Fetched keys are prefixed with
ss_. - Latest telemetry — List of time series keys for which to fetch the latest values. These keys are not prefixed.
- Fetch latest telemetry with timestamp — When enabled, telemetry values are returned as a JSON object containing both value and timestamp:
{"ts": 1672531200000, "value": "42"}. When disabled, only the raw value is returned.
- Fetch latest telemetry with timestamp — When enabled, telemetry values are returned as a JSON object containing both value and timestamp:
- Add originator attributes to — Destination for the fetched data:
- Message: Adds the fetched key-value pairs to the message data. The message data must be a JSON object.
- Metadata: Adds the fetched key-value pairs to the message metadata.
- Tell failure if attribute or telemetry are missing — When enabled, the message is routed via
Failureif any of the specified keys do not exist on the originator entity. When disabled, missing keys are silently ignored and the message proceeds viaSuccesswith whatever was found.
Message processing algorithm
Section titled “Message processing algorithm”- The node identifies the originator of the incoming message (e.g., the specific Device or Asset).
- It asynchronously requests the attributes and latest telemetry values specified in the configuration for that originator.
- The node checks if all requested keys were found. If Tell failure if attribute or telemetry are missing is enabled and any key is missing, the original message is routed to the
Failureconnection with an error detailing the missing keys. - For each successfully fetched attribute, a prefix is added to its key:
- Client attributes:
cs_ - Shared attributes:
shared_ - Server attributes:
ss_ - Time series keys are not prefixed.
- Client attributes:
- Based on the Add originator attributes to setting, the node adds the new key-value pairs to either the message data or the message metadata.
- The enriched message is sent via the
Successconnection.
Output connections
Section titled “Output connections”| Connection | Condition |
|---|---|
Success | The message is successfully enriched with the requested data |
Failure | An error occurred during data fetching, or a requested key was not found with Tell failure if absent enabled |
Examples
Section titled “Examples”Example 1 — Enriching metadata with a server attribute
Section titled “Example 1 — Enriching metadata with a server attribute”Scenario: a device sends a temperature reading. Fetch the device’s tempThreshold server attribute into metadata so a downstream Script node can compare the two.
Incoming message metadata:
{ "deviceName": "Thermostat-A7", "deviceType": "thermostat"}Node configuration:
{ "fetchTo": "METADATA", "serverAttributeNames": ["tempThreshold"], "clientAttributeNames": [], "sharedAttributeNames": [], "latestTsKeyNames": [], "tellFailureIfAbsent": true, "getLatestValueWithTs": false}Originator state: device has server-side attribute tempThreshold = 25.
Outgoing message metadata:
{ "deviceName": "Thermostat-A7", "deviceType": "thermostat", "ss_tempThreshold": "25"}The node fetched the server attribute, prefixed it with ss_, and added it to metadata.
Example 2 — Enriching data with latest telemetry (no timestamp)
Section titled “Example 2 — Enriching data with latest telemetry (no timestamp)”Incoming message data:
{ "pressure": 1013 }Node configuration:
{ "fetchTo": "DATA", "latestTsKeyNames": ["temperature", "humidity"], "serverAttributeNames": [], "clientAttributeNames": [], "sharedAttributeNames": [], "tellFailureIfAbsent": false, "getLatestValueWithTs": false}Outgoing message data:
{ "pressure": 1013, "temperature": 25.5, "humidity": 40.7}Example 3 — Enriching metadata with latest telemetry (no timestamp)
Section titled “Example 3 — Enriching metadata with latest telemetry (no timestamp)”Incoming message metadata:
{ "deviceName": "Thermostat-A7", "deviceType": "thermostat"}Node configuration:
{ "fetchTo": "METADATA", "latestTsKeyNames": ["temperature", "humidity"], "serverAttributeNames": [], "clientAttributeNames": [], "sharedAttributeNames": [], "tellFailureIfAbsent": false, "getLatestValueWithTs": false}Outgoing message metadata:
{ "deviceName": "Thermostat-A7", "deviceType": "thermostat", "humidity": "40.7", "temperature": "32.2"}Note: telemetry keys fetched to metadata are stored as strings.
Example 4 — Enriching data with latest telemetry (with timestamp)
Section titled “Example 4 — Enriching data with latest telemetry (with timestamp)”Incoming message data:
{ "pressure": 1013 }Node configuration:
{ "fetchTo": "DATA", "latestTsKeyNames": ["temperature", "humidity"], "serverAttributeNames": [], "clientAttributeNames": [], "sharedAttributeNames": [], "tellFailureIfAbsent": false, "getLatestValueWithTs": true}Outgoing message data:
{ "pressure": 1013, "temperature": { "ts": 1756479586801, "value": 32.2 }, "humidity": { "ts": 1756479659223, "value": 40.7 }}Example 5 — Enriching metadata with latest telemetry (with timestamp)
Section titled “Example 5 — Enriching metadata with latest telemetry (with timestamp)”Same configuration as Example 4 but with "fetchTo": "METADATA". Telemetry values are serialized as JSON strings in metadata:
Outgoing message metadata:
{ "deviceName": "Thermostat-A7", "deviceType": "thermostat", "humidity": "{\"ts\":1756479659223,\"value\":40.7}", "temperature": "{\"ts\":1756479586801,\"value\":32.2}"}JSON schema
Section titled “JSON schema”{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "TbGetAttributesNodeConfiguration", "type": "object", "required": ["fetchTo"], "additionalProperties": false, "properties": { "fetchTo": { "type": "string", "enum": ["DATA", "METADATA"], "description": "Destination for the fetched data (message data or metadata)." }, "clientAttributeNames": { "type": "array", "items": { "type": "string" }, "description": "Set of client-side attribute keys to fetch." }, "sharedAttributeNames": { "type": "array", "items": { "type": "string" }, "description": "Set of shared attribute keys to fetch." }, "serverAttributeNames": { "type": "array", "items": { "type": "string" }, "description": "Set of server-side attribute keys to fetch." }, "latestTsKeyNames": { "type": "array", "items": { "type": "string" }, "description": "Set of time series keys for which to fetch the latest values." }, "getLatestValueWithTs": { "type": "boolean", "description": "If true, fetches telemetry with its timestamp as a JSON object." }, "tellFailureIfAbsent": { "type": "boolean", "description": "If true, routes the message to Failure if any key is not found." } }}