Skip to content
learning

Vlocity Environment Variable Guide with Examples and Use Cases

June 11, 2025

Understanding how to use a Vlocity Environment Variable can significantly improve the efficiency and flexibility of your OmniStudio configurations. These built-in variables—like $Vlocity.TODAY, $Vlocity.NOW, and $Vlocity.User—help you fetch real-time data such as dates, user details, and org-specific information without manual input.

Vlocity Environment Variable

In this guide, we’ll walk through the most common Vlocity Environment Variable options and show you exactly how to use them with practical formulas.

$Vlocity.TODAY

Description: Returns the current date. 

Example Formula: 

ADD_DAYS($Vlocity.TODAY, 7)

Adds 7 days to today’s date.

$Vlocity.NOW 

Description: Returns the current date and time (timestamp).

Example Formula:

FORMAT_DATE($Vlocity.NOW, 'MM/dd/yyyy HH:mm:ss')

Formats the current timestamp. 

$Vlocity.NULL 

Description: Represents a null value. 

Example Formula:

IF(ISNULL(FieldName), $Vlocity.NULL, FieldName)

Assigns a null value if a field is null. 

$Vlocity.User

Description: Returns the current user’s ID.

Example Formula:

CONCAT('/apex/UserDetailPage?Id=', $Vlocity.User)

Builds a link to the current user’s detail page. 

$Vlocity.Profile

Description: Returns the current user’s profile ID. 

Example Formula:

IF($Vlocity.Profile == 'Admin', 'Administrator', 'Standard User')

Checks the user’s profile. 

$Vlocity.Org 

Description: Returns the organization ID of the current Salesforce org. 

Example Formula:

CONCAT('Org ID: ', $Vlocity.Org)

Displays the org ID. 

$Vlocity.Locale 

Description: Returns the locale of the current user. 

Example Formula:

IF($Vlocity.Locale == 'en_US', 'English (US)', 'Other Language')

$Vlocity.Session

Description: Returns session information for the current user.

Example Formula:

IF(ISNULL($Vlocity.Session), 'No Active Session', 'Active Session')

Conclusion

Mastering each Vlocity Environment Variable enables you to build more dynamic, context-aware logic within your OmniStudio tools. Whether you’re calculating future dates, checking user profiles, or validating sessions, these variables offer powerful shortcuts to streamline your configuration. Keep this guide handy as a quick reference whenever you need to work smarter with Vlocity!

Keep Reading

Related Articles and Resources

Using Datatable in Omniscript and pass data from OS to flexcard
November 9, 2024

Using Datatable in Omniscript and pass data from OS to flexcard

This blog will cover how data pass from Omniscript to...

Products catalog Salesforce Revenue Cloud Advance
September 27, 2025

Products catalog Salesforce Revenue Cloud Advance

In the following article we’re going to present a Product...

Salesforce Revenue Cloud Mapping Fields from Quote to Quote Line
September 27, 2025

Salesforce Revenue Cloud Mapping Fields from Quote to Quote Line

Salesforce Revenue Cloud has proven to be a critical...

AI-Powered Public Sector Services: Turning PSS Workflows Into Autonomous Agents
February 3, 2026

AI-Powered Public Sector Services: Turning PSS Workflows Into Autonomous Agents

For the last two decades, the government has been engaged...

Embedding Standard Designer FlexCards in Lightning Web Components (LWC)
October 14, 2025

Embedding Standard Designer FlexCards in Lightning Web Components (LWC)

The namespace-flex-card-standard-runtime-wrapper component...

SetUp Rules in Salesforce Revenue Cloud Advanced (RCA)
October 2, 2025

SetUp Rules in Salesforce Revenue Cloud Advanced (RCA)

If you’ve ever wrestled with product bundles, discounts,...