I'm following up on Adding a Date option to Session Footprint and Ambient Data Framework Documentation for SDL Tridion 2011.
Specifically I'm trying to follow this excellent answer (thanks much, Peter!).
My setup has SDL Tridion 2011 (with SmartTarget), Fredhopper, and Experience Manager with Session Preview as seen in cd_ambient_conf.xml
:
<Cartridge File="cd_webservice_preview_cartridge.xml"/>
<Cartridge File="footprint_cartridge_conf.xml"/>
<Cartridge File="date_cartridge.xml"/><!-- custom -->
<Cartridge File="smarttarget_cartridge_conf.xml"/>
I'm able to add new claims with a custom XPM Footprint setting and through the following.
public class DateWebClaimProcessor extends AbstractClaimProcessor {
@Override
public void onRequestStart(ClaimStore claimStore)
throws AmbientDataException {
try {
DateFormat formatter = new SimpleDateFormat("yyyyMMdd");
Date today = new Date();
claimStore.put(new URI("fh:today:date"), today);
if (claimStore.contains(new URI("fh:user:date")))
{
// won't run -- claim processor currently runs out of order, maybe?
String claimdate = claimStore.get(new URI("fh:user:date")).toString();
Date date = formatter.parse(claimdate);
claimStore.put(new URI("fh:converted:date"), date);
}
}
catch (Exception ex) {
throw new AmbientDataException(ex);
}
}
After choosing a specific footprint date and using the ClaimStore page example I have:
fh:today:date 12/5/2013 12:53:12 AM (added by above)
fh:user:date 2012-11-01T00:00:00 (added by Footprint setting)
But I don't get fh:converted:date
. I think I need to confirm the order of my cartridges and see that the Order of execution for ADF cartridges is (partly?) based on OutputClaim
and InputClaim
definitions in Cartridges.
How can I tell what order Session Preview, SmartTarget, and the Footprint run? Is there an expected order or should I check the logs? I'm trying to visual this diagram but with XPM, ST, and FH. :-)
My custom footprint isn't really in the footprint_cartridge_conf.xml
as an OutputClaim
(in footprint_cartridge.jar
), so maybe I'm on the wrong track?
Functionally, I'm trying to get a date set in the footprint recognized by SmartTarget to get date-based campaigns to show in XPM.