I am querying Salesforce Bulk api failed results in Mule. But it doesn't fetch the data. It jus shows the record id and error message. But if i check in workbench, it shows the id, error, datacolumns(a,b,c) How to get those details..Is there any other way to get the bulk api v2 failed results in Mule
The Retrieve job failed results bulk v 2 output payload contains below metadata:
You need to use DWL like below:
-----------------------------------------------------
%dw 2.0
output application/json
---
payload map(rec,index) ->
{
name: rec.originalFields.Name,
phone: rec.originalFields.Phone,
sfId: rec.id,
error: rec.errorMessage
}
-------------------------------------------------------
The fieldnames should be the bulk request field name/names.
Sample output:
[ {
"name": "",
"phone": "(434) 369-3100",
"sfId": "",
"error": "REQUIRED_FIELD_MISSING:Required fields are missing: [Name]:Name --"
}]