For the managed package runtime, the DRGlobal class provides multiple methods for calling Omnistudio Data Mappers from Apex.
This information is for Omnistudio for Managed Packages. For Omnistudio on standard runtime, see Omnistudio Help.
In all the method signatures shown below, the namespace is omnistudio, vlocity_cmt, vlocity_ins, or vlocity_ps. The bundleName is the Data
Mapper name.
For sample code, see Omnistudio Data Mapper Calls From Apex (Managed Package).
processObjectsJSON
Signature:
static namespace.DRProcessResult processObjectsJSON(String objectList, String bundleName)
The objectList must be a JSON String.
processObjects
Signatures:
static namespace.DRProcessResult processObjects(List<SObject> objectList)
static namespace.DRProcessResult processObjects(List<SObject> objectList, String bundleName)
static namespace.DRProcessResult processObjects(List<SObject> objectList, String bundleName, Map<String, Object> additionalInfo)
static namespace.DRProcessResult processObjects(List<SObject> objectList, String bundleName, Map<String, Object> additionalInfo, Map<String, Object> filesMap)
The first signature, which doesn't require a DRName,
is only for a Data Mapper Load.
The additionalInfo is a Map that applies to every
SObject, such as extra data for processing.
pprocessString
Signature:
static namespace.DRProcessResult processString(String input, String bundleName)
The input must be an XML String.
processFromApex
Signatures:
static namespace.DRProcessResult processFromApex(List<Map<String, Object>> objectList, String bundleName, String locale)
static namespace.DRProcessResult processFromApex(Map<String, Object> objectList, String bundleName, String locale)
These methods ignore Sharing Rules, which ensures that the Data Mapper being invoked is private. See Sharing Rules in the Salesforce help. The locale parameter is available in Summer '20 and later releases.
process
Signatures:
static namespace.DRProcessResult process(List<Map<String, Object>> objectList, String bundleName, String locale)
static namespace.DRProcessResult process(Map<String, Object> objectList, String bundleName, String locale)
The locale parameter is available in Summer '20 and later releases.
processPost
Signature:
global static Map<String, Object> processPost(Map<String, Object> bodyData)
This method can only call a Data Mapper Load. No other Apex method can pass the bulkUpload parameter to a Data Mapper. See Omnistudio Data Mapper Calls From Apex (Managed Package).
clearCacheForDataRaptor, clearCacheForAllDataRaptor
For details about these methods, see Cache for Omnistudio Data Mappers (Managed Package).