Accelerate the Value of Data

Relation Synchronization from Reltio Platform to Salesforce

You can synchronize a relationship either as a separate object or as a field from Reltio platform to Salesforce.

Mapping Relations as a Separate Object

You can synchronize a relation in Reltio platform to a custom relation object in Salesforce. Custom relation objects in Salesforce usually contain two references, one to a referred object (parent) and another to a referenced object (child). In such scenarios, Reltio relation type is mapped as a root object in the mapping, just like entity types.

Mapping Details

In Salesforce, the Partner_vod__c object object represents a relation between a Contact and an Account. It contains two reference fields: ContactId__c and AccountId__c which reference the corresponding Contact and Account details participating in the relation. They are synchronized to Reltio’s affiliatedwith relation, where the Contact represents the start object and Account is the end object.

Compared to a simple entity mapping, the following additional changes are done for mapping the relations:
  • sobject/startField - The field name of Salesforce object containing the reference to the start object.
  • sobject/endField - The field name of Salesforce object containing the reference to the end object.
  • relation - This must be set to 'true' for relation types. This is added implicitly, if missing.
  • startObjectType - The Reltio type for a start object of the relation. It is required for relations.
  • endObjectType - The Reltio type for an end object of the relation. It is required for relations.

The following example shows the mapping between the Reltio affiliatedwith relation type and Salesforce's Partner_vod__c custom object type (this custom object holds the relations between Account and Contact objects):

{
 "description": "Synchrionization of affiliatedwith relation with salesforce Partner_vod__c custom object",
 "isActive": true,
 "sfdcSource": "configuration/sources/Salesforce",
 "reltioObjectType": "configuration/relationTypes/affiliatedwith",
 "sobject": {
   "type": "Partner_vod__c",
   "recordTypeId": "012f4000000txv4AAA",
   "startField": "ContactId__c",
   "endField": "AccountId__c"
 },
 "relation": true,
 "startObjectType": "configuration/entityTypes/Contact",
 "endObjectType": "configuration/entityTypes/Organization",
 "to_salesforce": {
   "attributeMapping": [
     {
       "sfdcAttrName": "Title__c",
       "value": "configuration/relationTypes/affiliatedwith/attributes/Title"
     }
   ]
 },
 "to_reltio": {
   "attributeMapping": [
     {
       "uri": "configuration/relationTypes/affiliatedwith/attributes/Title",
       "value": "Title__c"
     }
   ]
 }
}
Create a new relation in Reltio platform

As an example, consider that a relation is created in the Reltio platform with configuration/relationTypes/Contact type, between the entityTypes/Contact (startObject) mapped to Contact in Salesforce and entityTypes/Organization (endObject) mapped to Account.

Any of the following scenarios can occur:
  • If both the entities were already synced to Salesforce, new object of Partner_vod__c type is created in Salesforce. The ContactId__c field contains the ID of Contact, the AccountId__c field contains the ID of Account. All relation attributes specified in to_salesforce/attributeMapping are synchronized to appropriate fields in Partner_vod__c object.
  • If an entity is not synced to Salesforce, the connector attempts to synchronize it before processing the relation.
  • If the entity is synced, new object of Partner_vod__c type is created in Salesforce.
  • If the entity is not synced (for example, filtered out or for some other reason), the connector does not create the object of Partner_vod__c type.
Update an existing relation in Reltio platform

When a relation is updated in Reltio, the startObject or endObject is not expected to change. The changes are applicable only for the attributes. The Partner_vod__c object relation is updated with attribute OV. If the modified relation does not have Salesforce crosswalks, it is processed as a new relation.

Deleted a relation in Reltio platform

As an example, consider that a relation is removed in the Reltio platform with configuration/relationTypes/Contact type, between the entityTypes/Contact (startObject) mapped to Contact in Salesforce and entityTypes/Organization (endObject) mapped to Account. In this case, the Partner_vod__c object relation is removed.

Mapping Relations as a Field

Reltio Integration for Salesforce supports the synchronization of relations from Reltio platform to Salesforce when a child object in Salesforce contains a reference to a parent object. For example, Contact is a child of an Account.

To enable synchronization of relations, you must configure the child object mapping to add the relations array with a relation object. One Salesforce object can have multiple relations to other Salesforce objects. This is because the child object (sObject) has a separate field with a reference to the parent object for each relationship. You must configure the following fields:
  • relationType - contains relation name defined in L3 configuration
  • sfdcAttrName - reference to parent ID
"relations": [
                {
                    "relationType": "configuration/relationTypes/Contact", // relation type in Reltio
                    "sfdcAttrName": "AccountId" // Salesforce object field contains reference to parent
                }
            ]
Note: You may not be able to synchronize all the relationships.
To sync relations to Salesforce, ensure the following:
  • The relation startObject type must be present in the mapping. The Salesforce object type defined in mapping for the startObject type must match with the parent Salesforce object type that is determined by the reference field to the parent object sfdcAttrName.
  • The relation endObject type must match to the Reltio object type of child object defined in mapping.

Mapping Example:

[
  {
    "description": "Contact to Contact mapping.",
    "isActive": true,
    "processMerge": false,
    "sfdcSource": "configuration/sources/SFDC",
    "sobject": {
      "type": "Contact"
    },
    "reltioObjectType": "configuration/entityTypes/Contact",
    "to_salesforce": {
      "attributeMapping": [
        {
          "sfdcAttrName": "FirstName",
          "value": "configuration/entityTypes/Contact/attributes/FirstName"
        },
        {
          "sfdcAttrName": "LastName",
          "value": "configuration/entityTypes/Contact/attributes/LastName"
        }
      ],
      "relatedObjects": [],
      "relations": [
        {
          "relationType": "configuration/relationTypes/Contact", // relation type in Reltio
          "sfdcAttrName": "AccountId" // Salesforce object field contains reference to parent
		  // startObject type defined in relation metadata must be "configuration/entityTypes/Company" in current example
		  // endObject type defined in relation metadata must be "configuration/entityTypes/Contact" in current example
        }
      ]
    },
    "to_reltio": {
      "attributeMapping": []
    }
  },
  {
    "description": "Company to Account mapping.",
    "isActive": true,
    "processMerge": false,
    "sfdcSource": "configuration/sources/SFDC",
    "sobject": {
      "type": "Account",
      "recordTypeId": "012f4000000txv4AAA"
    },
    "reltioObjectType": "configuration/entityTypes/Company",
    "to_salesforce": {
      "attributeMapping": [
        {
          "sfdcAttrName": "Name",
          "value": "configuration/entityTypes/Company/attributes/Name",
        }
      ],
      "relatedObjects": []
    },
    "to_reltio": {
      "attributeMapping": []
    }
  }
]
Create a new relation
Example: If a relation with configuration/relationTypes/Contact type is created between the entities where the entityTypes/Contact (endObject) is mapped to Contact in Salesforce and entityTypes/Company (startObject) is mapped to Account, the following results are expected:
  • If both the entities are already synced to Salesforce, the Contact in Salesforce is updated and the AccountId field contains the ID of the parent account.
  • If some entity is not synced to Salesforce, the connector tries to synchronize it before processing the relation.
  • If the entity is synced, the Contact in Salesforce is updated and the AccountId field contains the Account ID.
  • If the entity is not synced (filtered out or for some other reason), the connector does not update the AccountId field in Contact in Salesforce.
Update an existing relation

Updates to relations are processed in the same way as new relations.

Delete a relation
Example: If a relation with configuration/relationTypes/Contact type is removed between the entities where the entityTypes/Contact (endObject) is mapped to Contact in Salesforce and entityTypes/Company (startObject) is mapped to Account, the following results are expected:
  • If the contact (endObject) is synced to Salesforce, the connector sets the AccountId field to null in the contact.
  • If the contact (endObject) is not synced to Salesforce, the connector does not update Contact.

Update multiple relationships

Trying to merge data from Reltio to Salesforce in which one Reltio entity has multiple corresponding Salesforce crosswalks? When doing so, the Reltio Integration for Salesforce, by default, only recognizes the crosswalk of the first known entity, ignoring all other crosswalks. By enabling the new processing merge capability, Reltio Integration for Salesforce can process all crosswalks and update all corresponding objects' relationship in Salesforce.

You can enable the Reltio Integration for Salesforce to process all entity crosswalks and update all corresponding objects' relationships when merging data from Reltio to Salesforce. To do this, add "processAllRelationCrosswalks":true to the entity mapping for any field relationship or custom object relationship mapping.

{
                "description": "Contact",
                "isActive": true,
                "processAllRelationCrosswalks": true,
                "sfdcSource": "configuration/sources/Salesforce_PM",
                "sobject": {
                    "type": "Contact"
                },
                "reltioObjectType": "configuration/entityTypes/Contact",
                "to_salesforce": {
                },
                "to_reltio": {
                    "syncBackToSalesforce": true,
                    "attributeMapping": [
                    ],
                    "relations": [
                        {
                            "relationType": "configuration/relationTypes/ContactPerson",
                            "sfdcAttrName": "AccountId"
                        }
                    ]
                }