Salesforce connector

The Salesforce connector is used to integrate with an installation of Salesforce and have a process operate on Salesforce objects.

The Salesforce connector is displayed on the process diagram with the Salesforce logo.

Important: The Salesforce connector requires a Salesforce account to use. This account is separate to the Alfresco hosted environment and should be created and managed by customers.

The actions that can be executed using the Salesforce connector are:

Important: The Salesforce connector requires a Salesforce developer account to interact with and a Connected App set up to interact with the Process Automation connector.

Create an object instance

The CREATE action is used by the Salesforce connector to create a new Salesforce object.

The input parameters to create an object are:

ParameterTypeDescription
SObjectNameStringRequired. The name of the Salesforce object to create, for example Account.
salesforcePayloadJSONRequired. The payload to send to Salesforce as a JSON map. See Salesforce API documentation for valid fields to send.

The output parameters from creating an object in Salesforce are:

ParameterTypeDescription
salesforceResultStringOptional. The result from the REST or SOAP call from Salesforce.
salesforceStatusStringOptional. The HTTP status code of the response.

Get an object instance

The GET action is used by the Salesforce connector to retrieve a Salesforce object.

The input parameters to get an object are:

ParameterTypeDescription
SObjectNameStringRequired. The name of the Salesforce object to get, for example Account.
SObjectIdStringRequired. The Salesforce object ID, for example accountId.

The output parameters from getting an object from Salesforce are:

ParameterTypeDescription
salesforceResultStringOptional. The result from the REST or SOAP call from Salesforce.
salesforceStatusStringOptional. The HTTP status code of the response.

Update an object instance

The UPDATE action is used by the Salesforce connector to update a Salesforce object.

The input parameters to update an object are:

ParameterTypeDescription
SObjectNameStringRequired. The name of the Salesforce object to update, for example Account.
SObjectIdStringRequired. The Salesforce object ID, for example accountId.
salesforcePayloadJSONRequired. The payload to send to Salesforce as a JSON map. See Salesforce API documentation for valid fields to send.

The output parameters from updating an object from Salesforce are:

ParameterTypeDescription
salesforceStatusStringOptional. The HTTP status code of the response.

Delete an object instance

The DELETE action is used by the Salesforce connector to delete a Salesforce object.

The input parameters to delete an object are:

ParameterTypeDescription
SObjectNameStringRequired. The name of the Salesforce object to delete, for example Account.
SObjectIdStringRequired. The Salesforce object ID, for example accountId.

The output parameters from deleting an object from Salesforce are:

ParameterTypeDescription
salesforceStatusStringOptional. The HTTP status code of the response.

Query an object instance

The QUERY action is used by the Salesforce connector to query a Salesforce object.

The input parameters to query an object are:

ParameterTypeDescription
salesforceQueryStringRequired. The query to execute against Salesforce, for example SELECT name FROM account.

The output parameters from querying an object from Salesforce are:

ParameterTypeDescription
salesforceResultStringOptional. The result from the REST or SOAP call from Salesforce.
salesforceStatusStringOptional. The HTTP status code of the response.

Submit an object instance for approval

The APPROVAL_SUBMIT action is used by the Salesforce connector to submit a Salesforce object for approval.

The input parameters to submit an object for approval are:

ParameterTypeDescription
salesforcePayloadJSONRequired. The payload to send to Salesforce as a JSON map. See Salesforce API documentation for valid fields to send.

The output parameters from submitting an object for approval are:

ParameterTypeDescription
salesforceResultStringOptional. The result from the REST or SOAP call from Salesforce.
salesforceStatusStringOptional. The HTTP status code of the response.

Query approval process

The APPROVAL_LIST action is used by the Salesforce connector to query Salesforce objects awaiting approval.

The output parameters from querying objects awaiting approval are:

ParameterTypeDescription
salesforceResultStringOptional. The result from the REST or SOAP call from Salesforce.
salesforceStatusStringOptional. The HTTP status code of the response.

Approve an object instance submitted for approval

The APPROVAL_APPROVE action is used by the Salesforce connector to approve a Salesforce object that is awaiting approval.

The input parameters to approve an object awaiting approval are:

ParameterTypeDescription
salesforcePayloadJSONRequired. The payload to send to Salesforce as a JSON map. See Salesforce API documentation for valid fields to send.

The output parameters from approving an object awaiting approval are:

ParameterTypeDescription
salesforceResultStringOptional. The result from the REST or SOAP call from Salesforce.
salesforceStatusStringOptional. The HTTP status code of the response.

Reject an object instance submitted for approval

The APPROVAL_REJECT action is used by the Salesforce connector to reject a Salesforce object that is awaiting approval.

The input parameters to reject an object awaiting approval are:

ParameterTypeDescription
salesforcePayloadJSONRequired. The payload to send to Salesforce as a JSON map. See Salesforce API documentation for valid fields to send.

The output parameters from rejecting an object awaiting approval are:

ParameterTypeDescription
salesforceResultStringOptional. The result from the REST or SOAP call from Salesforce.
salesforceStatusStringOptional. The HTTP status code of the response.

Create a custom object definition

The CUSTOM_OBJECT_CREATE action is used by the Salesforce connector to create a custom Salesforce object definition.

The input parameters to create a custom object definition are:

ParameterTypeDescription
salesforcePayloadJSONRequired. The payload to send to Salesforce as a JSON map. See Salesforce API documentation for valid fields to send.

The output parameters from creating an object definition are:

ParameterTypeDescription
salesforceResultStringOptional. The result from the REST or SOAP call from Salesforce.
salesforceStatusStringOptional. The HTTP status code of the response.

Configuration parameters

The configuration parameters for the Salesforce connector are:

ParameterDescription
SALESFORCE_CLIENT_IDRequired. The ID of your Salesforce account. When viewing your application in the Salesforce App Manager this is called the Consumer Key.
SALESFORCE_CLIENT_SECRETRequired. The secret associated to your Salesforce account. When viewing your application in the Salesforce App Manager this is called the Consumer Secret.
SALESFORCE_USERNAMERequired. The user that the connector will use to interact with Salesforce.
SALESFORCE_PASSWORDRequired. The password for the user that will interact with Salesforce.
SALESFORCE_SECURITY_TOKENRequired. The security token for the user that will interact with Salesforce. To obtain this token, log into Salesforce with the user and navigate to Settings > My Personal Information.
SALESFORCE_URL_LOGINRequired. The URL to login to Salesforce, for example https://login.salesforce.com/services/oauth2/token.
SALESFORCE_SOAP_URL_LOGINRequired. The URL for SOAP requests, for example https://login.salesforce.com/services/Soap/c/45.0.
SALESFORCE_VERSIONRequired. The version of Salesforce, for example 45.0.

Errors

The possible errors that can be handled by the Salesforce connector are:

ErrorDescription
MISSING_INPUTA mandatory input variable was not provided.
INVALID_INPUTThe input variable has an invalid type.
UNKNOWN_ERRORUnexpected runtime error.
REQUEST_TIMEOUTSalesforce request timeout.
CIRCUIT_BREAKER_OPENMax number of retries reached without success.
MISSING_TOKENSalesforce access token could not be obtained.
CONNECTION_ERRORSalesforce connection error.

© 2023 Alfresco Software, Inc. All Rights Reserved.