Salesforce Get Subset Result

The Salesforce Get Subset Result activity is used to retrieve the job results in subsets for a Bulk Query activity. When you want to use this activity's subset feature, it is recommend to use the activity in a Repeat loop with a condition for checking if the last batch has been processed.

General

Note: If you use a Bulk Query with PK Chunking, it is advised that you use the Salesforce Check Status activity. Select the Wait for Completion option. Define a sufficiently large timeout value (to avoid loss of data).

On the General tab, establish a connection with the Salesforce.com server. The following table lists the configurations on the General tab of the Salesforce Get Subset Result activity:

Field Module Property? Description
Name No Enter the name displayed as the label of the activity in the process.
Salesforce Connection Yes Enter the path to the Salesforce shared resource.

Click the Choose/Create Default Resource icon to select a usable connection for the activity.

Output Format Yes
Select a format from the list.
Note: If you select ROW format during Bulk Operation and want the Get Result to be written to a file, then select XML file type in Get Result.
Output File Yes

Specify the absolute path for the Output file. The file format must be compatible with the format selected for the Bulk Operation activity.

Description

On the Description tab, enter a short description for the Salesforce Get Subset Result activity.

Input

On the Input tab, specify the information required to configure the Salesforce Get Subset Result activity.
Input Items Data Type Description
GetSubsetResultConnection (All fields in this section are optional.)
ServerUrl String Enter the web address of the endpoint that is used by this operation.
SessionId String Enter the unique ID associated with this session.
ExternalSessionIdUsed Boolean Specify whether an external session ID is used (true) or not (false).
If you set this value to true, an external session ID is filled automatically in the sessionId field.
Note: If the ExternalSessionIdUsed is set to true, the session cannot be refreshed and any attempt to do so results in an exception.
GetSubsetResult
jobId String Required. Specify the job ID for which the result is to be obtained.
fileLocation String Optional. Specify the file path to the records file. This field is not displayed when ROW format is selected on the General tab.
GetSubsetResultOptional (All fields in this section are optional.)
timeout Long Specify the number of milliseconds an internal API call waits before returning the data.

Default value: Infinite (that is, activity times out only after all records are processed)

If timeout is not specified: The activity fails with TimeoutError.

Sforce-Disable-Batch-Retry String Specifies if retries are disabled for unfinished batches included in the operation.

Valid values:True or False.

Sforce-Line-Ending String Specify whether line endings are read as line feeds (LFs) or as carriage returns and line feeds (CRLFs).
Sforce-Enable-PK-Chunking String Enable automatic primary key (PK) chunking for a Bulk Query operation.

Condition: This option is available only for Bulk Query activity.

SubsetSetting
subsetSize Integer Specifies the number of batches to be fetched in one loop of the operation.

When this value is 0 or not specified: Batches are not processed in subsets

Condition: Set this property only if you have selected ROW as the output format.

Output

On the Output tab, you can find the output value.

The following table lists the output elements on the Output tab of the Salesforce Get Result activity:

Output Item Data Type Description
SalesforceGetSubsetResultOutput
result jobId String The ID of an sObject which can be used later to check the job status and get the job result.
success Boolean Indicates whether the Bulk Query activity has succeeded (true) or not (false).
filepath String

Displays the file path to the results.

unprocessedBatches Integer Specifies the number of batches that are not processed.
record The fields under record are the actual records for that Job ID.
Example: If you perform a Get Subset Result operation after the Bulk Operation, then the records that were inserted, upserted, updated, or deleted by using Bulk Operation are displayed. If the Job ID is of a Bulk Query activity, then it displays the records that were queried.
Note: In the Salesforce Bulk Query activity results, the sObject element in a record can be coerced to
  1. Partner WSDL elements in Salesforce_Metadata.xsd
  2. Enterprise WSDL elements derived from sObject in the WSDL
isLastBatch Boolean true if no: Indicates that there are no more batches to be retrieved.

Fault

On the Fault tab, you can find the error code and error message of the Salesforce Get Subset Result activity. See Error Codes for more information about error codes and corrective actions to take.

Fault Thrown when..
SalesforceRestException There is a problem with REST request, response, or any other REST API error.
SalesforceLoginException An error occurs while logging in to the Salesforce.com server.
SalesforceConnectionNotFoundException An error occurs when the external session ID is not used or the Salesforce connection is not configured correctly.