Salesforce Composite Batch
The Salesforce Composite Batch activity executes a set of independent subrequests in a single request. Information cannot be passed from one subrequest to another.
General
On the General tab, you must provide the following information to establish a connection with the Salesforce.com server:
Field | Module Property? | Description |
---|---|---|
Name | No | The name displayed as the label of the activity in the process |
Salesforce Connection | Yes | The path to the Salesforce shared resource.
Click
Choose/Create Default Resource |
Description
On the Description tab, you can enter a short description for the Salesforce Composite Batch activity.
Input
On the Input tab, you can provide the following input values for the Salesforce Composite Batch activity:
Input Item | Data Type | Description |
---|---|---|
SalesforceSessionInput (All fields in this section are optional.) | ||
externalSessionUsed | Boolean | Specifies whether an external session ID is used (true ) or not (false ).
If the value is set to
In this case, when the session has to be refreshed, the refreshed operation cannot be performed and an error occurs. |
sessionId | String | The unique ID associated with this session |
serverURL | String | The URL of the endpoint that is used by this operation |
jsonBody | batchRequests | The body of the subrequest in JSON format or using Salesforce Composite Batch subrequest.
For more information about creating batch requests, see Creating a Composite Dependent Subrequest |
|
SalesforceOptionalInput (All fields in this section are optional.) | ||
timeout | Integer | The timeout value.
It specifies the duration (in milliseconds) for which an internal API call waits before data is returned. |
HttpHeader (All fields in this section are optional.) | Request headers and their values to include with the subrequest.
For more information, see the Salesforce Composite API documentation. |
|
key | String | HTTP header name |
value | String | HTTP header value |
Creating a Salesforce Composite Batch Subrequest
- To create a subrequest, in the upper right corner of the
Input tab, click
Create Salesforce Composite Subrequest
.
- In the
Create Salesforce Composite Sub Request dialog box that is displayed, select the resource. Depending on the resource selected, provide further inputs and click
OK.
- If the resource selected is queryAll or query, then you can use the Query Builder to form the SOQL.
For more information about using the Query Builder and its options, see Salesforce Query Builder.
- If the resource selected is search, then you can use the Search Query Builder to form the SOSL.
For more information about using the Search Query Builder and its options, see Salesforce Search Query Builder.
- If the resource selected is queryAll or query, then you can use the Query Builder to form the SOQL.
The following fields appear on the Input tab. For more information about these fields, see the Salesforce Composite API documentation.
Input Item | Data Type | Description |
---|---|---|
batchRequests | ||
haltOnError | Boolean | Specifies what to do when an error occurs while processing a subrequest. |
subRequest | ||
url | String | URL of the REST API endpoint. |
method | String | HTTP method (Examples: GET, POST). |
binaryPartName | String | Name of the binary part in the multipart request. |
binaryPartNameAlias | String | Name parameter in the Content-Disposition header of the binary body part. |
richInput | Input for the request. | |
jsonbody | binarybody? | sobject?? | Provide input for the subrequest body.
Condition: The sobject is substituted with the object type only when you select the following items in the Salesforce Composite Subrequest wizard:
|
Output
The Output tab displays the activity results.
The following table lists the output elements on the Output tab of the Salesforce Composite Batch activity. For more information about these fields, see the Salesforce Composite API documentation.
Output Item | Data Type | Description | |
---|---|---|---|
SalesforceCompositeBatchOutput | |||
hasErrors | Boolean | true - This value is displayed when at least one of the results in the result set is an HTTP status code in the range of
400 to
500 .
|
|
results | Collection of subrequest results. | ||
statusCode | String | An HTTP status code for the current subrequest. | |
result | String | Response body of this subrequest. |
Fault
On the Fault tab, you can find the error code and error message of the Salesforce Composite Batch activity. For more information about the error codes and the corrective actions to take, see Error Codes.
Fault | Generated when |
---|---|
SalesforceRestException | There is a problem with REST request, response, or some other REST API issue. |
SalesforceLoginException | An error occurs when 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. |