Operate > IBM Management Center for WebSphere Commerce > Marketing tool > Work with Web and Dialog activities > Test Web and Dialog activities


Tips for testing triggers and actions in Dialog activities

When you are testing a Dialog activity, you can trigger the activity in a test environment and verify whether the activity produces the right action for the target customer.

The following table provides some tips for simulating Dialog activity triggers in a test environment and speeding up the waiting period for certain triggers.

Trigger Test tips
Customer Is In Segment

  1. Create a test customer who belongs to the customer segment that the trigger checks. How you do this depends on the customer segment.

    For example, if the customer segment is "Female Customers," then register as a customer who specifies their gender as female on the registration page.

    Alternatively, to quickly add a registered customer to any customer segment, open the customer segment in the Marketing tool and use the Included customers field to add the customer.

    If the customer segment is built dynamically using the Add To Or Remove From Customer Segment action in a different marketing activity, then complete the activity flow in that marketing activity as a test customer who is then added dynamically to the segment.

  2. 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 Is In Segment 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.

  3. Use the Administration Console, either run the SendMarketingTriggers job manually or wait for the next time the job runs according to its schedule interval setting.
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. Use the Administration Console, either run the SendMarketingTriggers job manually or wait for the next time the job runs according to its schedule interval setting.
Customer Celebrates Birthday

  1. Register with the store in the test environment as a test customer whose supplied birth date meets the trigger criteria.

    For example, if the trigger criteria is "Check for customers whose birthday is in 3 days," then register as a customer whose birthday is three days after the day you are running the test. This way, the activity is triggered for the customer on the day you are testing.

  2. 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 Celebrates Birthday 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.

  3. Use the Administration Console, either run the SendMarketingTriggers job manually or wait for the next time the job runs according to its schedule interval setting.
Wait Run the Wait trigger in test mode is covered in Test Dialog activities.
Customer Registers

  1. Register with the store in the test environment as a test customer.

  2. Use the Administration Console, either run the SendMarketingTriggers job manually or wait for the next time the job runs according to its schedule interval setting.
Customer Places Order

  1. Place an order with the store in the test environment.

  2. Use the Administration Console, either run the SendMarketingTriggers job manually or wait for the next time the job runs according to its schedule interval setting.
Customer Participates in Social Commerce

  1. Register with the store in the test environment as a test customer.

  2. Execute any social commerce actions to meet the trigger criteria.

    For example, if the trigger criteria is “Customers who have participated in social commerce at least three times," then do any of the following things on the site three times (in total):

    • Post a product review or comment, or rate a product

    • Post a blog entry or comment, or rate a blog entry

    • Upload a photo or video

  3. Use the Administration Console, either run the SendMarketingTriggers job manually or wait for the next time the job runs according to its schedule interval setting.

The following table provides some tips for testing Dialog activity actions.

Action Tips for testing
Send Message
(E-mail message)

  • Make sure the test customer you have registered has opted in to receive marketing e-mail messages during registration.

  • Make sure e-mail activity accounts are configured.

  • If you want the server to send the e-mail right away during testing, open the Dialog activity in the Marketing tool; then, in the properties for the Send Message action, make sure the Send immediately check box is selected.

    After testing, remember to clear the Send immediately check box if this is not the setting you want in production due its performance impacts.

Send Message
(Text message (SMS))

  • Make sure the test customer you have registered has opted in to receive marketing SMS messages during registration. The mobile phone number must also be capable of receiving text messages.

  • Make sure the test environment is configured to send marketing text (SMS) messages. See SMS transport integration and Configure the SMS transport.

  • By default, the SendTransactedMsg job sends SMS messages every 5 minutes. If you do not want to wait 5 minutes, you can reduce the schedule interval using the Administration Console.

Issue Coupon Make sure the store supports coupon wallets so that you can ensure the test customer received the coupon in the coupon wallet.
Add To Or Remove From Customer Segment To check whether a registered customer has been successfully added to the customer segment after testing the activity, you can run the following SQL query:

SELECT * FROM DMMBRGRPPZN WHERE 
PERSONALIZATIONID=(SELECT PERSONALIZATIONID FROM 
USERS WHERE USERS_ID=(SELECT USERS_ID FROM USERREG
 WHERE LOGONID='logon_ID')) AND 
MBRGRP_ID=(SELECT MBRGRP_ID FROM MBRGRP WHERE 
MBRGRPNAME='name_of_segment')

Where:

logon_ID

is the logon ID for the test customer created during registration

name_of_segment

is the name of the customer segment specified in the activity
If the query returns a row, the customer has been added to the segment.

Alternatively, you could create a Web activity that uses the Customer Segment target to display content, and then see if the test customer sees the content. This indicates that the test customer is successfully added to the customer segment.


Related tasks

Test Web activities

Test Dialog activities

Related reference

Tips for testing targets in Web and Dialog activities

Tips for testing the Display Top Browsed and Display Best Sellers actions in Web activities


+

Search Tips   |   Advanced Search