Why it's needed:
The "Save message" action allows you to save the last message from a user to a selected variable. This action is especially useful when the trigger for automation is set to "Any message," and you want to store the data that the client sends during their interaction with the bot.
Variables are a feature for storing data that can change during the course of automation. For example, with variables, you can save information received from the user (such as phone numbers, emails, messages, etc.) and later use it in the script for decision-making or personalizing the interaction.
β
βLearn more about variables
How to set it up:
Create an "Action" block in your scenario.
In the block settings, select: Save Message.
In the action, select the variable where the last message (or comment) from the user will be saved:
Make this action the starting block.
Important! This action can only be used as the starting block. It should not be used in the middle of a chain, as it only saves the last message, and it would not be meaningful further along if the scenario has already started.
If you need to collect other user data during the automation process (such as name, email, etc.), use the "Collect Customer Data" action. This action is more versatile and suitable for gathering information as the scenario progresses.
β
Article: How to set up data collection
Examples of using the action in automations:
Example 1:
Using it in automation with IA:
Save Message: When a client sends a message, it is saved to the variable you selected for this action.
Use of the variable: After the message is saved, you can use the value of this variable later. For example, you can reference the variable in the neural network's knowledge base. The AI will recognize the value and prepare a response to the client's question:
Example 2:
This action can be used to check what code word the client entered and guide them through the correct branch of the scenario.
After setting up the action to save the message in the variable, add a condition "Variable Value" to check if the value matches the trigger word. Choose the variable from the "Save Message" action and set one of the trigger words as the value of the variable:
β
Create a similar condition and set a different trigger word as the value of the variable:
This way, if the client enters one of the trigger words, they will be immediately directed to the appropriate branch of your automation scenario.
It might be useful: