Skip to main content
All CollectionsFlows
How to create and manage variables
How to create and manage variables

Learn how to add and manage variables to store relevant information during a conversation

Alvaro Vargas avatar
Written by Alvaro Vargas
Updated over a week ago

A variable in Frontline is like a labeled box where you store information. Variables help your AI Assistant remember things like your name, preferences, or previous messages, so it can respond appropriately and keep the conversation flowing smoothly.

Types of Variables

System Variables:

System variables are variables that are created by "default" with every assistant. These variables can't be edited or deleted. Some system variables included in Frontline are:

  • First Name: User's first name

  • Last Name: User's last name

  • Email: User's email address

  • Phone Number: User's phone number

  • Company: User's company name

  • Role: User's job title

  • Website: User's website

  • Language: User's preferred language

  • Last User Message: The most recent message from a user. Note that this variable will change every time the user sends a message.

  • Last Assistant Response: The most recent response from the AI Assistant. Note that this variable will change every time the AI Assistant Responds.

  • Last API Response: The most recent response from an API Call. Note that this variable will change every time you make an API Call.

  • Current Time: The current date and time (format MM/DD/YYYY, HH:MM:SS)

Custom Variables

Custom variables are manually created by users within Frontline and can be used to store information that can be useful throughout a conversation. They can be edited or deleted.

Adding a custom variable

In order to create a custom variable navigate to your assistant > flows > variables and click on "create variable". Add the following information:

  1. Name

  2. Description (optional). A strong description helps the assistant better identify entities that match the variable.

  3. Pattern. This can be a regular expression (regex), a data type, etc.

After adding a variable you'll be able to use it within flows to perform actions like:

  • Capturing data with an AI Assistant (e.g.: capture lead information like first and last name, phone number and company email)

  • Using that data to make an API call (e.g.: Adding the lead to Hubspot) and capturing a response on another variable.

  • Using a variable within the conversation to perform actions (e.g.: using the variable first name to address a lead by their name).

Editing a variable

To edit a variable navigate to your assistant > flows > variables and click on the variable you want to edit. Once the modal opens, you can edit it's content.

Deleting variables

In order to delete a custom variable navigate to your assistant > flows > variables and find the variable you want to delete. Click on the three dots to the right and select delete. Deleting variables might break existing flows and your AI Assistants functionality.

Did this answer your question?