Salesforce update producer

Salesforce Update Producer

The Salesforce Update Producer can be used to update the fields of one or more Salesforce records with the specified record IDs.

This component has the option of either using the specified ConnectMessagePart body to update records or using the headers in a ConnectMessagePart to update a single record.

So it is possible to update more than one record (up to a limit of 200 records) in a single transaction when using the ConnectMessagePart body. This is important because Salesforce limits the daily number of API calls a client application, such as the ConnectAgent, can request from the Salesforce servers.

Salesforce Update Producer

Attribute

Description

Name*

By default, we fill this out with the technical ‘tag’, followed by a serial number. Changing the name is optional.

Enabled

Set this value to true, if you want this service to be enabled.

MessagePart In

The incoming ConnectMessagePart that specifies which Salesforce objects need to be updated and how they are to be updated.

Salesforce Instance

The Salesforce instance refers to the server your Salesforce organization lives on. It is visible in the first part of the url after you log in to your Salesforce account. Valid examples are eu27, ap5, and na12.

Key Password

The password of the key pair in the keystore. If left empty it defaults to the keystore password.

Key Alias

The alias of the key pair in the ConnectPlaza keystore. The private key is used to sign the JWT. A certificate with the public key needs to be registered in Salesforce when a connected app is created.
All or None Roll everything back when operating on multiple Salesforce records at once and at least one of the operations fails.
Client ID The client ID of the Salesforce connected app.
Username The username of the Salesforce account you wish to use to authenticate the Salesforce API calls.
Use Body

Get the Salesforce record information from the message body. Alternatively, get this information from the headers. See the documentation for the correct message body format.

Authentication

Select the way you wish to authenticate your Salesforce API calls. Note that each authentication method has different requirements. Consult ConnectPlaza's technical documentation for more details.

Security Token

The security token of the Salesforce account you wish to use to authenticate the Salesforce API calls. Note that if you do not possess the security token you can request Salesforce to generate a new one. Consult the Salesforce documentation for the details.

When Authentication is set to OAUTH2_PASSWORD or SOAP_PASSWORD

Client Secret

The client password of the Salesforce connected app.

When Authentication is set to OAUTH2_PASSWORD or  OAUTH2_REFRESH_TOKEN

Password

The password of the Salesforce account you wish to use to authenticate the Salesforce API calls.

When Authentication is set to OAUTH2_PASSWORD or SOAP_PASSWORD

Refresh Token

The OAuth2 refresh token for the specified connected app. Note that you can set the expiration date of the refresh token in your Salesforce connected app configuration. It is advised to set it to never expire.

When Authenticationi s set to OAUTH2_REFRESH_TOKEN

Salesforce Object Name

The Salesforce object name.

When Use Body is false

Mapped Headers

A comma separated list of ConnectMessagePart header names that map to Salesforce object fields.

When Use Body is false

Cache Expiration

The expiration time in minutes of entries in the cache. The cache is used to store Salesforce object descriptions which are in turn used to format API requests. Note that if this value is small it might result in many redundant API calls. However, if the value is large, changes made to Salesforce object types might take longer to propagate to the cache. Advanced

Description

Description of the purpose of this component. This will be part of the documentation printed out in the Diagram of this interface.

 

When using the ConnectMessagePart body, we use XML to specify the records that need to be updated. For example, an incoming ConnectMessagePart might have the following XML body:

<records>
    <record type=”Account” id=”0013X00002T5jCkQAJ”>
        <field name=”Rating” value=”Hot”/>
    </record>
    <record type=”Account” id=”0013X00002SSzs4QAD”>
        <field name=”Name” value=”foo”/>
        <field name=”NumberOfEmployees” value=”42”/>
    </record>
</records>

The top-level element is always records when updating multiple records. However, if you update a single record, you can have record as the top-level element. For example, the following would also be valid:

<record type=”Account” id=”0013X00002SSzs4QAD”>
    <field name=”Name” value=”foo”/>
    <field name=”NumberOfEmployees” value=”42”/>
</record>

The records element can have multiple record subelements. Each record always has a type attribute. Note that you cannot create records of multiple different types in a single batch. So each record must have the same type. Each record must also have an id attribute that specifies the specific Salesforce record ID.

Furthermore, each record has one or more fields. Each field must have a name and value attribute. It is possible to update different fields in different records in a single transaction as long as the records are of the same type.

Finally, see the article on authentication for the different available options as well as their corresponding requirements.