Defining trigger types
Define triggers in the trigger-types.xml configuration file.
Procedure
- Go to your Index Server
FREDHOPPER_HOME\data\instances\indexer\configdirectory. - Open the
trigger-types.xmlconfiguration file in a text editor. - 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.xmlfile, and a subpart (the last part of a Claim URI). For example, in the URL parameteram_ex_age,am_exis the Claim Prefix and_ageis 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:
textdatebooleannumber
Note: Although Fredhopper also supports Triggers of basetypelocationandschedule, these are not exposed in the Targeting interface. SmartTarget users cannot therefore create Promotions using these trigger types. 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]*
- 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.
- Save the
trigger-types.xml. - Copy the
trigger-types.xmlto all your Fredhopper instances and restart them.