Settings Scope Precedence
Settings in the SDK are scoped: the same setting key can carry a different value at each scope level, and the runtime resolves them in a fixed precedence order.

The five scopes
The ladder is Core's Scope enum (LaravelUi5\Core\Parameters\Enums\Scope), from least to most specific:
| Scope | Meaning |
|---|---|
Platform | The default declared in code, seeded by ui5:sync (least specific) |
Installation | Shared override, written by an operator admin |
Tenant | Shared override, written by a tenant admin or above |
Site | Shared override, written by a local admin or above |
User | Personal override for one partner (most specific) |
Each shared scope holds at most one value per setting. The rows carry no tenant or site id: one installation is one tenant (Tenancy). Who may write which scope is on Reading & Writing.
Resolution order
Platform < Installation < Tenant < Site < UserWhen the runtime asks "what is the value of approval.threshold for this artifact?", the highest scope present wins. A User value wins over a Site value, a Site value over a Tenant value, and so on down to the Platform default.
User is the only personal scope. A read sees every shared row (Platform to Site) plus the current actor's own User rows, never another partner's.
This means:
- Defaults live at
Platform. Declare a setting with Core's#[Setting]attribute;ui5:syncwrites the declaration, its default included. It belongs to code: the settings writer refusesScope::Platform, so a default changes only when its declaration changes. - Values live above it. Writing at
Installation,Tenant,SiteorUseris gated by the setting's edit level and by which scopes the actor's system level may write. - Resetting a value deletes it, and the value falls back to the next scope present.
Storage
Settings live in two tables: the declaration, which code owns, and the values, which people own.
sdk_settings holds one declaration per artifact and key, written only by ui5:sync:
| Column | Meaning |
|---|---|
artifact_id | the artifact the setting belongs to (FK → sdk_artifacts.id) |
setting | the key (the semantic name) |
default_value | the JSON-encoded default — the Platform level |
value_type | Core ValueType; see Type Validation |
level | Core EditLevel, the minimum level allowed to set a value |
value_help, value_help_scope | the value-help picker bound to a Model-typed setting |
model_class | the Eloquent model class of a Model-typed setting |
sdk_setting_values holds one value per setting, scope and (for User scope) partner, written only through the Settings app:
| Column | Meaning |
|---|---|
setting_id | the declaration it overrides (FK → sdk_settings.id, restrict) |
scope | tinyint holding the Scope value — Installation or above, never Platform |
partner_id | the owning partner (FK → sdk_partners.id, restrict); set only for User scope |
set_by | the partner who last wrote the value |
value | the JSON-encoded value |
Every change of a value lands in the change log. A declaration with values cannot be deleted, and a partner is archived, never deleted.
changed in 2.0Before 2.0 one table held both: the `Platform` row was the declaration, every other row a value that copied the declaration's type, level and value help.Reading a setting
Your code reads a setting with SdkContext::setting() and gets the value that wins for the acting partner. Which artifact's settings a request sees is on Reading & Writing.