updateRelatedRecords Method
Table of Contents
Purpose
You can use the updateRelatedRecords method to update records related to another record.
Modules Supported
Module | Related Module |
Campaigns | Leads |
Products | Leads |
Note:
- It is also possible to update a Campaign or Product keeping any of the Related Module as the Parent Module.
Request URL
To update the member status of a Contact related to a Campaign
XML Format:
https://<APPDOMAIN>/crm/private/xml/Campaigns/updateRelatedRecords?relatedModule=Contacts&xmlData=<Contacts><row no="1"><FL val="CONTACTID">9999999999</FL><FL val="member_status">Sent</FL></row></Contacts>&id=99999999999
JSON Format:
https://<APPDOMAIN>/crm/private/json/Campaigns/updateRelatedRecords?relatedModule=Contacts&xmlData=<Contacts><row no="1"><FL val="CONTACTID">9999999999</FL><FL val="member_status">Sent</FL></row></Contacts>&id=99999999999
Auth Token
Auth Token is an encrypted alphanumeric string that is required to authenticate your CRM account credentials. A valid user's Authentication Token is necessary to access the API. When making an API request, send the authentication token in the Authorization header as shown below:
https://<APPDOMAIN>/crm/private/xml/Campaigns/updateRelatedRecords?relatedModule=Contacts&xmlData=<Contacts><row no="1"><FL val="CONTACTID">9999999999</FL><FL val="member_status">Sent</FL></row></Contacts>&id=99999999999
Header:
Authorization=1000XXXX65.1000XXXX44.caXXXXXXXXXXXX
(See Using Authentication Token )
Request Parameters
Parameter | Data Type | Description |
relatedModule* | String | The module to which a record is related. For example: If a lead related to a campaign needs to be updated, the value for this parameter will be Leads. |
id* | Integer | The ID of the record to be updated. |
xmlData* | XML | The XML values to be passed. |
* - Mandatory parameter
Note:
- Refer the Release Notes page to learn more about enhancements made in the API implementation.
Additional Notes
- You can update a maximum of 100 records.
- While retrieving data from your Vertical Solution account, role-based security (Roles, Profiles, Field-level security and Data sharing rules) is applied. For role-based security settings, see Security Administration .
Examples
To update the list price of a Product related to a Price Book
https://<APPDOMAIN>/crm/private/xml/PriceBooks/updateRelatedRecords?id=Price Book ID&relatedModule=Products&xmlData=<Products><row no="1"><FL val="PRODUCTID">508020000000061987</FL><FL val="list_price">100.00</FL></row></Products>
Response Format
<response uri="/crm/private/xml/PriceBooks/updateRelatedRecords">
<result>
<status>
<code>200</code>
</status>
<success>
<code>4800</code>
</success>
<updated-ids>[508020000000061987]</updated-ids>
</result>
</response>