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 or connection environment. Each entry maps user attribute values or connection names to extension model names. Use it for per-customer models, localization, per-market models, or other user-specific customization.

Syntax

To route by user attribute, use either mappings (explicit) or map_pattern (programmatic), but not both. To route by connection environment, use environment_connection, alone or in the same extension as an attribute mapping.

Properties

object[]
required
A list of dynamic extensions to apply to the model. Each extension must specify at least one of mappings, map_pattern, or environment_connection. You can combine environment_connection with either of the other two. If you set both mappings and map_pattern, Omni shows a validation warning and ignores mappings.

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.

Route extensions by connection environment

In this example, each market has its own connection environment. The connections are named uk and usa, and each one has its own extension model.
Apply per-market extension models by connection environment
Users whose queries run against the uk connection have the uk_market_model extension applied; users on usa have us_market_model applied. Users on any other connection have no extension applied.