com.ibm.commerce.marketing.commands.elements

Class SubscriptionTriggerTaskCmdImpl

  • All Implemented Interfaces:
    MarketingCampaignElementTaskCmd, SubscriptionTriggerTaskCmd, com.ibm.websphere.cache.Sizeable, com.ibm.websphere.command.CacheableCommand, com.ibm.websphere.command.Command, com.ibm.websphere.command.CommandCaller, com.ibm.websphere.command.TargetableCommand, java.io.Serializable


    public class SubscriptionTriggerTaskCmdImpl
    extends MarketingCampaignElementTaskCmdImpl
    implements SubscriptionTriggerTaskCmd
    This command validates the Subscription Trigger at activity activation, and forwards the list of customers whose subscription property (ex: starting date, ending date, canceled date etc) is at the specific month and day or subscription start/end dates fall a certain time period or it is of a particular subscription catalog entry. For reference, the subscription trigger types are mapped as follows: beforeEnd = subscription end date is days away afterStart = subscription start date has passed for days afterEnd = subscription end date has passed for days afterCancel = subscription cancel date has passed for days
    See Also:
    Serialized Form
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
      • CLASSNAME

        public static final java.lang.String CLASSNAME
        The name of this class.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SubscriptionTriggerTaskCmdImpl

        public SubscriptionTriggerTaskCmdImpl()
    • Method Detail

      • validateParameters

        public java.util.List validateParameters(java.util.Map elementParameters)
        This method validates that all the required name value pairs that were set for the campaign element. It checks if the repeatSchedule is set. If repeatSchedule is 'runDaily', it checks if the numberOfDays and subscriptionTriggerType parameters are set. if repeatSchedule is 'runOnce', it checks if the start date/end date/subscription catentry filters are set, and checks if each filter's required parameters are set properly.
        Specified by:
        validateParameters in interface MarketingCampaignElementTaskCmd
        Overrides:
        validateParameters in class MarketingCampaignElementTaskCmdImpl
        Parameters:
        elementParameters - The name value pairs for this element.
        Returns:
        This method returns a list of ApplicationError exceptions that contains any validation errors. The list may be empty or be null.
      • processSubscriptionTrigger

        public void processSubscriptionTrigger(java.lang.Integer storeId,
                                               java.lang.Integer elementId,
                                               java.lang.Integer activityId,
                                               java.lang.String targetMM,
                                               java.lang.String targetDD,
                                               java.lang.String subscriptionTriggerType,
                                               java.lang.String startsBetweenDateRange,
                                               java.lang.String startDate1,
                                               java.lang.String startDate2,
                                               java.lang.String endsBetweenDateRange,
                                               java.lang.String endDate1,
                                               java.lang.String endDate2,
                                               java.lang.String catentryIdList)
        This method finds all the users whose subscription property is at the specific date or meets the additional start date/end date/subscription catentry filter options. and sends the list of users for processing.
        Parameters:
        storeId - The identifier of the store in which to find the users in the segment.
        elementId - The identifier of the trigger element.
        activityId - The identifier of the marketing activity.
        targetMM - The targeted month of the subscription's property.
        targetDD - The targeted day of month of the subscription's property.
        subscriptionTriggerType - The value representing the subscription's property to trigger upon.
        startsBetweenDateRange - The value indicating whether the start date range filter is selected.
        startDate1 - The date when the start date range begins.
        startDate2 - The date when the start date range ends.
        endsBetweenDateRange - The value indicating whether the end date range filter is selected.
        endDate1 - The date when the end date range begins.
        endDate2 - The date when the end date range ends.
        catentryIdList - The list of subscription catalog entry ids restricted to.
      • getUsersBySubscriptionProperty

        public java.util.List getUsersBySubscriptionProperty(java.lang.Integer storeId,
                                                             java.lang.String targetMM,
                                                             java.lang.String targetDD,
                                                             java.lang.String subscriptionTriggerType,
                                                             java.lang.String startsBetweenDateRange,
                                                             java.lang.String startDate1,
                                                             java.lang.String startDate2,
                                                             java.lang.String endsBetweenDateRange,
                                                             java.lang.String endDate1,
                                                             java.lang.String endDate2,
                                                             java.lang.String catentryIdList)
        This method gets the member IDs and personalization IDs for customers whose subscription's property is at the month specified in the targetMM parameter, and the day specified in the targetDD parameter, and/or the property meets the start date/ end date/subscription catentry filters.
        Parameters:
        storeId - The unique ID of the store.
        targetMM - The string for the specific month in MM format.
        targetDD - The string for the specific day in DD format.
        subscriptionTriggerType - The value representing the subscription's property to trigger upon.
        startsBetweenDateRange - The value indicating whether the start date range filter is selected.
        startDate1 - The date when the start date range begins.
        startDate2 - The date when the start date range ends.
        endsBetweenDateRange - The value indicating whether the end date range filter is selected.
        endDate1 - The date when the end date range begins.
        endDate2 - The date when the end date range ends.
        catentryIdList - The list of subscription catalog entry ids restricted to.
        Returns:
        This method returns the list with the customer information. Every element in the list is a child-list; in the child-list, the 1st element is the customer's member ID, and the 2nd element is the customer's personalization ID.