Portal Community

bulk/upsert

Insert or update a large batch of records using an External ID field for matching. Records matching on the External ID are updated; non-matching records are inserted.

Idempotent Sync: bulk/upsert is safe to re-run. Records matching on ExternalIdField are updated in place. Non-matching records are inserted. This makes it the ideal operation for recurring nightly or hourly sync workflows where you cannot predict which records are new vs changed.

When to Use

Configuration

Connection

FieldTypeRequiredDescription
InstanceUrlstringrequiredSalesforce org URL.
AccessTokenstringrequiredValid OAuth2 access token.

Operation Fields

FieldTypeRequiredDescription
SObjectTypestringrequiredSalesforce object API name, e.g. Contact, Account.
ExternalIdFieldstringrequiredAPI name of the field used to match existing records. Must be marked as an External ID field in Salesforce setup. Common values: Email, ERP_Account_ID__c, HubSpot_Contact_ID__c.
RecordsarrayrequiredArray of objects to upsert. Each object must include the ExternalIdField value for matching.

Sample Configuration

{
  "Resource": "bulk",
  "Operation": "upsert",
  "InstanceUrl": "https://myorg.my.salesforce.com",
  "AccessToken": "{{credentials.salesforce.accessToken}}",
  "SObjectType": "Contact",
  "ExternalIdField": "Email",
  "Records": [
    { "Email": "alice@acme.com", "FirstName": "Alice", "LastName": "Chen", "Phone": "+1-555-0401" },
    { "Email": "bob@beta.com", "FirstName": "Bob", "LastName": "Park", "Title": "CTO" }
  ]
}

Validation Errors

Error CodeCondition
CFG_MISSING_INSTANCEInstanceUrl is missing.
CFG_MISSING_TOKENAccessToken is missing.
VAL_MISSING_FIELDSObjectType, ExternalIdField, or Records is missing.
UNEXPECTED_ERRORUnexpected exception or invalid ExternalIdField configuration.

Output

Success Port

FieldTypeDescription
jobIdstringSalesforce Bulk API Job ID.
statestringFinal job state: JobComplete.
recordsProcessedintNumber of records successfully upserted.
recordsFailedintNumber of records that failed.
resultsarrayPer-record results with id, success, created (bool — true if inserted, false if updated), and errors.
resourcestringAlways bulk.
operationstringAlways upsert.

Error Port

FieldTypeDescription
errorCodestringMachine-readable error code.
messagestringError description.

Sample Output

{
  "jobId": "7505g000003AbcCAAQ",
  "state": "JobComplete",
  "recordsProcessed": 9998,
  "recordsFailed": 2,
  "results": [
    { "id": "0035g000006LmnOPQ", "success": true, "created": false, "errors": [] },
    { "id": "0035g000006NewXYZ", "success": true, "created": true, "errors": [] },
    { "id": null, "success": false, "created": false, "errors": [{ "message": "INVALID_EMAIL_ADDRESS" }] }
  ],
  "resource": "bulk",
  "operation": "upsert"
}

Expression Reference

ExpressionDescription
{{nodes.BulkUpsert.jobId}}Bulk API Job ID.
{{nodes.BulkUpsert.recordsProcessed}}Count of successfully upserted records.
{{nodes.BulkUpsert.recordsFailed}}Count of failed records.
{{nodes.BulkUpsert.results}}Full per-record results array including insert/update distinction.

Node Policies & GuardRails

PolicyDetail
External ID field requirementThe ExternalIdField must be explicitly marked as an External ID field in Salesforce Setup. Standard fields like Email are already external-ID capable on Contact; custom fields must be configured.
IdempotencyThis operation is safe to re-run. Records are matched by ExternalIdField, so running the same payload twice updates rather than duplicates.
Partial failure handlingCheck recordsFailed after completion. Log failed records and their error messages for retry.
Field API namesAll field keys must use Salesforce API field names, not labels.
Credential storageStore AccessToken in BizFirst Credentials Manager.
Sandbox testingAlways test in sandbox before running against production data.

Examples

Nightly HubSpot Contact Sync

{
  "SObjectType": "Contact",
  "ExternalIdField": "Email",
  "Records": "{{nodes.HubSpotExport.contacts}}"
  // Each: { "Email": ..., "FirstName": ..., "LastName": ..., "Phone": ... }
}

ERP Account Sync by External ID

{
  "SObjectType": "Account",
  "ExternalIdField": "ERP_Account_ID__c",
  "Records": "{{nodes.ERPExport.accounts}}"
  // Each: { "ERP_Account_ID__c": "ERP-12345", "Name": ..., "AnnualRevenue": ... }
}

Daily Product Catalog Refresh

{
  "SObjectType": "Product2",
  "ExternalIdField": "ProductCode",
  "Records": "{{nodes.CatalogAPI.products}}"
  // Each: { "ProductCode": "SKU-001", "Name": "Enterprise License", "IsActive": true }
}