Skip to content
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

Customer Details

Use this node to enrich messages with the originator’s customer profile data — for example, adding the customer’s email and title to a notification message, or including the customer’s country in an analytics record. Selected details are added to message data or metadata under prefixed keys (e.g., customer_email).

  • Select details — required. One or more customer fields to retrieve:
Detail Added key Description
ID customer_id Unique identifier of the customer
TITLE customer_title Customer name
COUNTRY customer_country Country
STATE customer_state State or province
CITY customer_city City
ZIP customer_zip Postal/ZIP code
ADDRESS customer_address Primary street address
ADDRESS2 customer_address2 Secondary address line
EMAIL customer_email Contact email
PHONE customer_phone Contact phone
ADDITIONAL_INFO customer_additionalInfo The description field from the customer’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 customer associated with the message originator (e.g., the customer a device is assigned to).
  2. Read the configured Select details list.
  3. Asynchronously retrieve each selected field from the customer.
  4. For each fetched detail, prepend customer_ to the detail name to form the output key (e.g., EMAIL → customer_email).
  5. Skip any detail whose value is not set on the customer.
  6. Add key-value pairs to message data or metadata based on configuration.
  7. Route via Success. If an error occurs (e.g., originator not assigned to a customer, or adding to non-JSON message data), route via Failure.
Connection Condition
Success Message enriched with customer details.
Failure Originator not assigned to a customer, or message data is not a JSON object when fetchTo is DATA, or other error.

Example 1 — Add customer title and email to metadata

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

State: originator is assigned to a customer with title Company A, email contact@companya.com.

Outgoing metadata (added):

{ "customer_title": "Company A", "customer_email": "contact@companya.com" }

Example 2 — Add customer country to message data

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

State: customer’s country is stored as USA.

Outgoing data (merged): { "customer_country": "USA" }

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "TbGetCustomerDetailsNodeConfiguration",
"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"] }
}
}