Articles on: Crisp Chatbot

How to use memorized values in messages sent from the chatbot?

The Crisp Bot plugin is capable of memorizing values in an internal memory tied to each chat session. This memory can be used to store values the user entered, for instance, their name when they filled a form you've sent to them. Values can be used in various bot features; one of them allows you to inject memorized values in response text messages.

Memorized values can only be used in text messages. File messages, field messages and other types of messages do not support variables for now.

Pre-requisites



To be able to use memorized values in the messages you send from the bot, you'd need to memorize those values from somewhere first.

For instance, you may memorize them from:

A field message
A button message

Memorized values are recognized by a variable name, for instance job_role if your value contains a job role the user entered.

How to inject memorized values?



Memorized values can be injected in the text messages sent from the Crisp Bot, using a tag syntax: {{ variable_name | "placeholder value" }}.

Where:

variable_name is the variable name for the memorized value
placeholder value is an optional value to use if variable_name holds an empty value

For instance, to use the name variable in a message:

Hello {{ name | "dear user" }}, good morning!

Updated on: 13/06/2022

Was this article helpful?

Share your feedback

Cancel

Thank you!