Table of Contents

Search

  1. Preface
  2. Introduction to Informatica Cloud Customer 360
  3. Configuring the Data Cleansing Settings
  4. Managing Batch Jobs
  5. Verifying Addresses, Email Addresses, and Phone Numbers
  6. Synchronizing Salesforce Records with CC360
  7. Managing Duplicate Records
  8. Consolidating Records
  9. Converting External Records to Salesforce Records
  10. Managing Hierarchies
  11. Integrating Cloud Customer 360 with MDM Multidomain Edition
  12. Managing Multi-Org
  13. Custom Settings
  14. Glossary

Integrating External Batch Job

You can use Informatica Cloud Customer 360 (
CC360
) APIs to push external jobs to the
CC360
batch queue.
You can integrate external Apex batch jobs with the batch queue to get batch statuses, and you can submit external Apex batch jobs to the
CC360
batch queue.
Also register a loop batch job when you want a batch job to launch after a running batch completes. The batch context of the running batch job is passed to the subsequent batch job.
The following code example shows how you can use the QueueManager API to push jobs to the
CC360
batch queue:
global class SampleExternalBatch implements Database.Batchable, Database.Stateful{ private Id cloudMDMJobQueueId = null; private Integer itemProcessed = 0; private Integer totalJobItem = 1000; global Database.QueryLocator start(Database.BatchableContext BC) { cloudMDMJobQueueId = API_QueueManager.start(BC); List<string> accountNames = API_QueueManager.getExtendedParameters (cloudMDMJobQueueId, 'AccountName'); List<string> billingCountry = API_QueueManager.getExtendedParameters (cloudMDMJobQueueId, 'BillingCountry'); API_QueueManager.UpdateStatus(cloudMDMJobQueueId, 'start', 0); return Database.getQueryLocator(<>); } global void execute(Database.BatchableContext BC, List scope) { itemProcessed = itemProcessed + scope.size(); API_QueueManager.updateExecutionProgress(cloudMDMJobQueueId, totalJobItem, itemProcessed); } global void finish(Database.BatchableContext BC) { API_QueueManager.finish(cloudMDMJobQueueId, BATCH_STATUS.SUCCESS); } }
You can use the QueueManager API to perform the following tasks:
  • Submit a batch job to the
    CC360
    batch queue.
    The following code example shows how to submit jobs into the
    CC360
    batch queue:
    API_QueueManager qManager = new API_QueueManager ('CustomBatch', 'ETL_CustomApexBatchJob'); qManager.setQuickParameters (new List<string>{'PARAM1', 'PARAM2', 'PARAM3', 'PARAM4', 'PARAM5', 'PARAM6', 'PARAM7', 'PARAM8'}); qManager.pushExtendedParameters('AccountName', new List<string>{'Informatica', 'EcoLab'}); qManager.pushExtendedParameters('BillingCountry', new List<string>{'USA', 'UK'}); Id batchJobQueueId = qManager.submitJob();
  • Register loop batch jobs.
    The following code example shows how to register batch loop jobs:
    global void finish(Database.BatchableContext BC) { // If more record to process register and loop next chunk or batch if (moreRecordsToProcess ()) { Id newLoopJobId = API_QueueManager.registerJobLoop( cloudMDMJobQueueId); API_QueueManager.submitJob (newLoopJobId); } else { // no more pending records to process. Mark current job as complete API_QueueManager.finish(cloudMDMJobQueueId, BATCH_STATUS.SUCCESS); } }

0 COMMENTS

We’d like to hear from you!