Documentation Center

Defining trigger types

Define triggers in the trigger-types.xml configuration file.

Procedure

  1. Go to your Index Server FREDHOPPER_HOME\data\instances\indexer\config directory.
  2. Open the trigger-types.xml configuration file in a text editor.
  3. Add a <trigger-type> element and specify the following attributes:
    <trigger-types> 
        <trigger-type url-param="ClaimPrefix_Subpart" basetype="type" name="GUIName"/>
    </trigger-types>

    A trigger type consists of the following:

    url-param
    A URL parameter sent in the Fredhopper query for the trigger type.
    The URL parameter consists of two parts: a Claim prefix, as configured in the smarttarget_conf.xml file, and a subpart (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 input required when specifying the trigger. The following basetypes are supported:
    • text
    • date
    • boolean
    • number
    name
    A name as displayed in the user interface. Do not use special characters in names. It is recommended to not use spaces. Names must match the following pattern:
    [_a-zA-Z0-9]{1}[\-_a-zA-Z0-9]*
  4. Define the possible values of a trigger type using the <list-of-values> element:
    <trigger-type url-param="am_ex_city" basetype="text" name="am_City">
    	  <list-of-values multiselect="false" default-value="Amsterdam">
    			  <value>Amsterdam</value>
    			  <value>London</value>
    			  <value>New York</value>
    			  <value>Paris</value>
    		</list-of-values>
    	</trigger-type>

    You can specify whether the values are single or multiselect and what the default value is.

  5. Save the trigger-types.xml.
  6. Copy the trigger-types.xml to all your Fredhopper instances and restart them.