Salesforce Composite Graph

The Salesforce Composite Graph activity allows more number of subrequest to be added in single API call than the Composite Dependent Activity. You can use the output of one subrequest as the input to any subsequent subrequest in the same graph.

General

To establish a connection with the Salesforce.com server, you must provide the following information on the General tab:

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 Graph activity.

Input

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

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
graphRequests The body of the subrequest in JSON format or using Salesforce graph Batch subrequest.

For more information about creating dependent requests, see Creating a Composite Graph 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 Graph 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 SubRequest dialog box that is displayed, enter the graph ID, reference ID, and then select the resource. Depending on the resource selected, provide further inputs and click OK.
    Note: As per Salesforce.com, the Composite Graph activity does not support queryAll and query options.

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
graphRequests
graphinput graph input is displayed in the order that graphs are created
graphId string Unique ID that can be given to the created graph
subRequest Subrequests are displayed in the order that subrequest is created
referenceId String Unique Reference ID that identifies a particular subrequest and can be used as reference in other subsequent sub-requests
url String URL of the REST API endpoint
method String HTTP method (Examples: GET, POST, PATCH, DELETE)
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
SalesforceCompositegraphOutput
graph+
graphId String The ID that maps to the graph's response
graphResponse   The response of the graph that is created
compositeResponse
referenceId Boolean 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
IsSuccessful? Boolean Indicates true if all the subrequests are successful and false if there is even one unsuccessful subrequest.

Fault

On the Fault tab, you can find the error code and error message of the Salesforce Composite Graph activity.

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