Unify and manage your data

Relation Synchronization from Salesforce to Reltio Platform

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

Mapping Relations as a Separate Object

You can synchronize Salesforce relations configured in custom objects to a Reltio relationTypes. Custom relation objects in Salesforce usually contain two references, an object (parent) and 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 start object and Account is the end object.

You can also synchronize additional attributes of the relation (Title). The relation’s Title attribute is mapped to the custom object’s Title__c attribute.

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 entity type for a start object of the relation. It is required for relations.
  • endObjectType - The Reltio entity 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": "Synchronization of affiliated with 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"
     }
   ]
 }
},

The following example shows the details that are sent to Reltio for creating or updating a relation:

{
  "type": "configuration/relationTypes/affiliatedwith",
  "attributes": {
    "Title": [
      {
        "value": "Partner"
      }
    ]
  },
  "crosswalks": [
    {
      "type": "configuration/sources/Salesforce",
      "sourceTable": "Partner_vod__c",
      "uri": "/a084T0000011ftrQAA",
      "value": "a084T0000011ftrQAA",
      "dataProvider": true,
      "contributorProvider": false
    }
  ],
  "startObject": {
    "type": "configuration/entityTypes/Contact",
    "crosswalks": [
      {
        "type": "configuration/sources/Salesforce",
        "sourceTable": "Contact",
        "value": "0034T000009pQ5HQAU"
      }
    ]
  },
  "endObject": {
    "type": "configuration/entityTypes/Organization",
    "crosswalks": [
      {
        "type": "configuration/sources/Salesforce",
        "sourceTable": "Account",
        "value": "0014T000008IhyDQAS"
      }
    ]
  }
}
Create a new relation in Salesforce

Example: There are two Salesforce objects, Contact (child) and Account (parent) and Contact has the AccountId field with a reference to Account.

Create a new Contact in Salesforce and choose an existing Account or create a new one as a child. When you sync changes to the Reltio platform, the synced entity has a relation of configuration/relationTypes/Contact type.

A corresponding relation type is created in Reltio. Any attributes mapped in attributeMapping are posted to Reltio. The start object of the relation is the entity referenced by startField and the end object becomes the endField.
Note: The referenced start and end objects must be already synchronized between Salesforce and Reltio to enable the synchronization of the relation.
Update an existing relation in Salesforce

Example: There are two Salesforce objects, Contact (child) and Account (parent) and Contact has the AccountId field with a reference to Account.

Create a new Contact in Salesforce and choose an existing Account or create a new one as a child. When you sync changes to the Reltio platform, the synced entity has a relation of configuration/relationTypes/Contact type.

When parent or child object details have not been changed, only the mapped attributes are updated in Reltio. If one of the referenced object is modified (re-parenting), the existing relation is deleted in Reltio and a new relation is created between the new parents with the mapped attribute details. This is due to the fact that Reltio does not permit updation of start object or end object in a relationType.

Delete a relation in Salesforce

Example: There are two Salesforce objects, Contact (child) and Account (parent) and Contact has the AccountId field with a reference to Account.

Create a new Contact in Salesforce and choose an existing Account or create a new one as a child. When you sync changes to the Reltio platform, the synced entity has a relation of configuration/relationTypes/Contact type.

The corresponding relation's crosswalk is end-dated in Reltio.

Mapping Relations as a Field

Reltio Integration for Salesforce supports the synchronization of relations from Salesforce to Reltio platform 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 (sObject) has a separate field with a reference to the parent object for each relationship. The following fields need to be configured:
  • relationType - contains relation name defined in L3 configuration
  • sfdcAttrName - reference to parent ID
"relations": [
                {
                    "relationType": "configuration/relationTypes/Contact", // relaton type in Reltio
                    "sfdcAttrName": "AccountId" // Salesforce object field contains reference to parent
                }
            ]
To sync relations to Reltio platform, ensure the following:
  • The relation startObject type must be suitable for the Salesforce parent object type. For example, if the Salesforce object type is Account, the startObject type must be equal to the Reltio type mapped to Account entityTypes/Company or it's inheritable type entityTypes/Organization.
  • The relation endObject type must be suitable for the Salesforce parent object type. For example, if the Salesforce object type is Contact, the endObject type must be equal to the Reltio type mapped to Contact entityTypes/Contact or it's inheritable type entityTypes/Individual.

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": [],
            "relatedObjects": []
        },
        "to_reltio": {
            "attributeMapping": [
                {
                    "uri": "configuration/entityTypes/Contact/attributes/FirstName",
                    "value": "FirstName"
                },
                {
                    "uri": "configuration/entityTypes/Contact/attributes/LastName",
                    "value": "LastName"
                }
            ],
            "relations": [
                {
                    "relationType": "configuration/relationTypes/Contact", // relaton type in Reltio
                    "sfdcAttrName": "AccountId" // Salesforce object field contains reference to parent
                }
            ]
        }
    },
    {
        "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": [],
            "relatedObjects": []
        },
        "to_reltio": {
            "attributeMapping": [
                {
                    "uri": "configuration/entityTypes/Company/attributes/Name",
                    "value": "Name"
                }
            ]
        }
    }
]
Error Behavior
If a parent object processing results in an error, all objects in the hierarchy that have a reference to that parent object are marked as failed. For example, there are 3 Accounts:
  • Account #1 (parent of Account #2)
  • Account #2 (parent of Account #3)
  • Account #3
If Account #1 fails, then Account #2 and Account #3 are also marked as failed.
Create a New Relation

Example: There are two Salesforce objects, Contact (child) and Account (parent) and Contact has the AccountId field with a reference to Account.

Create a new Contact in Salesforce and choose an existing Account or create a new one as a child. When you sync changes to the Reltio platform, the synced entity has a relation of configuration/relationTypes/Contact type.

Update Relation

Example: There are two Salesforce objects, Contact (child) and Account (parent) and Contact has the AccountId field with a reference to Account.

Create a new Contact in Salesforce and choose any existing Account or create new one as a child. When you sync changes to Reltio platform, the synced entity has a relation of type configuration/relationTypes/Contact.

Change the Contact's parent in Salesforce and sync to Reltio platform. The existing relation is deleted and a new relation to the new parent is created in Reltio platform.

Delete Relation

Example: There are two Salesforce objects, Contact (child) and Account (parent) and Contact has the AccountId field with a reference to Account.

Create a new Contact in Salesforce and choose any existing Account or create new one as a child. When you sync changes to Reltio platform, the synced entity has a relation of type configuration/relationTypes/Contact.

Remove the reference to Account from the Contact object in Salesforce and sync to Reltio platform. The relation is removed in Reltio platform.

Delete Parent Object with Relation

Example: There are two Salesforce objects, Contact (child) and Account (parent) and Contact has the AccountId field with a reference to Account.

Create a new Contact in Salesforce and choose any existing Account or create new one as a child. When you sync changes to Reltio platform, the synced entity has a relation of type configuration/relationTypes/Contact.

Remove the Contact's parent object in Salesforce and sync to Reltio platform. The relation is removed in Reltio platform.