Retrieving Salesforce records (no discovery)
Use the SalesforceRequest (no discovery) node to retrieve records from the Salesforce system.
About this task
In IBM App Connect Enterprise 12.0.5 (and later versions), a new Salesforce Request node is provided, which you configure by using a Connector Discovery wizard to discover and set properties for the Salesforce connector. For information about using this feature, see Using Salesforce with IBM App Connect Enterprise and Salesforce Request node.
You can retrieve Salesforce records by specifying Retrieve in the Operation property of the SalesforceRequest (no discovery) node. You can retrieve all records of a particular type by specifying the object type in the Salesforce object property of the node. This object type can be overridden by a value specified in the LocalEnvironment.Destination.Salesforce.Request.object local environment variable.
Alternatively, you can retrieve a specific record by specifying a Salesforce ID in the LocalEnvironment.Destination.Salesforce.Request.id environment variable. The returned record appears as a JSON object in the location that is specified by the Output data location property of the node.
If an external ID name and value are specified in the LocalEnvironment.Destination.Salesforce.Request.externalIdName and LocalEnvironment.Destination.Salesforce.Request.externalId environment variables, all records with that external ID are returned. The returned records appear as a JSON array in the location specified by the Output data location property.
If neither a Salesforce ID nor an external ID is specified, all records of the specified type are returned by default.
where
limit
skip
order
field
You can control which records are returned by specifying
a filter with a where
, limit
, or skip
clause.
If no ID has been specified, this filter is used to select the records
to be returned.
If you specify a filter with an order
clause,
the records are returned in the specified order. For more information,
see Filtering the records retrieved from Salesforce (no discovery).
You can also restrict
the records that are returned by specifying a filter with a field
clause,
so that only the specified field is returned. Filtering with a field
clause
optimizes performance by reducing unnecessary processing.
- Salesforce ID
- External ID
- Filter
If no Salesforce records are found, the output tree contains nothing under JSON.data.
JSON schema are supplied for a wide range of Salesforce objects, and you can use them as input and output for message maps in a Mapping node. For example, you can transform the message tree for a returned Salesforce Account record in a Mapping node by using the JSON schema for the Account object. For more information, see Using Salesforce models (no discovery).
Procedure
Follow these steps to retrieve Salesforce records: