# Document

### Definition

In Atfinity, [documents](/guides/glossary/document.md) are the place where information can be collected. They are the central part of a process.

Every document has a condition. If the condition is true the document will be part of a [case](/guides/glossary/case.md) and with it all the information that is on the document.

Documents come in four types:

* **PDF Document**: An existing form is uploaded as PDF onto the application, then Atfinity is told what information is shown at which position of the PDF. If the PDF is downloaded during a case, every known information value will be printed on the document at the defined position.
* **ADX Document**: Uses an XML like format and Jinja to create highly customisable and flexible documents. While configuring [ADX](/document-xml-adx/what-is-adx.md) needs a bit more knowledge the results can be finely grained and adapted to your specification exactly.
* **Smart Document**: Atfinity will automatically create a PDF document, based on the selected template. Known information values will be printed in linear fashion onto the template. The more information values are known, the longer the document will be.
* **Group Document**: This type lets you select and group already existing documents as a single document.

### Example

In order to communicate with individuals of a contract via email the bank requires special authorisation. It usually hands out a form to clients to fill in their name and email address and sign it.

This form could be uploaded as **PDF Document** and the fields for the information first name, last name and email address placed at the foreseen positions on the form.

The email waiver only needs to be filled out if the client wishes to be contacted by the bank via email. The condition of the document would therefore look something like this:

```
c is Contract

c.communication_via_email = true
```

That way the document only becomes part of the case if the 'Communication via Email' field is set to 'yes'.


---

# 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://docs.atfinity.io/guides/glossary/document.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.
