Loading
The Trailblazer Community is now read-only Read More
Media Cloud
Create the Omnistudio Data Mapper Bundle

Create the Omnistudio Data Mapper Bundle

Migrate OrchestrationItemDefinition components, create the Vlocity Data Bundles for the Google Ad Manager orchestration items to work.

Managed Package Icon This is an Advertising Sales Management on Managed Package feature. For Advertising Sales Management on Salesforce Platform, see Advertising Sales Management on Salesforce Platform.

To create the required Data Mapper bundles in your org, in an anonymous window in the Developer Console, run this apex script .
List<String> drBundleNameList = new List<String>{'GAMUpdateLineItemJsonToXmlRequest', 'GAMUpdateLineItemJsonToJsonRequest', 'GAMResumeOrderRequest', 'GAMPauseOrderRequest', 'GAMCreateOrderResponse', 'GAMCreateOrderRequest', 'GAMCreateLineItemResponse', 'GAMCreateLineItemJsonToJsonRequest', 'GAMCreateLineItemJsonToXmlRequest', 'GAMApproveOrderRequest', 'GAMActivateLineItemRequest', 'GAMArchiveLineItemRequest'};
Map<String, Integer> drBundleMap = new Map<String, Integer>();
for(String s : drBundleNameList) {
    drBundleMap.put(s, 1);
}
List<SObject> drBundleList = [Select id, name FROM vlocity_cmt__DRBundle__c Where Name IN :drBundleNameList];
if(drBundleList.size() != 0) {
    for(SObject drBundle : drBundleList) {
        String name = (String) drBundle.get('Name');
        drBundleMap.remove(name);
    }
}

if(drBundleMap.size() != 0) {
    List<SObject> drBundleToBeInserted = new List<SObject>();
    for(String drName : drBundleMap.keySet()) {
        vlocity_cmt__DRBundle__c obj = new vlocity_cmt__DRBundle__c(Name = drName, vlocity_cmt__InterfaceObject__c = drName, vlocity_cmt__DRMapName__c = drName);
        drBundleToBeInserted.add(obj);
    }
    try {
        insert drBundleToBeInserted;
        System.debug('Successfully inserted DR bundles: ' + drBundleMap.keySet());      
    } catch(Exception e) {
        System.debug('Insertion failed with exception: ' + e);
    }
  
} else {
    System.debug('All DR Bundle records are already present!');
}

The script creates the required Data Mapper bundles in your org. To confirm that the script ran successfully, from the App Launcher, search for Vlocity Data Mapper Bundles, and click Vlocity Data Mapper Bundles. If the script ran successfully, these Data Mapper bundles should be in your org:

  • GAMUpdateLineItemJsonToXmlRequest

  • GAMUpdateLineItemJsonToJsonRequest

  • GAMResumeOrderRequest

  • GAMPauseOrderRequest

  • GAMCreateOrderResponse

  • GAMCreateOrderRequest

  • GAMCreateLineItemResponse

  • GAMCreateLineItemJsonToXmlRequest

  • GAMCreateLineItemJsonToJsonRequest

  • GAMApproveOrderRequest

  • GAMArchiveLineItemRequest

 
Loading
Salesforce Help | Article