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.
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.