> For the complete documentation index, see [llms.txt](https://support.docstudio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.docstudio.com/admin-panel/conversion-rules/wdextensions-overview.md).

# WDExtensions Overview

Use WDExtensions helper methods in XSLT conversion rules to work with dictionaries, mailboxes, envelopes, and chaining.

### Add the namespace

Add the namespace to your XSLT stylesheet.

```xml
<?xml version="1.0"?>
<xsl:stylesheet version="2.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:wdExtensions="java:com.whitedoc.xslt.extensions.WdExtensions"
                exclude-result-prefixes="wdExtensions">
    ...
</xsl:stylesheet>
```

### Available methods

#### getValueFromDictionary

`wdExtensions:getValueFromDictionary(String dictionaryUuid, String columnByUuid, String valueToFind, String columnToFind)`

Finds a record by a value in one column.

Returns the value from another column.

#### getRecordUuidByValueFromDictionary

`wdExtensions:getRecordUuidByValueFromDictionary(String dictionaryUuid, String columnUuid, String valueToFind)`

Finds a record by a column value.

Returns the dictionary record UUID.

#### createAttachementWithSourceFile

`wdExtensions:createAttachementWithSourceFile()`

Uploads the original source file to storage.

Returns the created attachment UUID.

Each call creates a new attachment UUID.

#### getMailboxUuidByAlias

`wdExtensions:getMailboxUuidByAlias(String mailboxAlias)`

Returns a mailbox UUID by its alias.

`mailboxAlias` can also be an XPath to a value in the source document.

#### findEnvelopeUuidByField

`wdExtensions:findEnvelopeUuidByField(String templateUuid, String fieldName, String fieldValue)`

Searches envelopes by an exact template field value.

Returns the envelope UUID only if exactly one envelope is found.

#### chainEnvelope

`wdExtensions:chainEnvelope(String envelopeUuid)`

Returns an existing `chainUuid`.

Or creates a new chain for the envelope.

Can return `null` if the envelope is already chained in another mailbox.

Use it for the `chainUuid` attribute in the generated envelope.


---

# 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://support.docstudio.com/admin-panel/conversion-rules/wdextensions-overview.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.
