Loading
Feature Disruption - Service Cloud VoiceRead More
Feature degradation | Gmail Email delivery failureRead More
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Omnistudio Data Mapper REST API

          Omnistudio Data Mapper REST API

          You can invoke any type of Data Mapper using the Data Mapper REST API. To update Salesforce objects using a Data Mapper Load, issue a POST request that includes a JSON payload that is formatted to comply with the input that the Data Mapper load expects. To retrieve data from Salesforce, issue a GET call to a Data Mapper Extract, specifying the Id or parameters identifying the data to be retrieved. The data is returned in the response in JSON format.

          Example

          POST Data

          {
             "bundleName" : "AccountUpload",
             "objectList" : {
                "Agency Information": {
                   "Agency Name": "Vlocity",
                   "Agency Address": "50 Fremont",
                   "Agency City": "San Francisco",
                   "Agency State": "CA",
                   "Agency Zip": "94110",
                }
             },
             "bulkUpload" : false
          }

          Result

          {
             "createdObjectsByOrder": {
                  "Open Account": {
                       "1": [
                            "a10o00000022xVEAAY"               ]
                  }
             },
             "createdObjectsByType": {
                  "Open Account": {
                       "Account": [
                            "a10o00000022xVEAAY"             ]
                  }
             },
             "errors": {},
             "returnResultsData": []
          }

          Data Mapper Extract Invocation Using GET

          To retrieve data from Salesforce using a REST call, issue a GET statement that invokes a Data Mapper Extract. To identify the data to be retrieved you can either specify the object Id or one or more parameters to be matched. Data is returned in the response in the output JSON format that the Data Mapper Extract creates.

          Use an ID to Retrieve Data

          To retrieve Salesforce data by specifying the Id, issue a GET request that invokes a Data Mapper Extract, using a URL formatted as follows:

          /services/apexrest/{myOrgNamespace}/v2/DataRaptor/{DataMapperName}/Id

          Example Request

          The following request uses the Id of a Contact to retrieve all open Cases for the Contact.

          GET /services/apexrest/vlocity_cmt/v2/DataRaptor/OpenCases/a10o00000022xVE

          Example Result

          {
            "Contact": {
               "Contact Name" : "Dennis Reynolds",
               "Case Information": [
                 {
                    "Title": "Wrong widget shipped..."},
                 {
                    "Title": "Overcharged for gizmo..."},
                 {
                    "Title": "Damaged item..."}
              ]
           }
          }

          Use Parameters to Retrieve Data

          To retrieve Salesforce data by passing parameters to a Data Mapper extract, issue a GET request using a URL formatted as follows:

          GET /services/apexrest/{myOrgNamespace}/v2/DataRaptor/{DataMapperName}/?${Param1}=${Val1}&${Param2}=${Val2}...

          Example Request

          The following request passes the first and last name of a contact as input parameters to a Data Mapper extract, which uses them to query for the cases opened by the contact.

          GET /services/apexrest/vlocity_cmt/v2/DataRaptor/Open_Cases/?FirstName=Dennis&LastName=Reynolds

          Data Mapper Load Invocation Using POST

          To update Salesforce data, issue a POST request with a URL formatted as follows:

          /services/apexrest/{myOrgNamespace}/v2/DataRaptor/

          In the POST data, specify the following parameters:

          • bundleName — Name of the Data Mapper Load to invoke

          • objectList — JSON data to be loaded. Must match the format expected by the Data Mapper Load.

          • filesList — (Optional) Map of keys to base 64-encoded files.

          • bulkUpload — TRUE to use batch Apex.

           
          Loading
          Salesforce Help | Article