# Save attributes

<div align="left"><img src="https://thingsboard.io/images/user-guide/rule-engine-2-0/nodes/action-save-attributes.png" alt="image"></div>

Stores attributes from incoming Message payload to the database and associate them to the Entity, that is identified by the Message Originator. Configured **scope** is used to identify attributes scope.

Supported scope types:

* Client attributes
* Shared attributes
* Server attributes

<div align="left"><img src="https://thingsboard.io/images/user-guide/rule-engine-2-0/nodes/action-save-attributes-config.png" alt="image"></div>

Expects messages with **POST\_ATTRIBUTES\_REQUEST** message type. If message Type is not **POST\_ATTRIBUTES\_REQUEST**, Message will be routed via **Failure** chain.

When attributes are uploaded over existing API (HTTP / MQTT / CoAP / etc.) Message with correct payload and type will be passed into **Input** node of the **Root Rule Chain**.

In cases when it is required to trigger attributes saving inside Rule Chain, the Rule Chain should be configured to transform Message payload to the expected format and set message type to **POST\_ATTRIBUTES\_REQUEST**. It could be done using [**Script Transformation Node**.](https://docs.tesenso.com/tesenso-iot-cloud/rule-engine/rule-engine/transformation-rule-nodes/script-transformation)

**Expected Message Payload example:**

```
{
  "firmware_version": "1.0.1",
  "serial_number": "SN-001"
}
```

After successful attributes saving, original Message will be passed to the next nodes via **Success** chain, otherwise **Failure** chain is used.
