Data Manipulation

Setting and formatting variables is essential for creating a detailed conversation context, which leads to better understanding and resolution of the user's issues. A well-structured context enhances your chatbot's ability to handle complex scenarios, recognize when to hand over cases to agents, and improve overall conversation quality.

❗️

Need Assistance ?

This feature offers great flexibility but can be technical. If you're not familiar with Python or Jinja, feel free to contact our support team.

Main Actions

The Data Manipulation step supports Jinja templating language, enabling a wide range of actions typically available in programming languages.


❗️

Important Notes

Inputs

The Data Manipulation step can handle any type of variable as input.

Manipulation Block

  • Input variable values are stored as strings but are automatically converted to the appropriate Python type before being used:

    • Boolean: "true"True
    • Integer: "12"12
    • Float: "12.25"12.25
    • List: "[1, 2, 3]"[1, 2, 3]
    • Dictionary: '{"a": 1, "b": true, "c": "hello"}'{'a': 1, 'b': True, 'c': 'hello'}
    • String: "Hello""Hello"

    Outputs

  • To save the results of your manipulations, use freetext custom variables.

  • Naming must follow the lower_snake_case convention.

  • To map values in the manipulation block with output variables, use the set command.

  • Ensure the variable names in the set command match the output variables exactly.