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 recommended to use the activity in a Repeat loop with a condition for checking if the last batch has been processed.
General
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
|
| Output Format | Yes |
Select the Row format from the dropdown list. Other formats are not supported. |
| Output File | Yes |
This field is disabled when you select the ROW format. |
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 the 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
|
| 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 |
This field is blank for Row format. |
|
| 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:
|
||
| 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 | Generated 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. |
to select a usable connection for the activity.