bulk/create
Insert a large batch of records into any Salesforce SObject type using the Salesforce Bulk API.
Bulk API vs REST API: The Bulk API is designed for 10,000+ records. It processes data asynchronously in Salesforce and is much more efficient for large data loads. For small batches under 200 records where per-record error detail matters, prefer individual create operations instead.
When to Use
- Import 50,000 leads from a trade show CSV file.
- Migrate historical contacts from a legacy CRM system into Salesforce.
- Bulk load a product catalog or price book into Salesforce custom objects.
- Import annual account renewals from an ERP or billing system export.
Configuration
Connection
| Field | Type | Required | Description |
InstanceUrl | string | required | Salesforce org URL. |
AccessToken | string | required | Valid OAuth2 access token. |
Operation Fields
| Field | Type | Required | Description |
SObjectType | string | required | Salesforce object API name, e.g. Lead, Contact, Account, or a custom object like Product__c. |
Records | array | required | Array of objects to insert. Each object is a map of field name to value. All fields must match the SObject's field API names. |
Sample Configuration
{
"Resource": "bulk",
"Operation": "create",
"InstanceUrl": "https://myorg.my.salesforce.com",
"AccessToken": "{{credentials.salesforce.accessToken}}",
"SObjectType": "Lead",
"Records": [
{ "FirstName": "Alice", "LastName": "Chen", "Company": "Acme Corp", "Email": "alice@acme.com", "LeadSource": "Trade Show" },
{ "FirstName": "Bob", "LastName": "Park", "Company": "Beta Ltd", "Email": "bob@beta.com", "LeadSource": "Trade Show" }
]
}
Validation Errors
| Error Code | Condition |
CFG_MISSING_INSTANCE | InstanceUrl is missing. |
CFG_MISSING_TOKEN | AccessToken is missing. |
VAL_MISSING_FIELD | SObjectType or Records is missing. |
UNEXPECTED_ERROR | Unexpected exception during Bulk API job creation or processing. |
Output
Success Port
| Field | Type | Description |
jobId | string | Salesforce Bulk API Job ID. |
state | string | Final job state: JobComplete. |
recordsProcessed | int | Number of records successfully inserted. |
recordsFailed | int | Number of records that failed to insert. |
results | array | Per-record results array with id, success, and errors for each record. |
resource | string | Always bulk. |
operation | string | Always create. |
Error Port
| Field | Type | Description |
errorCode | string | Machine-readable error code. |
message | string | Error description. |
Sample Output
{
"jobId": "7505g000003XyzBAAQ",
"state": "JobComplete",
"recordsProcessed": 49985,
"recordsFailed": 15,
"results": [
{ "id": "00Q5g0000XyzEAE", "success": true, "errors": [] },
{ "id": null, "success": false, "errors": [{ "message": "DUPLICATE_VALUE: duplicate value found" }] }
],
"resource": "bulk",
"operation": "create"
}
Expression Reference
| Expression | Description |
{{nodes.BulkCreate.jobId}} | Bulk API Job ID. |
{{nodes.BulkCreate.recordsProcessed}} | Count of successfully inserted records. |
{{nodes.BulkCreate.recordsFailed}} | Count of failed records. |
{{nodes.BulkCreate.results}} | Per-record result array. |
Node Policies & GuardRails
| Policy | Detail |
| Batch size guidance | Bulk API is optimal for 10,000+ records. For fewer than 200 records, individual REST API operations provide better per-record error detail. |
| Partial failure handling | Bulk jobs can partially succeed. Always check recordsFailed and iterate results to log failed records for retry or investigation. |
| Field API names | All field keys in each record must use the Salesforce API field name (case-sensitive), not the label. |
| Credential storage | Store AccessToken in BizFirst Credentials Manager. |
| Error port wiring | Always wire the error port. Job creation failures route here. |
| Sandbox testing | Always test bulk loads in sandbox before running against production org. |
Examples
Import Trade Show Leads from CSV
{
"SObjectType": "Lead",
"Records": "{{nodes.ParseCSV.rows}}"
// Each row: { "FirstName": ..., "LastName": ..., "Company": ..., "Email": ..., "LeadSource": "Trade Show" }
}
Migrate Contacts from Legacy CRM
{
"SObjectType": "Contact",
"Records": "{{nodes.TransformLegacyData.records}}"
// Transformed to SF Contact field structure
}
Load Annual Renewals
{
"SObjectType": "Opportunity",
"Records": "{{nodes.GenerateRenewals.opportunities}}"
// Each: { "Name": ..., "AccountId": ..., "CloseDate": ..., "StageName": "Needs Analysis", "Type": "Renewal" }
}