ClassName

atg.markers.userprofiling.droplet.AddMarkerToProfile

Component

/atg/markers/userprofiling/droplet/AddMarkerToProfileDroplet

The AddMarkerToProfile servlet bean communicates with the Profile Marker Manager to create a profile marker and attach it to the appropriate profile, based on the marker and profile information you specify.

For more information about attaching profile markers to profiles, see the MarkingaUserProfile section in the UsingProfileMarkers chapter of the ATG Personalization Programming Guide.

Input Parameters

itemId
Specifies the ID of the profile item the marker is assigned to. If none is specified here, the value indicated in the item input parameter is used.

item
Specifies the profile item that the marker is assigned to. If none is specified here, the active profile is used.

key
This required parameter specifies the value that is saved to the marker’s key property. The profile marker key property holds a string that represents a similarity among a grouping of profile markers. For example, key can represent a type of profile marker or the circumstances under which the marker is assigned.

value
Specifies the value that is saved to the marker’s value property. The profile marker value property holds a string that is related to the key property.

data
Specifies the value that is saved to the marker’s data property. The profile marker data property holds a string that is related to the key and value properties.

extendedProperties
This parameter is a map that specifies any property values for marker properties other than key, value, and data that is saved to the new marker. The marker property is saved to the maps key and its property value is set to the map’s value.

duplicationMode
Specifies the duplication policy used by the Profile Marker Manager. Options include ALLOW_DUPLICATES, REPLACE_DUPLICATES, and NO_DUPLICATES. If a profile has a marker and a Profile Marker Manager attempts to add an identical marker to it, a mode of REPLACE_DUPLACES causes the existing marker to be replaced by the new one, while a mode of NO_DUPLICATES keeps the existing marker and discards the new one. If a duplication mode is not specified here, the servlet bean uses the default mode provided in its defaultDuplicationMode property.

For more information on duplication modes, see the ConfiguringtheProfileMarkerManager section of the UsingProfileMarkers chapter of the ATG Personalization Programming Guide.

markerManager
This parameter indicates the Profile Marker Manager component to use. If a Profile Marker Manager is not specified here, the Profile Marker Manager specified in the servlet bean’s repositoryMarkerManager property is used.

markerPropertyName
Specifies the property on the profile that stores the markers created by this servlet bean. If a property is not specified here, the servlet bean uses the default specified in its defaultMarkerPropertyName property.

markerItemType
Specifies the type of RepositoryItem used by the marker. If a repository type is not specified here, the servlet bean uses the default specified in its defaultMarkerItemType property.

markedItemType
Specifies the type of RepositoryItem that receives a marker. If a repository type is not specified here, the servlet bean uses the default specified in its defaultMarkedItemType property.

Output Parameters

marker
This parameter contains the profile marker created by the servlet bean.

errorMsg
This parameter contains any error messages generated during the servlet bean’s execution.

Open Parameters

output
This parameter is rendered when the marker is added to the profile.

error
This parameter is rendered when a marker should be created and attached to a profile, but one or both actions are not completed successfully.

Example

This example demonstrates how to add a profile marker to the active user profile. After the marker is added, the user sees a message encouraging the use of travel site A. Because the message is displayed only when the marker is added and the duplication mode prevents the same marker from being added twice, users sees the encouragement message only once.

<dsp:droplet
 name="/atg/markers/userprofiling/droplet/AddMarkerToProfileDroplet">
   <dsp:param name="key" value="partner"/>
   <dsp:param name="value" value="travelSiteA"/>
   <dsp:param name="duplicationMode" value="NO_DUPLICATES"/>

   <dsp:oparam name="output">
      We love travel site A! Check out our joint discounts.
   </dsp:oparam>

</dsp:droplet>
 
loading table of contents...