Skip to main content
replaced http://tridion.stackexchange.com/ with https://tridion.stackexchange.com/
Source Link

It's possible to do both of those things using the Fredhopper REST service. The labels need to be specified separately using a different endpoint.

It's a little complicated, so I usually recommend that you use the LocalizationHelper class from the SmartTarget Java API. That is what SmartTarget uses to keep the list of Audience Manager Segments updated and showing the title of them instead of the URI that it uses internally.

Here is some sample code taken from another, similar questionanother, similar question:

// Supply user-friendly titles for the trigger values (optional)
LocalizationHelper localizationHelper = new LocalizationHelper();
// productValuesAndLabels is a HashMap<String, String> of values and their titles
localizationHelper.addTriggerTypeLabels("ProductType", productValuesAndLabels);

// Add or update the actual trigger
TriggerTypesHelper triggerTypesHelper = new TriggerTypesHelper();
TriggerType triggerType = triggerTypesHelper.createTriggerType("ProductType", "text", "my_product_type", triggerValues);

boolean success = triggerTypesHelper.addTriggerType(triggerType);

It's possible to do both of those things using the Fredhopper REST service. The labels need to be specified separately using a different endpoint.

It's a little complicated, so I usually recommend that you use the LocalizationHelper class from the SmartTarget Java API. That is what SmartTarget uses to keep the list of Audience Manager Segments updated and showing the title of them instead of the URI that it uses internally.

Here is some sample code taken from another, similar question:

// Supply user-friendly titles for the trigger values (optional)
LocalizationHelper localizationHelper = new LocalizationHelper();
// productValuesAndLabels is a HashMap<String, String> of values and their titles
localizationHelper.addTriggerTypeLabels("ProductType", productValuesAndLabels);

// Add or update the actual trigger
TriggerTypesHelper triggerTypesHelper = new TriggerTypesHelper();
TriggerType triggerType = triggerTypesHelper.createTriggerType("ProductType", "text", "my_product_type", triggerValues);

boolean success = triggerTypesHelper.addTriggerType(triggerType);

It's possible to do both of those things using the Fredhopper REST service. The labels need to be specified separately using a different endpoint.

It's a little complicated, so I usually recommend that you use the LocalizationHelper class from the SmartTarget Java API. That is what SmartTarget uses to keep the list of Audience Manager Segments updated and showing the title of them instead of the URI that it uses internally.

Here is some sample code taken from another, similar question:

// Supply user-friendly titles for the trigger values (optional)
LocalizationHelper localizationHelper = new LocalizationHelper();
// productValuesAndLabels is a HashMap<String, String> of values and their titles
localizationHelper.addTriggerTypeLabels("ProductType", productValuesAndLabels);

// Add or update the actual trigger
TriggerTypesHelper triggerTypesHelper = new TriggerTypesHelper();
TriggerType triggerType = triggerTypesHelper.createTriggerType("ProductType", "text", "my_product_type", triggerValues);

boolean success = triggerTypesHelper.addTriggerType(triggerType);
Source Link
Peter Kjaer
  • 19.8k
  • 1
  • 23
  • 56

It's possible to do both of those things using the Fredhopper REST service. The labels need to be specified separately using a different endpoint.

It's a little complicated, so I usually recommend that you use the LocalizationHelper class from the SmartTarget Java API. That is what SmartTarget uses to keep the list of Audience Manager Segments updated and showing the title of them instead of the URI that it uses internally.

Here is some sample code taken from another, similar question:

// Supply user-friendly titles for the trigger values (optional)
LocalizationHelper localizationHelper = new LocalizationHelper();
// productValuesAndLabels is a HashMap<String, String> of values and their titles
localizationHelper.addTriggerTypeLabels("ProductType", productValuesAndLabels);

// Add or update the actual trigger
TriggerTypesHelper triggerTypesHelper = new TriggerTypesHelper();
TriggerType triggerType = triggerTypesHelper.createTriggerType("ProductType", "text", "my_product_type", triggerValues);

boolean success = triggerTypesHelper.addTriggerType(triggerType);