Skip to main content
See Shared extension models for an overview of extension models.
Routes each user to a shared extension model based on the user’s user attributes. Each entry maps user attribute values to extension model names. Use it for per-customer models, localization, or other user-specific customization.

Syntax

Each extension must use either mappings (explicit) or map_pattern (programmatic), but not both.

Properties

object[]
required
A list of dynamic extensions to apply to the model. Each extension must specify either mappings or map_pattern, but not both.

Examples

Explicit customer extensions

In this example, users with a customer_id of blobs_r_us have the blobs_r_us extension model applied; users with mega_blobs have the mega_blobs extension model applied.
Apply per-customer extension models

Localize model by language attribute

In this example, each extension model (model_es, model_fr, model_de) overrides view and field labels with translated values for that language.
Localize the model by language
Users with the language attribute set to es or spanish have the model_es extension applied, and so on. Users whose attribute value doesn’t match any entry in a values_for_model list have no extension applied.

Programmatic extensions by department

In this example, the user’s department attribute value is substituted into the pattern to produce the extension model name.
Programmatically apply per-department extension models
A user with department: marketing has the marketing_extension model applied; a user with department: sales has sales_extension applied. This avoids enumerating each department explicitly, but requires extension model names to follow a set pattern.

Create a pattern with multiple user attributes

In this example, both department and region are combined to generate the extension model name.
Combine multiple attributes in the pattern
A user with department: marketing and region: us has the marketing_us_model extension applied. If a user has multiple values for either attribute, all combinations are generated and any matching extension models are applied.