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.
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"
}
]
}
}
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.
attributeMapping
are posted to Reltio. The start object of the relation is the entity referenced by startField
and the end object becomes the endField
.
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
.
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.
relationType
- contains relation name defined in L3 configurationsfdcAttrName
- 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, thestartObject
type must be equal to the Reltio type mapped to AccountentityTypes/Company
or it's inheritable typeentityTypes/Organization
. - The relation
endObject
type must be suitable for the Salesforce parent object type. For example, if the Salesforce object type is Contact, theendObject
type must be equal to the Reltio type mapped to ContactentityTypes/Contact
or it's inheritable typeentityTypes/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"
}
]
}
}
]
- Account #1 (parent of Account #2)
- Account #2 (parent of Account #3)
- Account #3
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.
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.
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.
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.