--- title: "Use Built-in Context Variables for Guides" slug: "use-built-in-context-variables-for-guides" updated: 2026-02-11T18:28:34Z published: 2026-02-11T18:28:34Z canonical: "help.gladly.com/use-built-in-context-variables-for-guides" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.gladly.com/llms.txt > Use this file to discover all available pages before exploring further. # Use Built-in Context Variables for Guides Gladly AI now provides built-in context variables that are automatically available in your Guide Rules. These variables give you access to real-time session information, enabling you to create smarter, more personalized automations. ## Available variables The following variables are automatically populated at the start of each Conversation: - `isAuthenticated`: Indicates whether the Customer is logged in (e.g., true, false). - `channelType`: The communication Channel being used (e.g., CHAT, EMAIL, SMS, PHONE_CALL). - `sidekickProfileId`: The unique ID (UUID) of the [Gladly Agent](/product-docs/docs/gladly-agents) handling the Conversation. ## Use variables in Guide Rules You can create conditional logic in your Guides based on these variables to tailor the Customer experience. **Personalized responses by Authentication Status** You can branch your Guide logic based on whether a Customer is logged in or not: - If i`sAuthenticated `is true: Offer account-specific options like order history or saved preferences. - If `isAuthenticated` is false: Prompt the Customer to log in or provide general assistance. **Customize behavior by Channel** Use the `channelType` variable to adjust logic for specific Channels, such as showing different prompts for CHAT versus PHONE_CALL. ## Use variables in Action Adapters Reference these variables in your Action Adapter steps using the $ prefix (e.g., `$.isAuthenticated`, `$.channelType`, or `$.sidekickProfileId`). > [!WARNING] > These variables cannot be overwritten by custom steps in the Action Adapter > > In order to ensure consistent behavior, these variables are protected. **Example use cases:** - API Endpoints: Call different API endpoints based on authentication status. - Analytics: Include the Channel type in logging or analytics payloads. - Routing: Route requests to Channel-specific backend services. ## Test with context variables Testing ensures your conditional logic handle session data correctly. **Guide Tester** When [testing Guides](https://help.gladly.com/docs/answer-threads-interface-overview#guide-tester-interface) with the Chat Channel selected: 1. Locate the Auth dropdown in the Guide Tester header. 2. Select Authenticated or Not Authenticated. 3. Send test messages to verify your conditional logic. **Action Adapter test dialog** When testing Action Adapters, open the test dialog and configure the Channel Context fields: - Channel Type: Select Chat or Voice. - Is Authenticated: Toggle on or off (Chat only). - Sidekick Profile ID: Enter a test profile ID. ## FAQs #### Is `$isAuthenticated` available for all channels? The authentication status is primarily relevant for Chat, where Customers may be logged into your website. For other Channels, this value may not be set. #### Can I override these context variables? No. Built-in context variables are protected and cannot be overwritten by Action Adapter steps to ensure consistent behavior. *Customer* or C*ustomers* refers to the people you support through Gladly who buy or use your products or services.*Channel* or *Channels* refers to the communication method used to communicate with Customers. Gladly supports the following Channels: - Voice/IVR - Email - Chat (via Glad App) - SMS/MMS - Social Messaging: Facebook Messenger, Instagram Messaging, Whatsapp Agents use the availability controls to receive Customers contacting in through these Channels. ![](https://connect.gladly.com/wp-content/uploads/2023/03/Availability-Channel.png)