Database
Nodes in the Database section are used to preserve data between separate scenario executions. Set memory stores a named set of values for the current user, while Get memory reads that set and exposes its fields to subsequent nodes.
Unlike regular #var values, memory data persists between separate scenario runs.
1. Set memory
Set memory (SetMemory) stores a set of key/value pairs for the current user.
Use it when a value must remain available not only in the current execution, but also in later messages or scenario runs.
Settings
| Field | Meaning |
|---|---|
MemoryName |
Name of the stored data set |
Fields[] |
List of fields containing Key and ValueTemplate |
ValueTemplate |
Field value; supports plain text, #var, and {{ JS }} |
NextAction |
The single output |
Connections
- Input: one standard connector.
- Output: one
NextAction. - The node itself does not create
#node.*output variables.
Variables and templates
ValueTemplate can contain plain text, #var, and {{ JS }}.
For example:
MemoryName: checkout
city = #node.12.city
total = #node.20.total
short_name = {{ truncate(#member.name, 30) }}
All fields are stored together under one MemoryName.
Important details
- A new
Set memorywith the sameMemoryNamecompletely replaces the previously stored data set. Fields are not merged individually. - If multiple fields use the same
Key, the last value wins. MemoryNamemust match between the correspondingSet memoryandGet memorynodes.- Use different
MemoryNamevalues for different logical data sets. Set memoryrequires member context, so it is not used in a synchronous AI tool.
2. Get memory
Get memory (GetMemory) reads a data set previously stored with Set memory and creates node-scoped variables for each stored field.
Settings
| Field | Meaning |
|---|---|
MemoryName |
Name of the data set; must exactly match the corresponding Set memory |
NextAction |
The single output |
Connections
- Input: one standard connector.
- Output: one
NextAction.
Output variables
Each memory field becomes a separate variable:
#node.{id}.{memoryField}
For example, if memory checkout contains:
{
"city": "Kyiv",
"total": "1200"
}
then Get memory with ID 30 creates:
#node.30.city
#node.30.total
Example
Set memory "checkout"
-> Screen "Continue"
...
Get memory "checkout"
-> Condition '#node.30.total != ""'
Important details
MemoryNamematching is case-sensitive.- If the memory does not exist yet, actual values are not available.
- If several
Set memorynodes use the sameMemoryName, runtime reads the most recently stored data set. Get memoryrequires member context, so it is not used in a synchronous AI tool.