# Setting values in the bot's memory

What's it for?

The values at the dialog are fixed when there is a restriction on history transfer, but there is important data that needs to be saved so that you don't get it again in the dialog, for example:

* Client Name;
* Phone;
* Order number;
* Any other transaction details.

### Create an action to set a value in the bot's memory

{% stepper %}
{% step %}

### Go to the “Workflows” section and click the “Create” button

<figure><img src="https://2542240793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnmK9dnkx224HgS0VSB5J%2Fuploads%2FEaWDzusFZXYxZDDxJphQ%2F2025-04-29_07-36-35.png?alt=media&#x26;token=f7c74bc1-979a-4e66-befe-e39dd02ad65c" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Go to Action Settings

<figure><img src="https://2542240793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnmK9dnkx224HgS0VSB5J%2Fuploads%2FUbzEVX3wGOnjrQ0ARpm2%2Fimage.png?alt=media&#x26;token=4ad0648a-b82b-4c77-a07f-adfea9f28634" alt=""><figcaption></figcaption></figure>

| **Name of action**              | Display name, by which you can easily identify the desired action in the general list.                                                                                                                                                               |
| ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Function name**               | <p>Must describe the main meaning of the action.<br>Only English characters and underscores are allowed (<code>\_</code>)</p>                                                                                                                        |
| **Function description**        | A description of what the action will do                                                                                                                                                                                                             |
| **Error message**               | This text will be returned to the bot in case of an error. It is recommended to write something like “An error occurred” there                                                                                                                       |
| **Rules for replying to a bot** | <p>Several webhooks can be called or other functions can be performed within one action.</p><p>With this setting, we have the ability to choose whether the response from the first step, the last step, or all steps will be passed to the bot.</p> |
| {% endstep %}                   |                                                                                                                                                                                                                                                      |

{% step %}

### Fill in the blanks:

<figure><img src="https://2542240793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnmK9dnkx224HgS0VSB5J%2Fuploads%2F4FHjIsy1K8bVQrRhbk5G%2F2025-04-30_13-03-57.png?alt=media&#x26;token=945b0f53-c2ff-481a-a077-f2574868fa6d" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
To automatically generate the Function Name, fill in the Action Name field and click the auto-generate button to the right of the Function Name field
{% endhint %}
{% endstep %}

{% step %}

### Add a step by clicking on the “Add Step” button

<figure><img src="https://2542240793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnmK9dnkx224HgS0VSB5J%2Fuploads%2FZjCdqEGIjeMDDDiMi4TU%2Fimage.png?alt=media&#x26;token=a6814323-af14-4ed7-a4ff-78ca8b3cdf9c" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Select the type of step

<figure><img src="https://2542240793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnmK9dnkx224HgS0VSB5J%2Fuploads%2FhDKty2DEt2TOrDyWNBOX%2F2025-04-30_13-10-00.png?alt=media&#x26;token=dac8cb15-0461-4777-ba40-da83a0d84181" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### In the menu for setting the step, fill in the fields “Key in memory” and “Value in memory”. Click “Save”.

<figure><img src="https://2542240793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnmK9dnkx224HgS0VSB5J%2Fuploads%2FOgoJQXtdkUEZ67pfo1aB%2F2025-04-30_13-12-55.png?alt=media&#x26;token=11b583b1-b861-4edc-8286-199938c3ffec" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Name** - is filled in automatically when selecting the step type.

**Memory key** - this is some value by which the bot will search.

**Value in memory** - this is the data that will be fixed/saved to the memory key.
{% endhint %}
{% endstep %}

{% step %}

### Click on the “Save” button to save the action.

<figure><img src="https://2542240793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnmK9dnkx224HgS0VSB5J%2Fuploads%2Ftx5SRJXdOYDRkbrTmNL3%2F2025-04-30_13-16-46.png?alt=media&#x26;token=d86ad89b-f3e8-440a-9cda-f900826c02c6" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Setup is complete

<figure><img src="https://2542240793-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnmK9dnkx224HgS0VSB5J%2Fuploads%2F0sCr1I30JbmsFHSIfMdw%2F2025-04-30_13-23-23.png?alt=media&#x26;token=1e8c2e9c-570c-4e36-972f-b9ecb7955dc3" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}
