Associate Payload with Correct UID Node Configuration Guide

The Associate Payload with Correct UID Node is designed to intelligently map incoming data to the correct device using values within the payload itself. This is particularly useful when working with array-based or nested data structures where the UID

What It Does

This node extracts or constructs a UID from within the incoming JSON payload, then uses that UID to associate the data with the corresponding device in the system. It can also handle arrays, apply filters, and repackage the data so each item in an array becomes its own payload, if desired.

In addition, the node can assign a timestamp to each payload based on a value found in the payload, ensuring that all data entering Rayven is accurately time-stamped.


 Step-by-Step: How to Configure the Associate Payload with Correct UID Node

1. Add the node

Drag the Associate Payload with Correct UID node onto the canvas from the Transformers section.

2. Define the node name

Give your node a clear name that reflects its role in the workflow (e.g., "UID Mapper - Weather Sensor").

3. Configure UID extraction

Set the Incoming UID JSON key (e.g., meta.device_info.serial).
If this key leads to a compound string, use Delimiter (e.g., :) and Index to extract the correct portion. Indexing starts at 0.

4. Choose UID assignment strategy

  • Enable Use incoming UID + extracted string to concatenate both.

  • Enable Use JSON Key as UID to assign the extracted string directly as UID.

5. Handle arrays (optional)

  • Enable Split Array if the payload contains an array of objects.

  • Specify the Array JSON key that points to the array field (e.g., data.sensors).

6. Filter payload contents (optional)

  • Use Filter by JSON key to limit which objects are processed.

  • Enter the Filter value (e.g., "type": "temperature").

7. Output control

  • Enable Single payload per matching object to emit one payload per object.

  • Set Interval between output payloads (ms) to throttle flow if needed (e.g., 500 ms).

8. Timestamp assignment (optional)

  • Enable Associate Payload with Timestamp from JSON.

  • Provide the Timestamp JSON key (e.g., data.timestamp) and Timestamp format (e.g., yyyy-MM-dd HH:mm:ss).

  • Set Time zone to ensure consistency with other data sources.

9. Export support

Enable Store data for Node Export capability if downstream tools need to reference the transformed payloads.


 Configuration Fields

Field Requirement Description
Node Name* Required Name shown in the workflow canvas.
Incoming UID JSON key* Required Path to the field containing or generating the UID.
Delimiter Optional Used to split compound strings.
Index (starts at 0) Optional Chooses a segment from the split string.
Use incoming UID + extracted string Optional Combines original UID with the extracted value.
Use JSON Key as UID Optional Replaces UID entirely with the extracted value.
Split Array Optional Enables processing of arrays as individual payloads.
Array JSON key Optional JSON path to the array of interest.
Filter by JSON key Optional JSON key used to filter array elements.
Filter value Optional Value used to filter objects within the array.
Single payload per matching object Optional Emit one payload per object (vs. sending all in one).
Interval between output payloads (ms) Optional Delay between emitting multiple payloads. Default: 500 ms.
Store data for Node Export capability Optional Retains payloads for export.
Associate Payload with Timestamp from JSON Optional Enables timestamp mapping from incoming data.
Timestamp JSON key Optional Path to the timestamp in the payload.
Timestamp format Optional Format of the timestamp (e.g., ISO, or custom).
Time zone Optional Time zone to apply to parsed timestamps.
 

 Example: Mapping a Sensor Array to Device UIDs

Payload Input:

json
CopyEdit
{
"meta": {
"device_info": {
"serial": "weather:SF001"
}
},
"data": {
"readings": [
{ "type": "temperature", "value": 24.3, "timestamp": "2025-07-21 14:00:00" },
{ "type": "humidity", "value": 61.2, "timestamp": "2025-07-21 14:00:00" }
]
}
}

Configuration:

  • Incoming UID JSON key: meta.device_info.serial

  • Delimiter: :

  • Index: 1

  • Use JSON Key as UID: ✅

  • Split Array: ✅

  • Array JSON key: data.readings

  • Filter by JSON key: type

  • Filter value: temperature

  • Single payload per matching object: ✅

  • Timestamp JSON key: timestamp

  • Timestamp format: yyyy-MM-dd HH:mm:ss

  • Time zone: America/Los_Angeles

Result:
A single payload is emitted with the UID SF001, containing only the temperature reading, correctly timestamped for Rayven’s processing engine.


 Best Practices

  • Keep UID extraction logic simple—flatten nested keys if needed before this node.

  • When filtering array contents, use exact keys/values to avoid accidental exclusions.

  • Validate timestamp formatting with a sample payload before enabling.


 Use Cases

  • Normalize third-party sensor payloads with embedded UIDs.

  • Reassign bulk data arrays to Rayven devices.

  • Add timestamps to raw payloads before entering data storage.

  • Filter only relevant sensor types from multi-sensor arrays.


 FAQ

Q: What happens if the extracted UID doesn't match any Rayven device?
A: The payload is dropped unless fallback or routing nodes are configured.

Q: Can this node handle nested arrays?
A: No, it supports single-level arrays only. Preprocess deeper structures beforehand.

Q: What timestamp formats are supported?
A: Standard formats like ISO 8601, yyyy-MM-dd HH:mm:ss, and Unix timestamps are supported. Ensure the format matches the incoming string exactly.