Resolving problems when you use Salesforce nodes
Use the advice given here to help you to avoid or resolve problems that might arise when you are using SalesforceRequest nodes.
Connecting to Salesforce
Procedure
- When you set the Salesforce password by using the mqsisetdbparms
command, ensure that the password is suffixed with the Salesforce
security token for the Salesforce ID. You can get the security token
from the email that was sent to the email address associated with
the credentials when the security token was last reset. For more information, see Configuring a secure connection to Salesforce.com.
- After creating a new IBM Integration Bus Connected App in Salesforce.com, click Manage and ensure that the OAuth policy Permitted Users is set to All users may self-authorize. If this option is not selected, connections might fail even if the correct credentials are supplied.
- Ensure that the Salesforce user ID that you use allows for the number of operations that you want to perform. Some types of account apply quotas to the number of operations that can be performed in a given time period using the Force.com REST API.
Working with Salesforce records
Procedure
- If you want to use a SalesforceRequest node for
production purposes, you must purchase a separate license entitlement
for IBM Application Integration
Suite. You must then change the operation mode of the integration
node to applicationIntegrationSuite mode. For more information, see License requirements and Changing the operation mode of your integration nodes.
- You can reduce the amount of data returned from Salesforce
through a
retrieve
operation, by using a field filter to specify the particular fields that you want to retrieve. Performance is improved as a result because, if no fields are specified, an extra call is made by the Salesforce client code to retrieve the full list of fields. - After a
retrieve
operation, the output message body will be a JSON array, unless a Salesforce ID is specified to retrieve a single record. - If you are using the JSON schema for Salesforce objects in a Mapping node, the schema and the message map must reside in the same shared library or REST API. For more information, see Using Salesforce models.
- Several fields in Salesforce objects are read-only, and
an attempt to create or update a read-only field will return an error
from Salesforce. Fields that are read-only are typically system properties
(such as '
CreatedDate
') or derived fields (such as 'BillingAddress
').
Handling errors returned from the SalesforceRequest node
About this task
When you are using the SalesforceRequest node, several
different types of failure can be propagated to the failure terminal
of the node, including the following:
- Missing or badly formed data is supplied to the SalesforceRequest node.If the validation of the input data in the message body or the local environment fails, error
bip3859
orbip3862
will be propagated to the Failure terminal, which contains details of the incorrectly formed or missing data. For example, if a request is made to retrieve a set of records but the filter property in the LocalEnvironment specifies the limit clause as a negative value, errorbip3859
will be sent to the Failure terminal with details of the field that caused the validation error:Feb 22 11:32:02 localhost IIB[25130]: IBM Integration Bus v10004 (Server1.default) [Thread 26660] (Msg 3/3) BIP3859E: The property 'filter.limit'='-1' supplied to the SalesforceRequest node is invalid.
- A communications failure with Salesforce. If there is a communications failure with Salesforce, for example if an invalid URL was supplied or an authorization failure occurs, error
bip3858
will be sent to the Failure terminal of the SalesforceRequest node, with the message inserts containing details of the failure. For example, if a request is made to retrieve a set of records but the URL provided on the SalesforceRequest node is incorrect, errorbip3858
will be sent to the Failure terminal with details of the error:Feb 22 11:37:01 localhost IIB[25130]: IBM Integration Bus v10004 (Server1.default) [Thread 27379] (Msg 3/3) BIP3858E: The SalesforceRequest node received error code 'Error' while executing 'Retrieve' operation. Error 'getaddrinfo ENOTFOUND badlogin.salesforce.com'.
- The Salesforce operation returned a failure.If the Salesforce operation executed but returned a failure, error
bip3858
will be sent to the Failure terminal of the SalesforceRequest node, with the message inserts containing details of the failure. For example, if a request is made to retrieve a set of records but the filter property in the LocalEnvironment specifies an invalid name in the field clause, errorbip3858
will be sent to the Failure terminal with details of the error:Feb 22 12:05:36 localhost IIB[25130]: IBM Integration Bus v10004 (Server1.default) [Thread 31343] (Msg 3/3) BIP3858E: The SalesforceRequest node received error code 'INVALID_FIELD' while executing 'Retrieve' operation. Error ' SELECT Id, Name, RemoteAddress FROM Account ^ ERROR at Row:1:Column:18 No such column 'RemoteAddress' on entity 'Account'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names.'.
- An update or delete request was made specifying a Salesforce
identifier, but no record exists with that Salesforce ID.This error code is returned only for the
update
anddelete
requests; if no record exists for aretrieve
request, no error is returned, but an empty result is returned through the Out terminal to the SalesforceRequest node. For example, if a request is made to delete a record, but no record exists with the specified Salesforce Id, errorbip3863
is sent to the failure terminal:
This is not a complete list of the errors code which may be returned from the SalesforceRequest node.Feb 22 12:16:47 localhost IIB[25130]: IBM Integration Bus v10004 (Server1.default) [Thread 414] (Msg 3/3) BIP3863E: A request was sent to Salesforce specifying an ID with value '000000000000000000' while processing the 'delete' operation, but no Salesforce record could be found with that ID.