Search This Blog

Thursday, November 29, 2012

Testing dialog activity - Customer Abandons Shopping Cart


  1. Register with the store in the test environment as a test customer; then place items in the shopping cart.
  2. For the ORDERS table, run an SQL query to simulate an abandoned cart for the test customer.
    For example, if the criteria for the trigger is "Check for customers with carts abandoned for 3 days," then manually change the ORDERS.LASTUPDATE data so that the last update date for the test customer's order was three days ago:
    1. To get the order ID and order time for the test customer's order, run the following SQL query:
      SELECT ORDERS_ID, LASTUPDATE FROM ORDERS 
      WHERE MEMBER_ID = (SELECT USERS_ID FROM 
      USERREG WHERE LOGONID='logon_ID')
       ORDER BY ORDERS_ID DESC
      Where logon_ID is the test customer's logon ID created during registration.
    2. To set the last update date for this order to be, for example, 3 days in the past, run the following SQL query:
      UPDATE ORDERS SET LASTUPDATE = 
      'updated_order_time' WHERE 
      ORDERS_ID = order_ID
      Where:
      updated_order_time
      is the timestamp to represent when the cart was abandoned for testing purposes. Use the same timestamp format used for the order time you retrieved with the first SQL query.
      order_ID
      is the ID of the test customer's order that you retrieved with the first SQL query
  3. Run an SQL query to force the daily processing of the trigger to occur again.
    Once a day at 2:00 a.m. (by default), the marketing services send the Customer Abandons Shopping Cart trigger to be processed by the SendMarketingTriggers scheduled job. On the day you are testing, if the send time has already passed, you can resend the trigger for processing. To do so, use the following SQL query to remove the entry from the DMACTATTR table that records that the trigger has already been processed. As a result, the trigger will be processed the next time the SendMarketingTriggers scheduled job runs.
    DELETE FROM DMACTATTR WHERE DMACTIVITY_ID = 
    0 OR DMACTIVITY_ID = (SELECT DMACTIVITY_ID 
    FROM DMACTIVITY WHERE 
    NAME = 'activity_name');
    Where activity_name is the name of the activity you are testing.
  4. Using the Administration Console, either run the SendMarketingTriggers jobmanually or wait for the next time the job runs according to its schedule interval setting.

No comments:

Post a Comment