> For the complete documentation index, see [llms.txt](https://docs.jentis.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.jentis.com/best-practices/how-to-access-account-constants-inside-code-blocks.md).

# How to access account constants inside code blocks

## What is the Problem? <a href="#howtoaccessaccountconstantsinsidecodeblocks-whatistheproblem" id="howtoaccessaccountconstantsinsidecodeblocks-whatistheproblem"></a>

The problem we are addressing is the need to access account variables within a code block. This can be challenging when trying to retrieve specific information related to the account.

## What is the Solution? <a href="#howtoaccessaccountconstantsinsidecodeblocks-whatisthesolution" id="howtoaccessaccountconstantsinsidecodeblocks-whatisthesolution"></a>

To access account constants within a code block, follow these steps:

1. **Utilize the Window Object**: To access account variables, make use of the `window` object in JavaScript.
2. **Use the Appropriate Path**: Once you have the `window` object, navigate through the following path: `window.jentis.config.jtm.accountconstants['Tealium_Data_Enrichment-tealium_account']`. Within the brackets, you can access any account constant you are using. You can find all of them by calling `window.jentis.config.jtm.accountconstants` from the console:

   <figure><img src="https://docs.jentis.com/__attachments/789545239/image-20230726-102715.png?inst-v=51858fdf-3184-45e9-9143-a0a09c4239be" alt=""><figcaption></figcaption></figure>
3. **Retrieve the Desired Information**: By following the given path, you will be able to retrieve the required account constants for further use within the code block.

## Summary <a href="#howtoaccessaccountconstantsinsidecodeblocks-summary" id="howtoaccessaccountconstantsinsidecodeblocks-summary"></a>

In summary, accessing account variables within code blocks can be achieved using the `window` object and the appropriate path to the desired account constants. By implementing this best practice, you can seamlessly retrieve and utilize the necessary information related to the account.

If you have any additional questions or need further assistance, please feel free to reach out to our customer support team. We are always here to help!


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.jentis.com/best-practices/how-to-access-account-constants-inside-code-blocks.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
