Difference between revisions of "Salesforce:Clean Suite Batch Processing"
Jump to navigation Jump to search
Choose the object and mapping you want to use.
In the screenshot below we created a Contact mapping named "Mailing Address Verification" for the Personator Verification Web service.
Craft the query
In the example below we specified the Object Type from above and that we want only 10 records.
Craft the statement
Now we need to put it all together! The following statement will execute a batch job using our query from above as well as taking into account the mapping we created in the earlier screenshot.
|Line 1:||Line 1:|
Latest revision as of 18:17, 18 January 2022
What is Batch Processing and how does it work?
- Batch processing allows you to run multiple records at once against Melissa services. Administrators can select specific records for processing through a query as well. This flexibility allows Administrators the ability to schedule regular jobs for record processing as well.
- Clean Suite Batch Jobs are tied to a specific object and specific [Clean Suite Advanced Mapping]. Meaning, you must specify the type of salesforce object (standard or custom) as well as the mapping you wish to use for that job. Note, the mapping specified must exist for the object or the job will fail.
How do I run a batch job?
- Select the class of Melissa Endpoints to use from the following list:
- MD_PersonatorBatch (Personator Verification)
- MD_GlobalBatch (Global Address Verification)
- MD_GlobalEmailBatch (Global Email Verification)
- MD_GlobalPhoneBatch (Global Phone Verification)
SELECT ID FROM CONTACT LIMIT 10
Id batchinstanceId = Database.executeBatch( new MDPERSONATOR.MD_PersonatorBatch( 'SELECT ID FROM Contact LIMIT 10', true, true, true, 'Mailing Address Verification'), 100);
You can execute the code through the dev console via the execute anonymous or through your own Apex Code.
How to see results from a Batch job
- To see the progress of your batch job, go to the Apex Jobs section in Setup and the job and status will be listed there.
- Every record that is updated by a Clean Suite Batch Job will have a Result object upserted as part of the process as well. The result objects and their associated webservices are as follows:
- MD_personatorResult__c (Personator Verification)
- MD_globalAddressResult__c (Global Address Verification)
- MD_globalEmailResult__c (Global Email Verification)
- MD_globalPhoneResult__c (Global Phone Verification)
Frequently Asked Questions
- Is there a limit to the number of records processed through a batch?
- Not through our software but Salesforce does have a limit on the number of queries that can be performed at a time. So we suggest users stick to batches smaller than 50,000 records. More info on governor limits can be found here: https://developer.salesforce.com/docs/atlas.en-us.234.0.salesforce_app_limits_cheatsheet.meta/salesforce_app_limits_cheatsheet/salesforce_app_limits_platform_apexgov.htm
- Can I run a batch job automatically?
- Yes you can run a batch job through Salesforce’s Scheduled Jobs section. You will need to create a new job using similar APEX code in the example above.
- Is there a way to run these batch jobs without having to write code?
- We plan to release a control panel in the future for Clean Suite Batch Jobs.