Updating Salesforce records (no discovery)
Use the SalesforceRequest (no discovery) node to update records in 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 update Salesforce records by specifying Update in the Operation property of the SalesforceRequest (no discovery) node, and specifying the object type in the Salesforce object property. The object type can be overridden by the LocalEnvironment.Destination.Salesforce.Request.object environment variable.
The fields of the Salesforce record to be updated must appear in the input message tree as a JSON object. Fields that do not require updating do not have to appear in the tree.
If a Salesforce ID is specified in the LocalEnvironment.Destination.Salesforce.Request.Id environment variable, the record with that Salesforce ID value is updated.
If a Salesforce ID is not specified, and an external ID name and value are specified in the
LocalEnvironment.Destination.Salesforce.Request.externalIdName and
LocalEnvironment.Destination.Salesforce.Request.externalId environment variables, the record with
that external ID is updated. If the record does not exist, it is created. If neither a Salesforce ID
nor an external ID is specified in the local environment, but an Id
element is
found in the input message tree, that value is used as a Salesforce ID and the record with that
Salesforce ID is updated.
When the record is updated, the input message tree is copied to the location specified by the
Output data location property of the node, and augmented with the
Salesforce ID in an Id
element. The Salesforce Id is not provided
in the Output tree if an external Id has been specified, unless a new Salesforce record is created
(if it did not previously exist). If an external Id is specified but the Salesforce record cannot be
found, the Salesforce record is created. This is called an upsert operation and occurs only
if an external Id has been specified.
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 create the message tree to update a 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 update a Salesforce record of a specified type (for example, an Account object):