com.ibm.commerce.marketing.commands.elements

Class RecurringOrderTriggerTaskCmdImpl

  • All Implemented Interfaces:
    MarketingCampaignElementTaskCmd, RecurringOrderTriggerTaskCmd, 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 RecurringOrderTriggerTaskCmdImpl
    extends MarketingCampaignElementTaskCmdImpl
    implements RecurringOrderTriggerTaskCmd
    This command validates the Recurring Order Trigger at activity activation, and forwards the list of customers whose recurring order property (ex: starting date, ending date, canceled date etc) is at the specific month and day or recurring order start/end dates fall a certain time period or order total is of a certain value. For reference, the recurring order trigger types are mapped as follows: beforeEnd = recurring order end date is days away afterStart = recurring order start date has passed for days afterEnd = recurring order end date has passed for days afterCancel = recurring order cancel date has passed for days To be added: afterSuspend = recurring order suspend date has passed for days afterSuspend = recurring order suspend 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

      • RecurringOrderTriggerTaskCmdImpl

        public RecurringOrderTriggerTaskCmdImpl()
    • 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 recurringOrderTriggerType parameters are set. if repeatSchedule is 'runOnce', it checks if the start date/end date/order total 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.
      • processRecurringOrderTrigger

        public void processRecurringOrderTrigger(java.lang.Integer storeId,
                                                 java.lang.Integer elementId,
                                                 java.lang.Integer activityId,
                                                 java.lang.String targetMM,
                                                 java.lang.String targetDD,
                                                 java.lang.String recurringOrderTriggerType,
                                                 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 checkOrderTotalRange,
                                                 java.lang.String amountOperator1,
                                                 java.lang.String amountOperator2,
                                                 java.lang.String amountValue1,
                                                 java.lang.String amountValue2,
                                                 java.lang.String amountCurrency)
        This method finds all the users whose recurring order property is at the specific date or meets the additional start date/end date/order total 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 recurring order property.
        targetDD - The targeted day of month of the recurring order property.
        recurringOrderTriggerType - The value representing the recurring order 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.
        checkOrderTotalRange - The value indicating whether the order total filter is selected.
        amountOperator1 - The first operator to compare the order total to.
        amountOperator2 - The second operator to compare the order total to.
        amountValue1 - The first amount to compare the order total to.
        amountValue2 - The second amount to compare the order total to.
        amountCurrency - The currency that the specified amounts are in.
      • getUsersByRecurringOrderProperty

        public java.util.List getUsersByRecurringOrderProperty(java.lang.Integer storeId,
                                                               java.lang.String targetMM,
                                                               java.lang.String targetDD,
                                                               java.lang.String recurringOrderTriggerType,
                                                               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 checkOrderTotalRange,
                                                               java.lang.String amountOperator1,
                                                               java.lang.String amountOperator2,
                                                               java.lang.String amountValue1,
                                                               java.lang.String amountValue2,
                                                               java.lang.String amountCurrency)
        This method gets the member IDs and personalization IDs for customers whose recurring order 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/order total 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.
        recurringOrderTriggerType - The value representing the recurring order 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.
        checkOrderTotalRange - The value indicating whether the order total filter is selected.
        amountOperator1 - The first operator to compare the order total to.
        amountOperator2 - The second operator to compare the order total to.
        amountValue1 - The first amount to compare the order total to.
        amountValue2 - The second amount to compare the order total to.
        amountCurrency - The currency that the specified amounts are in.
        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.