Loop and process customer records in batches – AC

Consider a business scenario where we have to send deliveries or call any third party for each customer records in batches. There is no straightaway activity provided by Adobe Campaign that can break the record set in batches of a predefined size followed by looping through those batches separately. This blog provide a configuration constructed using existing Split, Test & Wait activities within Adobe Campaign to solve this business need.

Lets assume we are not aware of the total record count (X) of our record set but certainly know the record count in a single batch. Say N (an integer value ) be the predefined size of our batches.

Below is the basic approach we would be following to address the need:

  1. Check if total record count (X) is more than our batch size (N) i.e.
    1. if (X>N), proceed further for breaking and looping record set (goto point 2)
    2. else, directly process the record set
  2. Make a split for N random records and parallel generate the complement. This complement would act as base record set for next iteration. Thus, we every iteration, our base record set starts decreasing and so it Complement record count.

Show time, try creating below configuration on Adobe Campaign Workflow to make it happen:

Batch-Processing-Detail
Batch-Processing-Detail

So, over here, we are checking if our input record count from query is greater than batch size. For smaller record count we obviously can’t do splitting, thus all records are processed in a single go. Other way round, if we can build batches from record set, we would try breaking then using Random sampling. Do check “Generate Complement” option here to generate left over records. We have to do this splitting on Complement till our record count for next iteration doesn’t become zero.

Enjoy!!

Feel free to add value to this blog post 🙂

  • Samit Gorai

    I don’t agree to this statement “There is no straightaway activity provided by Adobe Campaign that can break the record set in batches of a predefined size followed by looping through those batches separately. ” Adobe Campaign has the functionality to send deliveries in Waves. Rajesh already showed that in his comment in Linkedin.

  • Naveen Srinivas

    Instead of more complements, split activities we can build using ‘java script and wait activity’ and it will look more simple workflow.

    • Sure Naveen…. it just one of approach…. there could be multiple solutions to the problem.