From 56ba2aa47a7ef7af2de6c4335842aa7ccb332242 Mon Sep 17 00:00:00 2001 From: ashitsalesforce Date: Sun, 15 Sep 2024 21:22:45 -0700 Subject: [PATCH] support territory assignment rules in bulk v2 upload ops support territory assignment rules in bulk v2 upload ops (insert, update, upsert). --- .../dataloader/action/visitor/bulk/BulkV2Connection.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/com/salesforce/dataloader/action/visitor/bulk/BulkV2Connection.java b/src/main/java/com/salesforce/dataloader/action/visitor/bulk/BulkV2Connection.java index 615ce625..c7e6d658 100644 --- a/src/main/java/com/salesforce/dataloader/action/visitor/bulk/BulkV2Connection.java +++ b/src/main/java/com/salesforce/dataloader/action/visitor/bulk/BulkV2Connection.java @@ -379,6 +379,13 @@ public JobInfo createJob(JobInfo job) throws AsyncApiException { if (operation.equals(OperationEnum.upsert)) { requestBodyMap.put("externalIdFieldName", job.getExternalIdFieldName()); } + if (operation.equals(OperationEnum.upsert) + || operation.equals(OperationEnum.insert) + || operation.equals(OperationEnum.update)) { + if (job.getAssignmentRuleId() != null && !job.getAssignmentRuleId().isBlank()) { + requestBodyMap.put("assignmentRuleId", job.getAssignmentRuleId()); + } + } } return doSendJobRequestToServer(urlString, headers,