Support Article

Marketing campaign sending duplicate emails

SA-28620

Summary



When scheduling a Pega Marketing Campaign with simple Strategy with no filter component.

Offer Flow contains single Send email shape and Update Status shape. No wait configured on Send Email shape.

​When Campaign runs, it sends out two emails.
User has checked the Agents ProcessBatchJob(PegaNBAM-Artifacts) and ProcessBatchJob(Pega-DecisionEngine) and they both were running on all the nodes.


Error Messages



Not applicable

Steps to Reproduce


  1. Create a Campaign with Simple Offer Flow with Send Email shape.
  2. Schedule the Campaign and same email getting send twice.


Root Cause



The ProcessOfferBatch Activity java code for “wait expiration time” condition was having mismatch when compared with out-of-the-box Pega Marketing 7.13 ProcessOfferBatch Activity java code.

Developer's code:
/* Add the (wait expiration time) condition if running for waiting flows. */
if (isWaitProcess.equals("True")) {
/  Get all expired offers and if they are a parent bundle, get the associated offers as well
sudoSQL = sudoSQL + " WHERE ( R.WAITEXPIRATIONTIME <= SYSDATE ";
}

Out-of-the-box Pega Marketing 7.13 code:

/* Add the (wait expiration time) codition if running for waiting flows. */
if (isWaitProcess.equals("True")) {
/&nbsp; Get all expired offers and if they are a parent bundle, get the associated offers as well
sudoSQL = sudoSQL + " WHERE (R.FLOWSTATUS = 'Wait' AND R.WAITEXPIRATIONTIME <= current_timestamp ";
}


Resolution



Local-change suggested: out-of-the-box code changes (highlighted) were merged to the developers code.

Published September 29, 2016 - Updated August 23, 2017

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.