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.
Configuration
Section titled “Configuration”- Owner type — required. The type of the new owner:
TenantorCustomer.
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.
Message processing algorithm
Section titled “Message processing algorithm”- Identify the originator entity.
- 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 emitENTITY_CREATED. - If not found and creation is disabled: route via
Failure.
- Transfer ownership. If already owned by the target, no change but still
Success. - Route via
Success.
Output connections
Section titled “Output connections”| Connection | Condition |
|---|---|
Success | Ownership transferred (or entity already belongs to target). |
Failure | Target customer not found and creation disabled, or unexpected error. |
Examples
Section titled “Examples”Example 1 — Move device to tenant
Section titled “Example 1 — Move device to tenant”{ "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.
JSON schema
Section titled “JSON schema”{ "$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" } }}