Skip to content
AI Employee

How to Use Custom Values and Variables in Agent Studio

Learn how to use Custom Values and variables in GHL Customer Care Agent Studio to personalize AI agents, pull CRM data, and build reusable workflows.

4 min read1,002 words6 explained imagesUpdated Fri, 26 Jun at 11:01 AM
View as markdownOpen in ClaudeOpen in ChatGPT
Each image has a one line explanation. Switch to full detail for the step it belongs to, the fields and buttons involved, examples and the whole procedure.
On this page
  1. Key Benefits of Using Variables in Agent Studio
  2. Custom Values
  3. Account Variables
  4. Right Now Variables
  5. Form Data Variables
  6. Contact Variables
  7. Contact vs Runtime Variables
  8. How To Set Up Custom Values and Variables
  9. Click inside any prompt or message fieldClick the dropdown arrow in the field OR type {{ manuallyChoose a category:AccountCustom ValuesRight NowForm DataContactClick a variable to insert it
  10. Click SaveClick TestRun a sample conversationConfirm variables resolve correctly
  11. Frequently Asked Question
  12. Related Articles

Video 1 Open in a new tab

Use Custom Values and built-in variable sources to make your Agent Studio workflows dynamic, reusable, and scalable. Instead of manually typing business details or contact information into every node, you can insert smart placeholders that automatically pull real data when your agent runs.

This guide explains how to use Account details, Contact data, real-time date and time, form submissions, and Custom Values inside your agents without duplication or manual updates.


TABLE OF CONTENTS


What Are Custom Values and Variables?

Custom Values and Variables allow you to insert real information into your agent automatically. A variable is a placeholder written inside double curly braces, like {{contact.first_name}}, which is replaced with real data when the agent runs.

For example:

Hi {{contact.first_name}}

If the contact’s name is John, the message becomes: Hi John.

You can use variables anywhere you type text inside Agent Studio, including AI Agent prompts, Text Generation nodes, tool inputs, message cards, and conditional logic fields. Simply click the dropdown arrow in the text field to insert a variable or type it manually using {{ }}.

Agent Studio includes five built-in variable categories:

  • Account

  • Custom Values

  • Right Now

  • Form Data

  • Contact

Each category pulls information from a different part of your system.


Key Benefits of Using Variables in Agent Studio

Using variables helps you build dynamic and reusable agents.

  • Build once, use everywhere: One agent template can work across multiple locations automatically.
  • No manual updates: If a phone number or address changes, it updates everywhere instantly.
  • Automatic personalization: Pull contact names and CRM data into conversations without extra work.
  • Real-time awareness: Insert today’s date or current time automatically.
  • Safe execution: If a variable has no value, it returns blank instead of breaking your agent.

Custom Values

Custom Values are reusable key–value pairs you define in:

Settings → Custom Values

You create them once and use them anywhere.

Example:

Key: support_email

Value: support@yourcompany.com

Then inside your agent: For help, email {{custom_values.support_email}}

If you update the value later, it automatically updates everywhere the variable is used.


Update Custom Values from the AI Agent Action

Workflows that use the AI Agent action can update custom values directly with the Update Custom Value tool. This allows the agent to write context-based values during execution instead of relying only on fixed workflow branches.

For full setup steps, refer to the AI Agent workflow action article.


Account Variables

Account variables pull business information from your Location settings.

Use these when your agent needs to reference:

  • Business name

  • Phone number

  • Address

  • Website

  • Logo URL

Example: Welcome to {{account.name}}. Call us at {{account.primary_phone}}.

These values pull directly from your Location settings.


Right Now Variables

Right Now variables insert live date and time information.

Examples include:

  • Today’s full date

  • Current time

  • Day of the week

  • Month or year

Example: Today is {{right_now.date}}.

The system automatically inserts the correct date based on the location’s timezone.


Form Data Variables

Form Data variables are available when your agent is triggered by a Form Submitted event.

Each form field becomes available as a variable.

Example: If your form has a field called “service_type”, you can use: You selected {{form.service_type}}

Important: Form variables only populate when the agent is triggered by a form submission.

Contact Variables

Contact variables pull information directly from the CRM record. They allow standard as well as custom fields for deep personalization.

Examples:

  • {{contact.first_name}}

  • {{contact.last_name}}

  • {{contact.email}}

  • Custom contact fields

If the contact record updates, the next time the agent runs it will use the updated information.


Contact vs Runtime Variables

  • Contact variables pull saved CRM data.
  • Runtime variables store temporary information collected during the current conversation.
  • If the information already exists in the contact record before the conversation starts, use Contact variables.
  • If the value is collected during the conversation, use Runtime variables.

How To Set Up Custom Values and Variables

Follow these steps to start using variables.

Step 1: Create Custom Values

  1. Go to Settings → Custom Values and select Add Custom Value
  2. Enter a Name and Value then click Create
Step 1: Create Custom Values (image 1 of 6) What this shows Go to Settings → Custom Values and select Add Custom Value Enter a Name and Value then click Create What this shows Illustrates the "Step 1: Create Custom Values" section of "How to Use Custom Values and Variables in Agent Studio". This animation appears in the "Step 1: Create Custom Values" section of "How to Use Custom Values and Variables in Agent Studio". The text alongside this image reads: Go to Settings → Custom Values and select Add Custom Value Enter a Name and Value then click Create. Immediately after, the guide continues: Go to AI Agents → Agent Studio and open an existing agent or create a new one. Image 1 of 6 Where to goGo to Settings → Custom Values and select Add Custom Value Enter a Name and Value then click Create
Buttons and menus referenced SettingsCustom ValuesAdd Custom ValueCreate
Next stepGo to AI Agents → Agent Studio and open an existing agent or create a new one
All 2 steps in this procedure
  1. Go to Settings → Custom Values and select Add Custom Value
  2. Enter a Name and Value then click Create

Step 2: Open Agent Studio

Go to AI Agents → Agent Studio and open an existing agent or create a new one

Step 2: Open Agent Studio (image 2 of 6) What this shows Go to AI Agents → Agent Studio and open an existing agent or create a new one What this shows Illustrates the "Step 2: Open Agent Studio" section of "How to Use Custom Values and Variables in Agent Studio". This screenshot appears in the "Step 2: Open Agent Studio" section of "How to Use Custom Values and Variables in Agent Studio". The text alongside this image reads: Go to AI Agents → Agent Studio and open an existing agent or create a new one. Immediately after, the guide continues: Note: Some nodes, such as API Call steps, generate runtime variables based on their output. These variables can be reused in later steps by selecting them from the variable picker. Image 2 of 6 Where to goGo to AI Agents → Agent Studio and open an existing agent or create a new one
Buttons and menus referenced AI Agents → Agent Studio
Next stepNote: Some nodes, such as API Call steps, generate runtime variables based on their output. These variables can be reused in later steps by selecting them from the variable picker.

Step 3: Insert a Variable

  1. Click inside any prompt or message field
  2. Click the dropdown arrow in the field OR type {{ manually
  3. Choose a category:
    • Account
    • Custom Values
    • Right Now
    • Form Data
    • Contact
  4. Click a variable to insert it

Note: Some nodes, such as API Call steps, generate runtime variables based on their output. These variables can be reused in later steps by selecting them from the variable picker.

Click inside any prompt or message fieldClick the dropdown arrow in the field OR type {{ manuallyChoose a category:AccountCustom ValuesRight NowForm DataContactClick a variable to insert it (image 3 of 6) What this shows Note: Some nodes, such as API Call steps, generate runtime variables based on their output. What this shows Illustrates the "Click inside any prompt or message fieldClick the dropdown arrow in the field OR type {{ manuallyChoose a category:AccountCustom ValuesRight NowForm DataContactClick a variable to insert it" section of "How to Use Custom Values and Variables in Agent Studio". This screenshot appears in the "Click inside any prompt or message fieldClick the dropdown arrow in the field OR type {{ manuallyChoose a category:AccountCustom ValuesRight NowForm DataContactClick a variable to insert it" section of "How to Use Custom Values and Variables in Agent Studio". The text alongside this image reads: Note: Some nodes, such as API Call steps, generate runtime variables based on their output. These variables can be reused in later steps by selecting them from the variable picker. Immediately after, the guide continues: If a value appears blank, verify that the corresponding data exists in the CRM or Location settings. Image 3 of 6 What this coversNote: Some nodes, such as API Call steps, generate runtime variables based on their output. These variables can be reused in later steps by selecting them from the variable picker. Next stepIf a value appears blank, verify that the corresponding data exists in the CRM or Location settings.

Click inside any prompt or message fieldClick the dropdown arrow in the field OR type {{ manuallyChoose a category:AccountCustom ValuesRight NowForm DataContactClick a variable to insert it (image 4 of 6) What this shows Note: Some nodes, such as API Call steps, generate runtime variables based on their output. What this shows Illustrates the "Click inside any prompt or message fieldClick the dropdown arrow in the field OR type {{ manuallyChoose a category:AccountCustom ValuesRight NowForm DataContactClick a variable to insert it" section of "How to Use Custom Values and Variables in Agent Studio". This screenshot appears in the "Click inside any prompt or message fieldClick the dropdown arrow in the field OR type {{ manuallyChoose a category:AccountCustom ValuesRight NowForm DataContactClick a variable to insert it" section of "How to Use Custom Values and Variables in Agent Studio". The text alongside this image reads: Note: Some nodes, such as API Call steps, generate runtime variables based on their output. These variables can be reused in later steps by selecting them from the variable picker. Immediately after, the guide continues: If a value appears blank, verify that the corresponding data exists in the CRM or Location settings. Image 4 of 6 What this coversNote: Some nodes, such as API Call steps, generate runtime variables based on their output. These variables can be reused in later steps by selecting them from the variable picker. Next stepIf a value appears blank, verify that the corresponding data exists in the CRM or Location settings.

Step 4: Save and Test

  1. Click Save
  2. Click Test
  3. Run a sample conversation
  4. Confirm variables resolve correctly

If a value appears blank, verify that the corresponding data exists in the CRM or Location settings.

Click SaveClick TestRun a sample conversationConfirm variables resolve correctly (image 5 of 6) What this shows If a value appears blank, verify that the corresponding data exists in the CRM or Location settings. What this shows Illustrates the "Click SaveClick TestRun a sample conversationConfirm variables resolve correctly" section of "How to Use Custom Values and Variables in Agent Studio". This screenshot appears in the "Click SaveClick TestRun a sample conversationConfirm variables resolve correctly" section of "How to Use Custom Values and Variables in Agent Studio". The text alongside this image reads: If a value appears blank, verify that the corresponding data exists in the CRM or Location settings. Immediately after, the guide continues: Once everything works correctly, promote the agent to Production. Image 5 of 6 What this coversIf a value appears blank, verify that the corresponding data exists in the CRM or Location settings. Next stepOnce everything works correctly, promote the agent to Production.

Step 5: Publish

Once everything works correctly, promote the agent to Production.

Step 5: Publish (image 6 of 6) What this shows Once everything works correctly, promote the agent to Production. What this shows Illustrates the "Step 5: Publish" section of "How to Use Custom Values and Variables in Agent Studio". This screenshot appears in the "Step 5: Publish" section of "How to Use Custom Values and Variables in Agent Studio". The text alongside this image reads: Once everything works correctly, promote the agent to Production. Immediately after, the guide continues: Q: What happens if a Custom Value is deleted? Image 6 of 6 What this coversOnce everything works correctly, promote the agent to Production. Next stepQ: What happens if a Custom Value is deleted?

Frequently Asked Question

Q: What happens if a Custom Value is deleted?

It returns an empty value instead of causing an error.

Q: Can I reference Opportunity or Task fields?

Currently supported sources are Account, Custom Values, Right Now, Form Data, and Contact.

Q: What Happens If a Variable Has No Value?

If a variable is missing or empty, the system returns a blank value. It does not cause an error or stop the agent from running. This ensures safe and reliable execution.

Q: Do Right Now variables respect timezone?

Yes. They use the sub-account’s timezone.

Q: Can Form Data variables be used anywhere?

They populate only when triggered by a Form Submitted event.

Q: Are variable placeholders case-sensitive?

Yes. Use the exact key names shown in the variable picker.


Was this guide helpful?

Related guides