Accelerator Salesforce Bulk System API - Implementation Template

(0 reviews)

Instructions

  1. The API listens on accel-sfdc-bulk-request-queue for bulk requests.
  2. The format of the bulk request is {

     "x-correlation-id": "1234", //unique identifier to trace this transaction
     "object" : "Account", //Salesforce object
     "externalId": "External_ID__c" //unique Identifier on the SF object needed to perform upsert operation
     "records": [] //actual object records that need to be upserted

    }

  3. The API used Salesforce Bulk API v2 upsert operation to send upsert request to Salesforce.
  4. The upsert job id returned by salesforce is pushed to the response queue, accel-sfdc-bulk-response-queue. The format of the response message is shown below:: { "x-correlation-id": "1234", //this is same as the id from the request body "jobId": "afafere89af" // salesforce bulk job id }
  5. If there is an error while sending the upsert request or before sending the upsert request, the request message is sent back to the queue for retry. Currently a retry limit of 2 is set, if the retry limit is exhausted the message will be moved to the dead letter queue, accel-sfdc-bulk-request-queue-dlq.
  6. The consumer of this API can use the jobId to query the status of the salesforce bulk request using the endpoint, api/bulk/job/{jobId}/
  7. Two more endpoints are exposed to get the successful and failed records. /api/bulk/jobs/{jobId}/status/successful and /api/bulk/jobs/{jobId}/status/failed

Reviews

TypeTemplate
OrganizationMuleSoft
Published by
MuleSoft Solutions
Published onOct 28, 2021
Asset overview

Asset versions for 1.4.x

Asset versions
VersionActions
1.4.0