function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rajesh Varma MudunuriRajesh Varma Mudunuri 

Design Solution Needed

I need to send data to marketing cloud from sales cloud. These are the objects involved.

 - Account (around 20k records)
 - User (around 250 records)
 - Contact (30k records)
 - Contact List (around 20 but can increase)
 - Contact List Member (25k as on now )
Note: Contact list member is junction object for contact and contact list

So this is how the solution is designed currently.

 - Created a new object **MCList**
 - Schedule an apex class to refresh and send the data periodically from **MCList** table 

Current Apex Class structure

 1. Schedule MCList (to schedule the queueable class)
 2. Queueable McList (To run the Data gen handler asynchronously)
 3. **Data Gen Handler** : In the data gen class currently **firing a future method for every contact list** to wipe out any current existing rows in the MCList table for this list and create the list with latest data.

The reason the solution was built with Queueable and Future instead of batch combination is because we want **all or nothing dml** type for each list. 

But with the current limitations with my approach are

 - I Can fire only 50 future calls
 - Only 10k row dmls for each list
Which we might be hitting at some point in the future.

Workaround: The work around i was looking is wrinting the code in java using bulk api and hosting on unix server.
What I'm looking for is, is there a way to do this without bulk api???

Any help is appreciated
Rajesh Varma