Documentation Center

Configuring trigger types during initial implementation

The initial-triggertypes.json contains a set of default trigger types, each having default values. During your initial implementation of Experience Optimization, you should evaluate these default trigger types and modify them, as needed. You can also configure your own custom types.

About this task

This process adds the initial-triggertypes.json file to your OpenSearch resources with default trigger types. Configure these to your specific needs. After installing Experience Optimization and starting the Management Service, the Triggers get created in Elastic search.

Procedure

  1. On your ElasticSearch instance, go to the location of the ElasticSearch indexes.
  2. Go to the config\ folder.
  3. Open the initial-triggertypes.json configuration file in a text editor.
  4. Add a <trigger-type> element and specify the following attributes:

    A trigger type consists of the following:

    id
    A unique ID for the trigger type.
    name
    A name that will be displayed in the user interface.
    url-param
    A URL parameter sent in the OpenSearch query for the trigger type.
    The URL parameter consists of two parts: a Claim prefix and the last part of a Claim URI. For example, in the URL parameter am_ex_age, am_ex is the Claim Prefix and _age is the subpart. For information on configuring Claim prefixes, see the <AmbientData> element.
    basetype
    A basetype which defines the type of data that is required when specifying the trigger.
    Values:
    • text
    • date
    • boolean
    • number
    canMultiSelect
    Indicates whether users can select one or multiple values when defining triggers for Promotions.
    Values:
    • true – users can select more than one value for the trigger.
    • false – users can select only one value for the trigger.
    triggerValues
    Defines the default values of the trigger type and also the data type.
    The subparameter name indicates the input type, and is one of the following:
    • booleanValues – values are "true" or "false" only.
    • stringValues – values are text strings.
    Directly after this subparameter, the values of the trigger appear as a comma-separated list, enclosed in square brackets. String values must be enclosed in quotes.
    Examples:
    "triggerValues": {
            "booleanValues": [true, false]
          }
    "triggerValues": {
            "stringValues": ["Chrome", "Firefox", "MSIE", "Opera", "Safari"]
  5. Save the initial-triggertypes.json.
  6. Copy the edited initial-triggertypes.json to all your OpenSearch instances and restart them.