OFAC Batch Production Configuration -Details

Account Batch Details

Account Batch Class And Query.

Batch Class Name - BatchRunAccountOFAC (Managed Package)

Schedulable Class - ScheduleBatchRunAccountOFAC (Managed Package)

'Select Id,Customer_Status__c,Do_Not_Run_OFAC__c,Name,Type,Number_of_Opportunities__c From Account Where (Customer_Status__c != 'Prospect-Dead' OR Type IN ('Prospect','Customer,Partner','Other','Cloud Customer','Partner Prospect')) AND Do_Not_Run_OFAC__c = FALSE AND Number_of_Opportunities__c != 0 AND Last_OFAC_Search_Performed__c = null LIMIT 2000';

Steps to Run Account Batch

  1. Stop the existing Scheduled Batch from Scheduled Jobs - ‘OFAC Batch Account 2000’

  2. Change the Query and Schedule the Batch as below

ofacchecker.ScheduleBatchRunAccountOFAC oScheduleBatchRunAccountOFAC = new ofacchecker.ScheduleBatchRunAccountOFAC();
String query = 'Select Id,Customer_Status__c,Do_Not_Run_OFAC__c,Name,Type,Number_of_Opportunities__c From Account Where (Customer_Status__c != \'Prospect-Dead\' OR Type IN (\'Prospect\',\'Customer,Partner\',\'Other\',\'Cloud Customer\',\'Partner Prospect\')) AND Do_Not_Run_OFAC__c = FALSE AND Number_of_Opportunities__c != 0 AND Last_OFAC_Search_Performed__c = null LIMIT 2000';
oScheduleBatchRunAccountOFAC.sQuery = query;
System.schedule('OFAC Batch Account 2000', '0 0 22 * * ? *', oScheduleBatchRunAccountOFAC);

Here '0 0 22 * * ? *' is the time at which the job will be scheduled. Currently the job is scheduled at 10 PM in the night.


Contact Batch Details

Contact Batch Class And Query.

Batch Class Name - BatchRunContactOFAC (Managed Package)

Schedulable Class - ScheduleBatchRunContactOFAC (Managed Package)

'Select Id,FirstName,LastName,Name,Account.Name,CreatedDate,RecordTypeId,FCRM__FCR_Status__c, Account_Customer_Status__c  From Contact Where FCRM__FCR_Status__c NOT IN('Closed - Rejected','Closed - Not Active With Sales','No Longer at Company') AND (Account.Name != 'Test Prospect Americas' OR Account.Name != 'Test Prospect EMEA' OR Account.Name != 'MDB') AND Account_Customer_Status__c != 'Prospect-Dead' AND LastName != '[not provided]' AND RecordType.DeveloperName = 'MongoDB_Contact' AND Do_Not_Run_OFAC__c = False AND Last_OFAC_Performed__c = null LIMIT 2000';

Steps to Run Contact Batch

  1. Stop the existing Scheduled Batch from Scheduled Jobs - ‘OFAC Batch Contact 2000’

  2. Change the Query and Schedule the Batch as below

ofacchecker.ScheduleBatchRunContactOFAC oScheduleBatchRunContactOFAC = new ofacchecker.ScheduleBatchRunContactOFAC();
String query = 'Select Id,FirstName,LastName,Name,Account.Name,CreatedDate,RecordTypeId,FCRM__FCR_Status__c, Account_Customer_Status__c  From Contact Where FCRM__FCR_Status__c NOT IN(\'Closed - Rejected\',\'Closed - Not Active With Sales\',\'No Longer at Company\') AND (Account.Name != \'Test Prospect Americas\' OR Account.Name != \'Test Prospect EMEA\' OR Account.Name != \'MDB\') AND Account_Customer_Status__c != \'Prospect-Dead\' AND LastName != \'[not provided]\' AND RecordType.DeveloperName = \'MongoDB_Contact\' AND Do_Not_Run_OFAC__c = False AND Last_OFAC_Performed__c = null LIMIT 2000';
oScheduleBatchRunContactOFAC.sQuery = query;
System.schedule('OFAC Batch Contact 2000','0 0 2 * * ?', oScheduleBatchRunContactOFAC);

Here '0 0 2 * * ? *' is the time at which the job will be scheduled. Currently, the job is scheduled at 2 AM in the night.

Â