Skip to content
Stand with Ukraine flag

Change Owner

Use this node to transfer ownership of the message originator to a different tenant or customer — for example, moving a device from the tenant back to a specific customer when it reconnects, or reassigning an asset to a sub-customer based on routing data in the message. The customer title supports templatization.

  • Owner type — required. The type of the new owner: Tenant or Customer.

When Owner type is Customer:

  • Customer title — required. Name of the target customer. Supports templatization.
  • Create new customer if it doesn’t exist — when enabled, creates a new customer if no match is found.
  • Create new customer on the same level as message originator — when enabled together with the create option, creates the new customer as a sub-customer of the originator’s current owner. When disabled, creates at the tenant level.
  1. Identify the originator entity.
  2. Based on Owner type:
    • Tenant: change owner to the tenant directly.
    • Customer:
      • Resolve the customer title from templates.
      • Search for an existing customer. If not found and creation is enabled: create the customer (at originator’s owner level if createOwnerOnOriginatorLevel, otherwise at tenant level) and emit ENTITY_CREATED.
      • If not found and creation is disabled: route via Failure.
  3. Transfer ownership. If already owned by the target, no change but still Success.
  4. Route via Success.
ConnectionCondition
SuccessOwnership transferred (or entity already belongs to target).
FailureTarget customer not found and creation disabled, or unexpected error.
{ "ownerType": "TENANT" }

State: device owned by My Customer. Result: ownership transferred to the tenant.


Example 2 — Move device to existing customer

Section titled “Example 2 — Move device to existing customer”
{ "ownerType": "CUSTOMER", "ownerNamePattern": "My Customer", "createOwnerIfNotExists": false, "createOwnerOnOriginatorLevel": false }

State: device owned by tenant; My Customer exists. Result: device transferred to My Customer.


Example 3 — Create sub-customer on originator level

Section titled “Example 3 — Create sub-customer on originator level”
{ "ownerType": "CUSTOMER", "ownerNamePattern": "Sub Customer", "createOwnerIfNotExists": true, "createOwnerOnOriginatorLevel": true }

State: device owned by Parent Customer; Sub Customer doesn’t exist. Result: Sub Customer created as sub-customer of Parent Customer; device ownership transferred.


Example 4 — Dynamic customer name from metadata and data

Section titled “Example 4 — Dynamic customer name from metadata and data”

Metadata: { "customerType": "Premium" } | Data: { "region": "North" }

{ "ownerType": "CUSTOMER", "ownerNamePattern": "${customerType} - $[region] Region", "createOwnerIfNotExists": false, "createOwnerOnOriginatorLevel": false }

Result: pattern resolves to Premium - North Region; ownership transferred to that customer.

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "TbChangeOwnerNodeConfiguration",
"type": "object",
"required": ["ownerType"],
"additionalProperties": false,
"properties": {
"ownerType": { "type": "string", "enum": ["TENANT", "CUSTOMER"] },
"ownerNamePattern": { "type": "string" },
"createOwnerIfNotExists": { "type": "boolean" },
"createOwnerOnOriginatorLevel": { "type": "boolean" }
}
}