# defineCustomSetting

> API reference for defineCustomSetting: parameters, properties, and return types.

Defines a custom setting with a value matching its data type. Supply both permission groups when creating a new setting.

```ts
import { defineCustomSetting } from '@rippling/rippling-sdk';
```

## Properties

| Property | Required | Type | Description |
| --- | --- | --- | --- |
| `apiName` | Required | `string` | Stable, nonempty API name used to reference this setting. |
| `dataType` | Required | `"STRING" \| "SECRET" \| "NUMBER" \| "BOOLEAN"` | Use STRING or SECRET with a string value or null.<br>Use NUMBER with a safe integer, a decimal string or null.<br>Use BOOLEAN with true, false or null. |
| `name` | Required | `string` | Display name shown for this setting. |
| `value` | Required | `null \| string \| number \| boolean` | Text value for STRING or SECRET, or null.<br>Pass a safe integer as a number, or pass null. Use a string for decimals or integers beyond JavaScript's safe integer range.<br>Boolean value (true or false), or null. |
| `manageGroup` | Optional | `null \| [DefinedGroup](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/DefinedGroup-09c3816e)` | Group whose members can view and edit the setting and manage its access. Supply both viewGroup and manageGroup when creating a new setting. |
| `viewGroup` | Optional | `null \| [DefinedGroup](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/DefinedGroup-09c3816e)` | Group whose members can view the setting and include it in functions. Supply both viewGroup and manageGroup when creating a new setting. |

## Match properties to dataType

| dataType | value |
| --- | --- |
| `"STRING" \| "SECRET"` | `string \| null` |
| `"NUMBER"` | `string \| number \| null` |
| `"BOOLEAN"` | `boolean \| null` |

[Complete options type](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/DefineCustomSettingProps-305f6d9f)

TypeScript signature

```ts
defineCustomSetting(props: DefineCustomSettingProps): DefinedCustomSetting;
```

## Returns

```
DefinedCustomSetting
```

## Availability

| Capability | Support |
| --- | --- |
| Pull into a project | Supported |
| Runtime operations | Not available for this helper |

Source: https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/defineCustomSetting

> For the complete documentation index, see [llms.txt](https://developer.rippling.com/llms.txt). Public pages have a Markdown version at the same URL with .md added.
