Salesforce Composite Dependent

The Salesforce Composite Dependent activity runs a series of subrequests in a single call. You can use the output of one subrequest as an input to the next subrequest in the series.

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 to select a usable connection for the activity.

Description

On the Description tab, you can enter a short description for the Salesforce Composite Dependent activity.

Input

On the Input tab, you can specify the following input values for the Salesforce Composite Dependent activity:

Input Items Data Type Description
SalesforceSessionInput (All fields in this section are optional.)
externalSessionUsed Boolean Specifies whether an external session ID is used.

If the value is set to true, an external session ID is filled in the sessionId field.

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 web address of the endpoint that is used by this operation
compositeRequest The body of the subrequest in JSON format or using Salesforce Composite Batch subrequest.

For more information about creating dependent requests, see Creating a Composite Dependent Subrequest.

SalesforceOptionalInput (All fields in this section are optional.)
timeout Boolean 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 API documentation.

key String HTTP header name
value String HTTP header value

Creating a Salesforce Composite Dependent Subrequest

  1. To create a subrequest, in the upper right corner of the Input tab, click Create Salesforce Composite Subrequest .
  2. In the Create Salesforce Composite Sub Request dialog box that is displayed, enter the referenced ID and then select the resource. Depending on the resource selected, provide further inputs and click OK.
    Note: 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.

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
compositeRequest
allOrNone Boolean Specifies what to do when an error occurs while processing a subrequest
subRequest Subrequests are displayed in the order they are created
referenceId String Unique Reference ID that maps to the subrequest’s response and can be used to refer to the response in later subrequests.
url String URL of the REST API endpoint
method String HTTP method (Examples: GET, POST)
httpHeaders Request headers and their values to include with the subrequest
key String HTTP header name
value String HTTP header value
body
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:
  • Resource: sobjects
  • Operation: Create or Update
  • Body Type: Complex

Output

The Output tab displays the activity results.

The following table lists the output elements on the Output tab of the Salesforce Composite Dependent activity:

Output Item Data Type Description
SalesforceCompositeOutput
compositeResponse
referenceId String The ID that maps to the subrequest's response
httpStatusCode String An HTTP status code for the current subrequest
httpHeaders Request headers and their values to include with the subrequest
key String HTTP header name
value String HTTP header value
body String Response body of the subrequest in JSON format

Fault

On the Fault tab, you can find the error code and error message of the Salesforce Composite Dependent activity. For more information about the error codes and the corrective actions to take, see Error Codes.

Fault Thrown 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.