# Delete Relation

<figure><img src="https://111806075-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg4otljWU9FsHKYhTsW%2Fuploads%2FAHcavBakm0NEttxK2Lhe%2Fimage.png?alt=media&#x26;token=e37f4bd1-0b11-45a1-bdae-bc135a53c0f1" alt=""><figcaption></figcaption></figure>

Delete the relation from the selected entity to originator of the message by type and direction.

Following Message Originator types are allowed: **Asset**, **Device**, **Entity View**, **Customer**, **Tenant**, **Dashboard**.

Finds target Entity by entity name pattern and then delete a relation between Originator Entity and this entity.

<figure><img src="https://111806075-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Mg4otljWU9FsHKYhTsW%2Fuploads%2FNaiP2SLQtHHWB5VS26Nw%2Fimage.png?alt=media&#x26;token=4b901bad-ae77-47c3-84f6-c0659a9b0104" alt=""><figcaption></figcaption></figure>

* **Direction** - following types are allowed: **From**, **To**.
* **Relation type** - type of directed connections to message originator entity. Default types **Contains** and **Manages** can be selected from the drop-down list.
* **Name pattern** - can be set direct entity name or pattern can be used, that will be resolved to the real entity name using Message metadata.
* **Entities cache expiration time** - specifies maximum time interval is seconds allowed to store found target entity records. 0 value means that records will never expire.

Message will be routed via **Failure** chain in the following cases:

* When Originator entity type is not supported.
* Target entity doesn’t exist.

In other cases Message will be routed via **Success** chain.
