> For the complete documentation index, see [llms.txt](https://doc.wearepatchworks.com/product-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.wearepatchworks.com/product-documentation/developer-hub/connector-builder/building-your-own-connector/techniques-for-working-with-variables-and-parameters/working-with-parameters.md).

# Working with parameters

## About parameters

Parameters can be defined throughout the connector builder, in:

* [Authentication method URL parameters](/product-documentation/developer-hub/connector-builder/building-your-own-connector/3-authentication-methods/authentication-method-options/url-parameters.md)
* [Authentication method headers](/product-documentation/developer-hub/connector-builder/building-your-own-connector/3-authentication-methods/authentication-method-options/header.md)
* [Authentication method body](/product-documentation/developer-hub/connector-builder/building-your-own-connector/3-authentication-methods/authentication-method-options/body.md)
* [Endpoint URL parameters](/product-documentation/developer-hub/connector-builder/building-your-own-connector/4-endpoints/endpoint-options/url.md)
* [Endpoint headers](/product-documentation/developer-hub/connector-builder/building-your-own-connector/4-endpoints/endpoint-options/header.md)
* [Endpoint body](/product-documentation/developer-hub/connector-builder/building-your-own-connector/4-endpoints/endpoint-options/body.md)

When a [process flow](/product-documentation/process-flows/about-process-flows.md) runs, any associated API requests are injected with given variable values wherever a corresponding `{{key}}` is found - this is Irrespective of where parameters are defined

{% hint style="info" %}
All parameters specified in connector builder API requests must be placed within double-curly brackets - for example: `{{store_name}}`.
{% endhint %}

## Optional vs default parameters

Depending on where you are in the connector builder, you will encounter both [default](#default-parameters) and [optional](#optional-parameters) parameters, where:

* [Default](#default-parameters-key-pairs) parameters are always applied to API requests, whenever it is used.
* [Optional](#optional-parameters) parameters are those that users can choose to apply with their own values - either when adding connector instances (in the case of parameters defined for [authentication methods](/product-documentation/developer-hub/connector-builder/building-your-own-connector/3-authentication-methods/authentication-method-options.md)) or as filter parameters when configuring [connection shapes](/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/connector-shape.md) for [process flows](/product-documentation/process-flows/about-process-flows.md).

Irrespective of where parameters are defined, any associated API requests are injected with given default and optional parameter values wherever a corresponding `{{key}}` is found.

In some places, you can only add [default variables](#default-parameters-key-pairs), but in others you can add both types. In this case, the variables page is split into two panels - for example:

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

[Default](#default-parameters) parameters are defined in the top panel, with [optional](#optional-parameters) parameters in the lower panel. The sections below explain the use of these parameters in general terms - for specific guidance in a particular context, please use the links provided [above](#about-parameters).

## Default parameters

**Default** parameters are those which must always be passed into the request **URL**, **header**, or **body** using values that you specify as part of the configuration. They are added as key pairs:

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

Defined values can be static or dynamic. Default parameters are passed straight into requests - users are never asked to provide values for these.

{% hint style="info" %}
There is one scenario where a user can influence the value of a default parameter. This is where you define a default parameter value as an endpoint {{variable}}. For an example scenario please see our [What if I want to force users to enter their required value for a URL parameter? ](/product-documentation/developer-hub/connector-builder/building-your-own-connector/4-endpoints/endpoint-options/url.md#what-if-i-want-to-force-users-to-enter-their-required-value-for-a-url-parameter)section.
{% endhint %}

## Optional parameters

**Optional** parameters are those that you want to expose to your users in [process flows](/product-documentation/process-flows/about-process-flows.md), and then pass values that they provide into your API requests (via the **URL**, **header**, or **body**).

Any optional parameters that you define are displayed as **filter parameters** for a [connection shape](/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/connector-shape.md) when a user selects the associated instance/endpoint. Essentially, you are defining filter options for users to apply in process flows. For example:

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

### Adding optional parameters

When you choose to add an optional parameter, you're prompted to complete the fields as below:

<div align="left"><figure><img src="/files/hJgt6nwwdQ5nfuSRRyrL" alt="" width="563"><figcaption></figcaption></figure></div>

Use the following table as a guide for completing these fields:

<table><thead><tr><th width="338">Field</th><th>Summary</th></tr></thead><tbody><tr><td>Field</td><td>Enter a valid parameter field from the API documentation associated with the third-party application that you're building.</td></tr><tr><td>Select an operator</td><td>Operators determine how matching should be performed on the value given for this field (for example: <code>contains</code>, <code>equal to</code>, <code>greater than or equal to</code>, etc.).</td></tr><tr><td>Select a type</td><td>Choose the type of field that users will be prompted to update when they set this parameter in process flows. Available options are <code>string</code>, <code>number</code>, <code>specific date</code>, and <code>dynamic date</code>. For examples of these types, please see the <a href="#optional-parameter-type-examples">Optional parameter type examples</a> section below.</td></tr><tr><td>Value</td><td>Available value fields depend on your type selection above. For examples, please see the <a href="#optional-parameter-type-examples">Optional parameter type examples</a> section below.</td></tr></tbody></table>

### Optional parameter type examples

As noted above, the parameter type selected determines the user experience of updating this parameter (via [connection shapes](/product-documentation/process-flows/building-process-flows/process-flow-shapes/standard-shapes/connector-shape.md)) in [process flows](/product-documentation/process-flows/about-process-flows.md). Below is an example of each parameter type, so you can see the resulting behaviour in a process flow.

<details>

<summary><img src="/files/VDlwYFR9Br2ScHUDewYv" alt="" data-size="line"> String</summary>

When a parameter **type** is set to **string**, the user is prompted to add their required value in a single text field.

Below we have configured a 'Product Type' parameter with a **string** type:

![](/files/jgqQz59WOmBP0QHi52eb)

When a user adds an instance for this connector to a process flow and selects this endpoint, they will see a 'Product Type' parameter option, with a text field where they can enter a value:

![](/files/he7zRwUaTXrmGTAUv3bc)

</details>

<details>

<summary><img src="/files/VDlwYFR9Br2ScHUDewYv" alt="" data-size="line"> Number</summary>

When a parameter **type** is set to **number**, the user is prompted to add their required value in a single numeric field.

Below we have configured an 'Order Number' parameter with a **number** type:

![](/files/tq9j7rnDazkwY6Tm80KY)

When a user adds an instance for this connector to a process flow and selects this endpoint, they will see an 'Order Number' parameter option, with a text field where they can enter a value:

![](/files/prmHHq8B60d70Tu7Q8xr)

</details>

<details>

<summary><img src="/files/VDlwYFR9Br2ScHUDewYv" alt="" data-size="line"> Dynamic date</summary>

When a parameter **type** is set to **dynamic date**, the user is prompted to provide a +/- number of seconds, minutes, hours, days, months, years to match on, relative to the current date.

Below we have configured a 'Date Created' parameter with a **dynamic date** type:

![](/files/rh9r7Psdr15oknNWIe0f)

When a user adds an instance for this connector to a process flow and selects this endpoint, they will see a 'Date Created' parameter option, with selectors to choose the required period:

![](/files/N3oZulQXuyEovJaJmt6G)

</details>

<details>

<summary><img src="/files/VDlwYFR9Br2ScHUDewYv" alt="" data-size="line"> Specific date</summary>

When a parameter **type** is set to **specific date**, the user is prompted to select a specific date, using a date picker.

Below we have configured a 'created at' parameter with a **specific date** type:

![](/files/jPZmCVSnFyxK1XCAYaRr)

When a user adds an instance for this connector to a process flow and selects this endpoint, they will see a 'Created At' parameter option, with selectors to choose a specific date:

![](/files/36GNah9B5XvdYXHhIe30)

</details>

## Updating & removing parameters

Having added a parameter, you can simply click its name to access details in edit mode - for example:

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

From here, you can edit **key** and **value** fields, or choose the **delete** this entry - for example:

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