# Parameters

{% hint style="info" %}
Parameters are an advanced subject that is only relevant to users who frequently have to draft complex clauses & documents.
{% endhint %}

Parameters are a tool that can be used in Clause9 grammar to make the use of [snippets](/clauses/snippets.md) even more flexible. They function as a kind of placeholder.

Whereas snippets already enable you to replace a piece of text that is used multiple times across a clause or across several clauses/documents, combining snippets with parameters further upgrades the re-usability of a snippet by enabling you to replace the placeholder(s) in a snippet with different input each time you use the snippet.

## How to use parameters

### Insert the parameter as a placeholder in a snippet

Parameters are written starting with a question mark, followed by a name of your choice in all caps. For example: `?NAME` or `?TYPE`. Written as such, the parameter should be used in the (internal or external) snippet as a placeholder for input that can be chosen elsewhere (i.e. where the snippet itself is being referenced).

### Give the parameter a value in the snippet reference

Without a value, the parameter in the snippet itself will give an error message (the name of the parameter surrounded with a purple background). So to be of any use, it should be assigned a value. That is done in the snippet reference.

The grammar for this is as follows: insert the snippet reference, followed by left parenthesis `(`. Insert the name of the (first) parameter. To assign it a value, insert `:=` followed by the relevant value. Multiple parameters can be assigned a value in one snippet reference by separating them with a comma. Close the reference off with right parenthesis `)`. The result looks like this:

* for an **internal snippet**: `@SNIPPET-REFERENCE(?PARAMETER1 := value1, ?PARAMETER2 := value2)`
* for an **external snippet**: `@#snippet-reference(?PARAMETER1 := value1, ?PARAMETER2 := value2)`

(The only difference between these references is the way internal and external snippets themselves are referenced)

### Types of values

The parameter can get nearly any value that results in a piece of text. The most important limitations are that a parameter value itself cannot be (i) plain text or (ii) a condition (however, note that use of the `@if` [special function](/special-functions/introduction.md) is allowed).

Examples of values:

* a concept reference
* a datafield
* a special function

## Example

An example of a very simple notice clause will illustrate this:

<figure><img src="/files/IITw2Hv6dARiPwVvXt5h" alt=""><figcaption><p>Example of the use of parameters with an internal snippet.</p></figcaption></figure>


---

# 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://help.clause9.com/clauses/parameters.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.
