Skip to content
© 2026 The ThingsBoard Authors
Try for free

ThingsBoard Cloud

Choose your data region

Your data stays in the region you choose, for residency and compliance. No credit card required.

Rather run it yourself? Install on your own servers

Tenant Details

Use this node to enrich messages with the originator’s tenant profile data — for example, adding the tenant’s email address to a notification message, or including the tenant’s country and city in an audit log entry. Selected details are added to message data or metadata under prefixed keys (e.g., tenant_email).

  • Select details — required. One or more tenant fields to retrieve:
Detail Added key Description
ID tenant_id Unique identifier of the tenant
TITLE tenant_title Tenant name
COUNTRY tenant_country Country
STATE tenant_state State or province
CITY tenant_city City
ZIP tenant_zip Postal/ZIP code
ADDRESS tenant_address Primary street address
ADDRESS2 tenant_address2 Secondary address line
EMAIL tenant_email Contact email
PHONE tenant_phone Contact phone
ADDITIONAL_INFO tenant_additionalInfo The description field from the tenant’s additionalInfo
  • Add selected details to — required. Where to place the fetched data:
    • Message — adds to message data payload (must be a valid JSON object).
    • Metadata — adds to message metadata.
  1. Identify the tenant associated with the incoming message.
  2. Read the configured Select details list.
  3. Asynchronously retrieve each selected field from the tenant.
  4. For each fetched detail, prepend tenant_ to the detail name to form the output key (e.g., EMAIL → tenant_email).
  5. Skip any detail whose value is not set on the tenant.
  6. Add the resulting key-value pairs to message data or metadata based on configuration.
  7. Route via Success. If an error occurs (e.g., adding to non-JSON message data), route via Failure.
Connection Condition
Success Message enriched with tenant details.
Failure Error during processing (e.g., message data is not a JSON object when fetchTo is DATA).

Example 1 — Add tenant title and email to metadata

Section titled “Example 1 — Add tenant title and email to metadata”
{ "detailsList": ["TITLE", "EMAIL"], "fetchTo": "METADATA" }

State: tenant title is Building Corp, email is alerts@building-corp.com.

Outgoing metadata (added):

{ "tenant_title": "Building Corp", "tenant_email": "alerts@building-corp.com" }

Example 2 — Add tenant country to message data

Section titled “Example 2 — Add tenant country to message data”
{ "detailsList": ["COUNTRY"], "fetchTo": "DATA" }

State: tenant country is Ukraine.

Outgoing data (merged): { "tenant_country": "Ukraine" }

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "TbGetTenantDetailsNodeConfiguration",
"type": "object",
"required": ["detailsList", "fetchTo"],
"additionalProperties": false,
"properties": {
"detailsList": {
"type": "array",
"items": {
"type": "string",
"enum": ["ID", "TITLE", "COUNTRY", "STATE", "CITY", "ZIP", "ADDRESS", "ADDRESS2", "EMAIL", "PHONE", "ADDITIONAL_INFO"]
}
},
"fetchTo": { "type": "string", "enum": ["DATA", "METADATA"] }
}
}