Locates the last profile marker with a particular key that was added to a profile.

Class Name

atg.markers.userprofiling.droplet.ProfileHasLastMarkerWithKey

Component

/atg/markers/userprofiling/droplet/ProfileHasLastMarkerWithKey
Droplet

Required Input Parameters

key

The value in the marker’s key property. Set this parameter to ANY_VALUE to indicate that the marker’s key value is irrelevant for your purposes. For example:

<dsp:param name="key"
bean="ProfileHasLastMarkerWithKeyDroplet.ANY_VALUE"/>

Optional Input Parameters

itemId

The ID of the profile with a marker to access. If omitted, the value of the input parameter item is used.

item

The profile item that has a marker you want to access. If omitted, the active profile is used.

value

The value in the marker’s value property. You can set this parameter to NULL or omit it in order to return the marker only if its value property is null.

Set this parameter to ANY_VALUE to indicate that the marker’s value value is irrelevant for your purposes. For example:

<dsp:param name="value"
bean="ProfileHasLastMarkerWithKeyDroplet.ANY_VALUE"/>

data

The value in the marker’s data property. You can set this parameter to NULL or omit it in order to return marker only if its data property is null.

Set this parameter to ANY_VALUE, to indicate that the marker’s data value is irrelevant for your purposes. For example:

<dsp:param name="data"
bean="ProfileHasLastMarkerWithKeyDroplet.ANY_VALUE"/>

extendedProperties

A map that specifies any additional marker properties (set to the map’s key) and property values (set to the map’s value) that must exist on the profile marker that is retrieved.

markerManager

The Profile Marker Manager component to use. If omitted, the Profile Marker Manager indicated in the servlet bean’s repositoryMarkerManager property is used.

markerPropertyName

The property on the profile to check for markers. If omitted, the servlet bean uses the default value specified in its defaultMarkerPropertyName property.

markedItemType

The type of RepositoryItem that has markers you want to work with. If omitted, the servlet bean uses the default value specified in its defaultMarkedItemType property.

Output Parameters

marker

Contains the marker located by the servlet bean.

errorMsg

Contains any error messages generated during the servlet bean’s execution.

Open Parameters

error

Rendered when an error occurs during servlet bean execution.

true

Rendered when the last marker added with a certain key matches the specified criteria .

false

Rendered when the last marker added with a certain key does not match the specified criteria.

Usage Notes

ProfileHasLastMarkerWithKey determines whether the last profile marker added to the profile with a particular key has the additional parameters you specify. These additional parameters can be specific values for the value, data, or other marker properties you specify. If the last marker with a particular key matches the other parameters you specify, the true open parameter is rendered and the marker is made available to the page through the marker output parameter.

For more information on working with marked profiles, see the UsingMarkedProfiles section in the UsingProfileMarkers chapter of the ATG Personalization Programming Guide.

Example

The following example shows how to determine if the last profile marker added to the current profile with a key of partner has a value of travel site A. Users who have such a marker see a message informing them about airfare discounts.

<dsp:droplet
 name="/atg/markers/userprofiling/droplet/ProfileHasLastMarkerWithKeyDroplet">
   <dsp:param name="key" value="partner"/>
   <dsp:param name="value" value="travelSiteA"/>
   <dsp:param name="data" bean="ProfileHasMarkerWithKeyDroplet.ANY_VALUE"/>

   <dsp:oparam name="true">
      When you book your hotel room with us, you'll receive a discount on airfare
      if you book your flight with travel site A!
   </dsp:oparam>

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