# Domain Metadata

* Domain metadata file stores configuration settings and parameters external to the source code, enabling easy modification and customization of an application without code changes.
* This makes it easier to adapt the application to different environments such as development, testing, production, etc.
* &#x20;For security reasons, sensitive information such as passwords, API keys, and credentials should not be hard-coded in the functions. Externalizing these values into Domain metadata files allows for more secure handling of sensitive data.
* Trillo Workbench does not enforce any shcema or type. You can use XML, JSON, text, HTML etc. files as appropriate.

**Example:**

* Create a file under Metadata File > files.
* Name the file - configDev.json(for dev), configQa.json(for QA), config.json (for PROD).

<figure><img src="/files/j9deg8ZQjabLMVyO2aJ7" alt=""><figcaption></figcaption></figure>

* Add properties in the configDev.json file and click on save.

<figure><img src="/files/4iUxoRipPTDZOldWoXLO" alt=""><figcaption></figcaption></figure>

* We can reference the config file from any functions using the below code -

```java
String configFile = parameters.get("configFile")
Map<String, Object> configs =
  MetaApi.getDomainFileAsMap("shared/domainMeta/files/" + configFile);
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://trillo.gitbook.io/trillo-workbench/domain-metadata.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
