Custom Metadata Types are a Salesforce data structure that looks like a custom object but stores configuration as deployable metadata. The records themselves deploy via change sets or Salesforce DX, just like fields and classes.
Why use it: deployable values (no re-entering in production), automatically cached (no SOQL governor cost), queryable from Validation Rules and Formulas, packageable, and type-safe.
apex List<Region_Tax__mdt> rates = [SELECT Region__c, Rate__c FROM Region_Tax__mdt]; Region_Tax__mdt rate = Region_Tax__mdt.getInstance('US');
Common use cases: feature flags, integration endpoints, region-specific business rules, mappings.
Limitation: read-only at runtime. For runtime-mutable per-user data, fall back to Custom Settings.
