> ## Documentation Index
> Fetch the complete documentation index at: https://docs.inceptia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Available actions

> Filters and transformations applied to each field before sending it to the bot

**Actions** let you transform or filter a field's data before sending it to the bot. They apply in the order they're added, and are available on **Bot Params**, **Product Params**, and **Extra Params** fields.

## Removal actions

| Action                            | Description                                                             | Parameters                         |
| --------------------------------- | ----------------------------------------------------------------------- | ---------------------------------- |
| **remove\_empty**                 | Discards the whole record if the field is empty.                        | —                                  |
| **remove\_empty\_and\_spaces**    | Discards the record if the field is empty or contains only spaces.      | —                                  |
| **remove\_length\_greater\_than** | Discards the record if the value's length exceeds N characters.         | `Value` (integer)                  |
| **remove\_length\_less\_than**    | Discards the record if the value's length is less than N characters.    | `Value` (integer)                  |
| **allows\_long\_between**         | Discards the record if the value's length is outside the defined range. | `Minimum length`, `Maximum length` |

## Replacement actions

| Action                    | Description                                  | Parameters                                  |
| ------------------------- | -------------------------------------------- | ------------------------------------------- |
| **replace\_empty**        | Replaces empty values with a fixed value.    | `Replacement value`                         |
| **replace\_characters**   | Replaces a character or string with another. | `Character to replace`, `Replacement value` |
| **replace\_field\_value** | Replaces a specific value with another.      | `Value to replace`, `Replacement value`     |

## Column actions

| Action           | Description                                                                                                                                        | Parameters                          |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
| **new\_column**  | Assigns a fixed value to the field, without reading from any file column. Useful when the bot requires a parameter that doesn't exist in the file. | `Value`                             |
| **copy\_column** | Copies the value from another file column.                                                                                                         | `Source column`, `Copy column name` |

## Format actions

| Action                | Description                     | Parameters                             |
| --------------------- | ------------------------------- | -------------------------------------- |
| **change\_format**    | Converts the value's data type. | `Target format`: `str`, `int`, `float` |
| **convert\_to\_list** | Converts the value into a list. | —                                      |

## Date actions

All date actions work with a **reference date** and a **day offset**:

* **Reference date** (`init_date`): can be `today` (the current date) or a fixed date in `YYYY-MM-DD` format.
* **Day offset** (`shift_days`): number of days to add or subtract from the reference date. Can be negative. For example, `shift_days = -1` with `init_date = today` is equivalent to "yesterday."

### Date filtering actions

| Action                                 | Discards the record if the field's date is... |
| -------------------------------------- | --------------------------------------------- |
| **date\_remove\_greater\_than**        | greater than the reference date               |
| **date\_remove\_greater\_equal\_than** | greater than or equal to the reference date   |
| **date\_remove\_less\_than**           | less than the reference date                  |
| **date\_remove\_less\_equal\_than**    | less than or equal to the reference date      |
| **date\_remove\_equal\_than**          | equal to the reference date                   |
| **date\_remove\_different\_than**      | different from the reference date             |

### date\_generate\_from\_relative\_value

Generates a date from a numeric value (days) in the field. For example: if the field contains `30`, it generates the date that is 30 days from the reference date.

| Parameter                      | Description                                                                                                                                     |
| ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| **New column name**            | Name for the column with the generated date.                                                                                                    |
| **Initial date** (`init_date`) | Base date: `today` or a fixed date.                                                                                                             |
| **Day offset** (`shift_days`)  | Days to add or subtract from the base date.                                                                                                     |
| **Operation**                  | `nothing`: doesn't modify the original column. `add_col`: adds a new column with the generated date. `subst_col`: replaces the original column. |
