> For the complete documentation index, see [llms.txt](https://trillo.gitbook.io/trillo-workbench/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trillo.gitbook.io/trillo-workbench/domain-metadata.md).

# Domain Metadata

This section discusses how to use domain metadata. i.e. specific to the application. Domain metadata is useful for writing easily configurable applications.

* 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="https://3894296373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV-642lNorw6_vRdCpS%2Fuploads%2FdAjIHjPUOmwNV7fC1yOg%2FScreenshot%202023-12-28%20at%201.27.45%E2%80%AFPM.png?alt=media&amp;token=f12a5cc1-4d2b-4616-a37b-6fd544f590a9" alt=""><figcaption></figcaption></figure>

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

<figure><img src="https://3894296373-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MV-642lNorw6_vRdCpS%2Fuploads%2FUp9HOmZvTKxmjQi39xdO%2Fimage.png?alt=media&amp;token=77b93eba-3b78-4313-9ef2-d8f8f348f355" 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);
```
