# Reusable Logic Configs

If you have variables or configuration that are too large or complex to define in your rules directly, you can leverage **configs** to define that information for your rules to access in an efficient way.

## Set up a Config

To set up a config, navigate to your form logic rules and click on the **Settings** button. This will open a pop-up that gives you an option to upload your config in CSV format. A typical workflow is:

1. Define your configuration in a spreadsheet (e.g. a list of stores by region, list of activities by time, etc). Make sure the first row of your CSV is a list of column headers.
2. Export the spreadsheet to a CSV and upload it to Feathery.
3. Feathery automatically stores and indexes your uploaded data, making it available to efficiently query from your rule itself. The data is formatted as an array of objects, where each object is a row of the spreadsheet that maps from a sepcific header to the value for that specific row and column.

<figure><img src="https://640450274-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHAVngDAEk3s8Bw7P6Ntz%2Fuploads%2FGUZ9WMvzaCkoZIeKq5X4%2FScreenshot%202025-03-17%20at%205.28.56%E2%80%AFPM.png?alt=media&#x26;token=270af480-235b-48ef-b664-95f78f360aec" alt=""><figcaption></figcaption></figure>

## Use Configs in a Logic Rule

To use a config in your logic rule, you can leverage the `feathery.getConfig({filter, keys, unique})`  method in your rule.

* `filter`: A map from spreadsheet headers to the values that rows being returned must contain. If not specified, all config values will be returned.
* `keys` : A list of spreadsheet columns to be returned. If not specified, all columns will be returned.
* `unique` : Only return spreadsheet rows with unique sets of values to be returned.

Make sure to `await` the promise returned from the method to get the actual values to use.
