This page only applies to portals. If you’re embedding the SDK in an app you host yourself, pass props directly and skip it.
The config file
Every portal repository has aportal.runtime.json at its root. Config rides the commit, so the file that ships with a build is that build’s config — there’s no separate promote step.
{ shared: { name: value }, components: { type: { configId: { prop: value } } } }:
A component opts into config mode by taking a literal
configId — see Config mode. The portal save gate extracts that id into the component manifest and rejects a missing or non-literal one.
Two kinds of value
- Literal — a plain string, available at load with no network round trip (it’s bundled in the commit).
- Field reference —
{"$field": "<account field key>"}. Resolved per visitor to that field’s value on the signed-in customer’s account, so one build renders differently for each customer.
"" and a missing field both resolve to null.
Reading resolved values: useResolvedFields
Components in config mode resolve their own values, so you rarely need this hook — reach for it when you’re writing a custom component that wants the same per-customer data.
UseResolvedFieldsResult
isFieldRef(value) narrows a config value to { $field: string } — use it to decide whether a value needs to wait on loading.
Outside React: fetchResolvedFields
The same payload, without the hook:
GET /sdk/v1/config/portal for the session’s customer — see the API Reference.
Editing config
Locked properties are pinned platform-wide: they’re absent from the file by definition, resolve server-side under a stable schema name, and can’t be overridden per portal.