com.ibm.commerce.location.marketing

Class MarketingEngineDecision

  • java.lang.Object
    • com.ibm.commerce.location.marketing.MarketingEngineDecision


  • public class MarketingEngineDecision
    extends java.lang.Object
    The MarketingEngineDecision class contains logic for whether a given location change (from old to new) for a given PersonalizationID should invoke the Marketing Engine.

    The default implementation considers two thresholds -- one in space and one in time -- in making its decision. These thresholds are defined in the wc-component.xml configuration file. The space threshold will invoke the Marketing Engine if the physical distance between consecutive ClientLocations exceeds the threshold. The time threshold will invoke the Marketing Engine if the time difference between publication of consecutive ClientLocations exceeds the threshold. Note that consecutive ClientLocations must meet EITHER the space OR the time threshold in order to invoke the Marketing Engine. For example, this logic ensures that:

    • a customer check-in at a store on day 1 and the same store again on day 2 will invoke the Marketing Engine on both days (time threshold met), and
    • a customer check-in at one store followed by a check-in at a different store within the time threshold will invoke the Marketing Engine for both stores (space threshold met).

    In order to compute whether a customer's previous and current locations meet the thresholds, this class maintains an in-memory cache of ClientLocations (one record per PersonalizationID). This behavior can be over-ridden by extending the DispatchClientLocationEventCmd to perform any additional required behaviors.

    • Method Detail

      • shouldInvokeMarketingEngineForClientLocation

        public boolean shouldInvokeMarketingEngineForClientLocation(ClientLocationType location)
        Determine if the marketing engine should be invoked for the given ClientLocation noun
        Parameters:
        location - The client location
        Returns:
        True if the marketing engine should be invoked; false otherwise.