Company settings
Learn about Settings.get / getAll for company-configurable settings in your extension.
Settings are the company-configurable knobs your extension exposes to company admins. Declare defaults in the manifest’s config field; the company admin can override them in the Backfill dashboard.
Signatures
Settings.get(key: string): any;
Settings.getAll(): Record<string, any>;
Declaring defaults
// backfill.config.ts
export default defineExtension({
key: "tax-calcs",
name: "Tax Calculations",
config: {
taxRate: 8.25,
taxLabel: "Sales Tax",
enableTaxOnInvoices: true,
enableTaxOnSalesReceipts: true,
},
});
Reading
import { Settings } from "@backfill-io/sdk";
const all = Settings.getAll();
if (!all.enableTaxOnInvoices) return null;
const rate = Settings.get("taxRate") ?? 8.25;
Settings.getAll() returns the merged map: manifest defaults overridden by per-installation values the admin set. Settings.get(key) is shorthand for Settings.getAll()[key].
config vs. secrets
Goes in config | Goes in secrets |
|---|---|
| Knobs visible to the admin in the Backfill dashboard. | Encrypted credentials. |
| Plain JSON values: numbers, strings, booleans, arrays. | Strings, written via CLI or settings UI. |
Returned by Settings.getAll() | Read with Secrets.get(name); never returned to the dashboard read API. |
If a value is sensitive (an API key, a webhook signing secret), put it in Secrets, not config.
Settings schema for connectors
Connectors use a richer connection.settingsSchema (JSON Schema) instead of config. See Connectors → Settings schema. Plain extensions stick with config.
When changes take effect
config defaults are part of the backfill.config.ts manifest. Changing them requires a redeploy. Admin overrides take effect immediately.