> For the complete documentation index, see [llms.txt](https://docs10.xenioo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs10.xenioo.com/actions-and-operations/database/save-record.md).

# Save Record

This action will insert a new record or update specific fields of an existing record on a collection.

![](/files/-M_bVB4R8SinoZn_YrGf)

### Settings

The action uses the following settings:

| Setting          | Description                                                                                                                                                     | [Parsed](/actions-and-operations/dynamic-parsing.md) |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
| Collection       | The collection to be used for the action                                                                                                                        | :no\_entry:                                          |
| Save Mode        | Set whatever the save action should fully replace any data in the existing record or only update the specified fields                                           | :no\_entry:                                          |
| Record Unique Id | The unique id of the record to be deleted. If left empty,[ Filter Operations](/actions-and-operations/database/set-field-filter-value.md) will be used instead. | :white\_check\_mark:                                 |

### Remarks

This action alone does not produce any result. At least one [Field Operation](/actions-and-operations/database/set-field-value.md) must be attached for the action to be executed. Assuming we want to increase by 50 the cost of a product with a specific id, a complete Save Record action may look like the example below:&#x20;

![](/files/-M_bX-404YJjqwBwP9h9)

If no unique id is specified for the record or no record exist with the specified value, the Save Mode will be automatically set to replace whole record mode.

### Trigger

This action automatically triggers all of the [Set Field operations](/actions-and-operations/database/set-field-value.md) attached.

### Variables

This action produces the following variables after being triggered:

| Variable                   | Description                                                    |
| -------------------------- | -------------------------------------------------------------- |
| last\_database\_object\_id | The unique id of the record that has been updated or inserted. |

### Availability

Channel specific availability follows the table below:

| Channel          | Availability     |
| ---------------- | ---------------- |
| Facebook         | Fully Available. |
| WhatsApp         | Fully Available. |
| SMS              | Fully Available. |
| Telegram         | Fully Available. |
| Web              | Fully Available. |
| Alexa            | Fully Available. |
| Google Assistant | Fully Available. |
| Slack            | Fully Available. |
| API              | Fully Available. |

This action requires an active [Database ](/basic-concepts/your-account/additional-packages.md)package.
