Use Enable Survivorship Custom Header to Determine the Best Version of Your Records
You can enable survivorship on update for Accounts, Contacts, Hub Organization, and Hub Person using REST APIs to maintain best version of your records.
Survivorship rules are a collection of business rules that determine the master or surviving record, and its attributes, during a merge operation. The rules select the best version of a record, based on business rules, from multiple source systems. You must configure survivorship and agreement rules before processing merge requests. For more information on setting up survivorship, see the following sections in the Duplicate Resolution Setup chapter in Implementing Customer Data Management (CDM) for CX Sales and Fusion Service guide:
- Set Up Duplicate Resolution Using Groovy Scripts
- Set Up Duplicate Resolution Using Oracle Business Rules
When updating Accounts, Hub Organization, Contacts, and Hub Person using REST APIs, you may have multiple value instances for a given attribute. You can set the best attribute value instance for a golden master record by passing the Header "Enable-Survivorship: Y" in the REST request. Survivorship on update evaluates the proposed change that is presented by the update message to determine whether the change should be accepted or rejected based on the configured survivorship rules.
The header would minimally impact existing REST-based jobs created, because survivorship is supported only for Accounts, Contacts, Hub Person, and Hub Organizations. Alternatively, you can enable the header only for specific jobs.
In the following example REST calls, we're first creating a hub organization (to ensure we have a record to update) and then are updating some attributes of the same hub organization with the enable survivorship header set to Y.
Example URL:
https://servername.fa.us2.oraclecloud.com
/crmRestApi/resources/11.13.18.05/hubOrganizations
{ "OrganizationName": "Enable Survivorship LLT", "SourceSystem": "RNOW", "Comments": "RNOW", "StockSymbol": "RNOW", "DUNSNumber": "RNOW", "PrincipalName": "RNOW", "MissionStatement": "RNOW", "BusinessScope": "RNOW", "PartyUsageCode": "PARTY_OF_INTEREST" }
{ "PartyId": 300100584892080, "PartyNumber": "CDRM_970817", "SourceSystem": "RNOW", "BusinessScope": "RNOW", "SourceSystemReferenceValue": null, "OrganizationName": "Enable Survivorship LLT", "UniqueNameSuffix": null, "Status": "A", "PartyUsageCode": "PARTY_OF_INTEREST", "Comments": "RNOW", "DUNSNumber": "RNOW", "MissionStatement": "RNOW", "PrincipalName": "RNOW", "StockSymbol": "RNOW", "UniqueNameAlias": "Enable Survivorship LLT", "YearIncorporated": null, ... }
Now let's update the hub organization with SourceSystem and other attributes as "DAAS" with Header "Enable-Survivorship: Y"
Example URL:
Here's an example of the cURL Command:
curl --location --request PATCH https://servername.fa.us2.oraclecloud.com /crmRestApi/resources/11.13.18.05/hubOrganizations/CDRM_970818' \
--header 'Accept: application/json' \
--header 'Content-Type: application/vnd.oracle.adf.resourceitem+json' \
--header 'Enable-Survivorship: True' \
--header 'Authorization: Basic U2FsZXNfYWRtaW46V2VsY29tZTE=' \
Request Body:
{ "SourceSystem": "DAAS", "StockSymbol": "DAAS", "MissionStatement": "DAAS", "DUNSNumber": "DAAS", "Comments": "DAAS", "BusinessScope": "DAAS", "PrincipalName": "DAAS" }
{ "PartyId": 300100584894088, "PartyNumber": "CDRM_970818", "SourceSystem": "DAAS", "SourceSystemReferenceValue": null, "OrganizationName": "Enable Survivorship Logic", "PartyUsageCode": "PARTY_OF_INTEREST", "Comments": "DAAS", "DUNSNumber": "RNOW", "MissionStatement": "DAAS", "PrincipalName": "RNOW", "StockSymbol": "DAAS", "UniqueNameAlias": "Enable Survivorship Logic", ... }
We see that the PrincipalName and BusinessScope still have the value 'RNOW', even though we had updated the values for them. This is because 'RNOW' has higher attribute source confidence value than 'DAAS' for these attributes. Survivorship rules are defined on attributes that gets executed during an update of that attribute without invalidating the record. Based on your configured survivorship rules, Enable Survivorship will allow an update to an existing master record to selectively discard certain attributes from an update message.