Skip to main content
See Shared extension models for an overview of extension models.
Advanced feature for dynamically extending the model based on user attributes. Each extension maps user attribute values to model extensions, enabling user-specific model customization. This can be used for localization or other advanced use cases. This parameter requires enabling the Shared extensions model feature for your Omni instance. Reach out to Omni support to have this feature enabled.

Syntax

Each extension must use either mappings (explicit) or map_pattern (programmatic), but not both.
dynamic_shared_extensions:
  - user_attribute: <user_attribute_reference>
    mappings:
      <extension_model_name>:
        values_for_model: [<user_attribute_value>, ...]

Properties

dynamic_shared_extensions
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
dynamic_shared_extensions:
  - user_attribute: customer_id
    mappings:
      blobs_r_us:
        values_for_model: [blobs_r_us]
      mega_blobs:
        values_for_model: [mega_blobs]

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
dynamic_shared_extensions:
  - user_attribute: language
    mappings:
      model_es:
        values_for_model: [es, spanish]
      model_fr:
        values_for_model: [fr, french]
      model_de:
        values_for_model: [de, german]
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-deparment extension models
dynamic_shared_extensions:
  - user_attribute: department
    map_pattern: "{{omni_attributes.department}}_extension"
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
dynamic_shared_extensions:
  - map_pattern: "{{omni_attributes.department}}_{{omni_attributes.region}}_model"
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.