# Interface: ParamDef<T>

Defined in: [api_types.ts:322](https://github.com/coda/packs-sdk/blob/b2b4c9dba5ca748bdbb94481cc13b5ca3c328ef6/api_types.ts#L322)

The definition of a formula parameter.

## Extended by

- [`OptionalParamDef`](../OptionalParamDef/)
- [`RequiredParamDef`](../RequiredParamDef/)

## Type Parameters

| Type Parameter | | --- | | `T` *extends* `UnionType` |

## Properties

### autocomplete?

> `optional` **autocomplete**: [`MetadataFormula`](../../type-aliases/MetadataFormula/)

Defined in: [api_types.ts:357](https://github.com/coda/packs-sdk/blob/b2b4c9dba5ca748bdbb94481cc13b5ca3c328ef6/api_types.ts#L357)

A [MetadataFormula](../../type-aliases/MetadataFormula/) that returns valid values for this parameter, optionally matching a search query. This can be useful both if there are a fixed number of valid values for the parameter, or if the valid values from the parameter can be looked up from some API. Use [makeMetadataFormula](../../functions/makeMetadataFormula/) to wrap a function that implements your autocomplete logic. Typically once you have fetched the list of matching values, you'll use [autocompleteSearchObjects](../../functions/autocompleteSearchObjects/) to handle searching over those values. If you have a hardcoded list of valid values, you would only need to use [makeSimpleAutocompleteMetadataFormula](../../functions/makeSimpleAutocompleteMetadataFormula/).

______________________________________________________________________

### crawlStrategy?

> `optional` **crawlStrategy**: [`CrawlStrategy`](../CrawlStrategy/)

Defined in: [api_types.ts:434](https://github.com/coda/packs-sdk/blob/b2b4c9dba5ca748bdbb94481cc13b5ca3c328ef6/api_types.ts#L434)

Enables crawling for this parameter, where its values are populated from the results of another sync table. Crawling can simplify the user setup when a sync table has a required parameter that can be sourced from another sync.

Crawling is only implemented for sync tables and only during indexing in Superhuman Go.

#### Example

```
makeParameter({
  type: ParameterType.String,
  name: "project",
  description: "The ID of the project containing the tasks."",
  // Use the project IDs that come from the ID column in the Projects table.
  crawlStrategy: {
    parentTable: {
      tableName: "Projects",
      propertyKey: "id",
    },
  },
}),
```

#### See

[Crawling guide](https://head.coda.io/packs/build/latest/agents/indexing/crawling/)

______________________________________________________________________

### ~~defaultValue?~~

> `optional` **defaultValue**: [`SuggestedValueType`](../../type-aliases/SuggestedValueType/)\<`T`>

Defined in: [api_types.ts:361](https://github.com/coda/packs-sdk/blob/b2b4c9dba5ca748bdbb94481cc13b5ca3c328ef6/api_types.ts#L361)

#### Deprecated

This will be removed in a future version of the SDK. Use [ParamDef.suggestedValue](#suggestedvalue) instead.

______________________________________________________________________

### description

> **description**: `string`

Defined in: [api_types.ts:334](https://github.com/coda/packs-sdk/blob/b2b4c9dba5ca748bdbb94481cc13b5ca3c328ef6/api_types.ts#L334)

A brief description of what this parameter is used for, shown to the user when invoking the formula.

______________________________________________________________________

### ingestionSuggestedValue?

> `optional` **ingestionSuggestedValue**: [`SuggestedValueType`](../../type-aliases/SuggestedValueType/)\<`T`>

Defined in: [api_types.ts:374](https://github.com/coda/packs-sdk/blob/b2b4c9dba5ca748bdbb94481cc13b5ca3c328ef6/api_types.ts#L374)

The suggested value to be prepopulated for this parameter when used in an ingestion (sync table indexing). This value overrides [ParamDef.suggestedValue](#suggestedvalue) if set.

Useful in situations where the existing suggested value is used to scope down the synced data to what would fit within Coda's row limits, but during indexing you'd want to include a larger scope of data.

______________________________________________________________________

### instructions?

> `optional` **instructions**: `string`

Defined in: [api_types.ts:339](https://github.com/coda/packs-sdk/blob/b2b4c9dba5ca748bdbb94481cc13b5ca3c328ef6/api_types.ts#L339)

Instructions for LLMs on how to use this parameter, overrides the description for LLMs if set.

______________________________________________________________________

### name

> **name**: `string`

Defined in: [api_types.ts:326](https://github.com/coda/packs-sdk/blob/b2b4c9dba5ca748bdbb94481cc13b5ca3c328ef6/api_types.ts#L326)

The name of the parameter, which will be shown to the user when invoking this formula.

______________________________________________________________________

### optional?

> `optional` **optional**: `boolean`

Defined in: [api_types.ts:344](https://github.com/coda/packs-sdk/blob/b2b4c9dba5ca748bdbb94481cc13b5ca3c328ef6/api_types.ts#L344)

Whether this parameter can be omitted when invoking the formula. All optional parameters must come after all non-optional parameters.

______________________________________________________________________

### suggestedValue?

> `optional` **suggestedValue**: [`SuggestedValueType`](../../type-aliases/SuggestedValueType/)\<`T`>

Defined in: [api_types.ts:365](https://github.com/coda/packs-sdk/blob/b2b4c9dba5ca748bdbb94481cc13b5ca3c328ef6/api_types.ts#L365)

The suggested value to be prepopulated for this parameter if it is not specified by the user.

______________________________________________________________________

### supportsIncrementalSync?

> `optional` **supportsIncrementalSync**: `boolean`

Defined in: [api_types.ts:440](https://github.com/coda/packs-sdk/blob/b2b4c9dba5ca748bdbb94481cc13b5ca3c328ef6/api_types.ts#L440)

Whether this parameter is compatible with incremental sync. If not, it will be hidden from agent setup UI.

______________________________________________________________________

### type

> **type**: `T`

Defined in: [api_types.ts:330](https://github.com/coda/packs-sdk/blob/b2b4c9dba5ca748bdbb94481cc13b5ca3c328ef6/api_types.ts#L330)

The data type of this parameter (string, number, etc).
