Data Filtering

The Salesforce connector supports data filtering between Salesforce and Reltio.

With data filtering, you can configure what data needs to be synced between the two systems. Synchronization is configured as part of mapping and supports functions like equals, notEquals, isEmpty, and isNotEmpty with the OR and AND logic operations between functions.

Filter can be defined on a simple or nested attribute of the Reltio entity being replicated to Salesforce. For replication to Reltio, you use Salesforce objects or related child object fields to filter records.

Replicating Reltio Entities in Salesforce

When you replicate the Reltio entity in Salesforce, the functions listed in Table 1: Supported functions are used.

Table 1. Supported functions
Function Description Mapping Example
equals [uri,value] - filter by level up value, where the value is equal to the uri value
The following example is of a Reltio entity mapped to an sobject:
[
  {
    "sobject": {
      "type": "Account",
      "recordTypeId": "012G00000015NzqIAE"
    },
    "reltioObjectType": "configuration/entityTypes/HCP",
    "sfdcSource": "configuration/sources/SFDC",
    "to_salesforce": {
      "filter": "equals(configuration/entityTypes/HCP/attributes/FirstName, 'John')", //All entities with FirstName=John will be synced
      "attributeMapping": [],
      "relatedObjects": []
    },
    "to_reltio": {
      "attributeMapping": []
    }
  }
]
The following example is of a Reltio entity mapped to an sobject with a complex filter that has two or more combinations:
[
  {
    "sobject": {
      "type": "Account",
      "recordTypeId": "012G00000015NzqIAE"
    },
    "reltioObjectType": "configuration/entityTypes/HCP",
    "sfdcSource": "configuration/sources/SFDC",
    "to_salesforce": {
      "filter": "equals(configuration/entityTypes/HCP/attributes/FirstName, 'Johnny') AND equals(configuration/entityTypes/HCP/attributes/LastName, 'Mnemonic')", //All entities with FirstName=Johnny and LastName=Mnemonic will be synced
      "attributeMapping": [],
      "relatedObjects": []
    },
    "to_reltio": {
      "attributeMapping": []
    }
  }
]
The following example is of a Reltio entity nested attribute mapped to a custom sobject:
[
  {
    "sobject": {
      "type": "Account",
      "recordTypeId": "012G00000015NzqIAE"
    },
    "reltioObjectType": "configuration/entityTypes/HCP",
    "sfdcSource": "configuration/sources/SFDC",
    "to_salesforce": {
      "attributeMapping": [],
      "relatedObjects": [
        {
          "sobject": {
            "type": "Email_vod__c",
            "recordTypeId": "012G00000015O05IAE"
          },
          "rootUri": "configuration/entityTypes/HCP/attributes/Email",
          "filter": "equals(configuration/entityTypes/HCP/attributes/Email/attributes/Type, 'Work') OR equals(configuration/entityTypes/HCP/attributes/Email/attributes/Type, 'Home')", //All entities with Email.Type=Work OR Email.Home will be synced
          "relationshipName": "Email_vod__r",
          "attributeMapping": [
            {
              "sfdcAttrName": "Name",
              "value": "configuration/entityTypes/HCP/attributes/Email/attributes/Email"
            },
            {
              "sfdcAttrName": "Type__c",
              "value": "configuration/entityTypes/HCP/attributes/Email/attributes/Type"
            }
          ]
        }
      ]
    },
    "to_reltio": {
      "attributeMapping": []
    }
  }
]
isEmpty [uri] - filter by level up value, where the value does not exist
The following example is of a Reltio entity mapped to an sobject:
[
  {
    "sobject": {
      "type": "Account",
      "recordTypeId": "012G00000015NzqIAE"
    },
    "reltioObjectType": "configuration/entityTypes/HCP",
    "sfdcSource": "configuration/sources/SFDC",
    "to_salesforce": {
      "filter": "equals(configuration/entityTypes/HCP/attributes/FirstName, 'John')", //All entities with FirstName=John will be synced
      "attributeMapping": [],
      "relatedObjects": []
    },
    "to_reltio": {
      "attributeMapping": []
    }
  }
]

The following example is of a Reltio entity mapped to an sobject with a complex filter that has two or more combinations:

[
  {
    "sobject": {
      "type": "Account",
      "recordTypeId": "012G00000015NzqIAE"
    },
    "reltioObjectType": "configuration/entityTypes/HCP",
    "sfdcSource": "configuration/sources/SFDC",
    "to_salesforce": {
      "filter": "equals(configuration/entityTypes/HCP/attributes/FirstName, 'Johnny') AND equals(configuration/entityTypes/HCP/attributes/LastName, 'Mnemonic')", //All entities with FirstName=Johnny and LastName=Mnemonic will be synced
      "attributeMapping": [],
      "relatedObjects": []
    },
    "to_reltio": {
      "attributeMapping": []
    }
  }
]
The following example is of a Reltio entity nested attribute mapped to a custom sobject:
[
  {
    "sobject": {
      "type": "Account",
      "recordTypeId": "012G00000015NzqIAE"
    },
    "reltioObjectType": "configuration/entityTypes/HCP",
    "sfdcSource": "configuration/sources/SFDC",
    "to_salesforce": {
      "attributeMapping": [],
      "relatedObjects": [
        {
          "sobject": {
            "type": "Email_vod__c",
            "recordTypeId": "012G00000015O05IAE"
          },
          "rootUri": "configuration/entityTypes/HCP/attributes/Email",
          "filter": "equals(configuration/entityTypes/HCP/attributes/Email/attributes/Type, 'Work') OR equals(configuration/entityTypes/HCP/attributes/Email/attributes/Type, 'Home')", //All entities with Email.Type=Work OR Email.Home will be synced
          "relationshipName": "Email_vod__r",
          "attributeMapping": [
            {
              "sfdcAttrName": "Name",
              "value": "configuration/entityTypes/HCP/attributes/Email/attributes/Email"
            },
            {
              "sfdcAttrName": "Type__c",
              "value": "configuration/entityTypes/HCP/attributes/Email/attributes/Type"
            }
          ]
        }
      ]
    },
    "to_reltio": {
      "attributeMapping": []
    }
  }
]
isNotEmpty [uri] - filter by level up value, where the value exists
The following example is of a Reltio entity mapped to an sobject:
[
  {
    "sobject": {
      "type": "Account",
      "recordTypeId": "012G00000015NzqIAE"
    },
    "reltioObjectType": "configuration/entityTypes/HCP",
    "sfdcSource": "configuration/sources/SFDC",
    "to_salesforce": {
      "filter": "isNotEmpty(configuration/entityTypes/HCP/attributes/FirstName)", // All entities without FirstName won't be synced
      "attributeMapping": [],
      "relatedObjects": []
    },
    "to_reltio": {
      "attributeMapping": []
    }
  }
]

The following example is of a Reltio entity nested attribute mapped to a custom sobject:

[
  {
    "sobject": {
      "type": "Account",
      "recordTypeId": "012G00000015NzqIAE"
    },
    "reltioObjectType": "configuration/entityTypes/HCP",
    "sfdcSource": "configuration/sources/SFDC",
    "to_salesforce": {
      "attributeMapping": [],
      "relatedObjects": [
        {
          "sobject": {
            "type": "Email_vod__c",
            "recordTypeId": "012G00000015O05IAE"
          },
          "rootUri": "configuration/entityTypes/HCP/attributes/Email",
          "filter": "isNotEmpty(configuration/entityTypes/HCP/attributes/Email/attributes/Type)", //All entities without Type won't be synced
          "relationshipName": "Email_vod__r",
          "attributeMapping": [
            {
              "sfdcAttrName": "Name",
              "value": "configuration/entityTypes/HCP/attributes/Email/attributes/Email"
            },
            {
              "sfdcAttrName": "Type__c",
              "value": "configuration/entityTypes/HCP/attributes/Email/attributes/Type"
            }
          ]
        }
      ]
    },
    "to_reltio": {
      "attributeMapping": []
    }
  }
]
notEquals [uri,value] - filter by level up value, where the value is not equal to the uri value
The following example is of a Reltio entity mapped to an sobject:
[
  {
    "sobject": {
      "type": "Account",
      "recordTypeId": "012G00000015NzqIAE"
    },
    "reltioObjectType": "configuration/entityTypes/HCP",
    "sfdcSource": "configuration/sources/SFDC",
    "to_salesforce": {
      "filter": "notEquals(configuration/entityTypes/HCP/attributes/FirstName, 'John')", //All entities with FirstName=Jhon won't be synced
      "attributeMapping": [],
      "relatedObjects": []
    },
    "to_reltio": {
      "attributeMapping": []
    }
  }
]
The following example is of a Reltio entity nested attribute mapped to a custom sobject:
[
  {
    "sobject": {
      "type": "Account",
      "recordTypeId": "012G00000015NzqIAE"
    },
    "reltioObjectType": "configuration/entityTypes/HCP",
    "sfdcSource": "configuration/sources/SFDC",
    "to_salesforce": {
      "attributeMapping": [],
      "relatedObjects": [
        {
          "sobject": {
            "type": "Email_vod__c",
            "recordTypeId": "012G00000015O05IAE"
          },
          "rootUri": "configuration/entityTypes/HCP/attributes/Email",
          "filter": "notEquals(configuration/entityTypes/HCP/attributes/Email/attributes/Email, 'Work')", //All entities with Email=Work wont't be synced
          "relationshipName": "Email_vod__r",
          "attributeMapping": [
            {
              "sfdcAttrName": "Name",
              "value": "configuration/entityTypes/HCP/attributes/Email/attributes/Email"
            },
            {
              "sfdcAttrName": "Type__c",
              "value": "configuration/entityTypes/HCP/attributes/Email/attributes/Type"
            }
          ]
        }
      ]
    },
    "to_reltio": {
      "attributeMapping": []
    }
  }
]

Replicating Salesforce Entities in Reltio

When you replicate the Salesforce entity in Reltio, the functions listed in Table 2: Supported functions are used.

Table 2. Supported functions
Function Description Mapping Example
equals If there is a match, then the data is synced

[uri,value] - filter by level up value, where the value is equal to the uri value

The following example is of an sobject mapped to a Reltio entity:
[
  {
    "sobject": {
      "type": "Account",
      "recordTypeId": "012G00000015NzqIAE"
    },
    "reltioObjectType": "configuration/entityTypes/HCP",
    "sfdcSource": "configuration/sources/SFDC",
    "to_salesforce": {
      "attributeMapping": []
    },
    "to_reltio": {
      "filter": "equals(FirstName, John)",
      "attributeMapping": [
        {
          "uri": "configuration/entityTypes/HCP/attributes/FirstName",
          "value": "FirstName"
        },
        {
          "uri": "configuration/entityTypes/HCP/attributes/LastName",
          "value": "LastName"
        }
      ]
    }
  }
]
The following example is of a Reltio entity mapped to an sobject with a complex filter that has two or more combinations:
[
  {
    "sobject": {
      "type": "Account",
      "recordTypeId": "012G00000015NzqIAE"
    },
    "reltioObjectType": "configuration/entityTypes/HCP",
    "sfdcSource": "configuration/sources/SFDC",
    "to_salesforce": {
      "attributeMapping": []
    },
    "to_reltio": {
      "filter": "equals(FirstName, John) OR equals(FirstName, Henry) OR equals(ForceSync, true)",//All records with FirstName John or Henry or all records with ForceSync flag are filtered
      "attributeMapping": [
        {
          "uri": "configuration/entityTypes/HCP/attributes/FirstName",
          "value": "FirstName"
        },
        {
          "uri": "configuration/entityTypes/HCP/attributes/LastName",
          "value": "LastName"
        }
      ]
    }
  }
]
The following example is of a custom sobject mapped to a Reltio entity nested attribute:
[
  {
    "sobject": {
      "type": "Account",
      "recordTypeId": "012G00000015NzqIAE"
    },
    "reltioObjectType": "configuration/entityTypes/HCP",
    "sfdcSource": "configuration/sources/SFDC",
    "to_salesforce": {
      "attributeMapping": []
    },
    "to_reltio": {
      "filter": "",
      "attributeMapping": [
        {
          "uri": "configuration/entityTypes/HCP/attributes/Email",
          "filter": "equals(Type__c, Work) AND equals(Type__c, Home)",
          "sobject": {
            "type": "Email_vod__c",
            "recordTypeId": "012G00000015O05IAE"
          },
          "value": [
            {
              "attributeMapping": [
                {
                  "uri": "configuration/entityTypes/HCP/attributes/Email/attributes/Email",
                  "value": "Name"
                },
                {
                  "uri": "configuration/entityTypes/HCP/attributes/Email/attributes/Type",
                  "value": "Type__c"
                }
              ]
            }
          ]
        }
      ]
    }
  }
]
isEmpty [uri] - filter by level up value, where the value does not exist
The following example is of an sobject mapped to a Reltio entity:
[
  {
    "sobject": {
      "type": "Account",
      "recordTypeId": "012G00000015NzqIAE"
    },
    "reltioObjectType": "configuration/entityTypes/HCP",
    "sfdcSource": "configuration/sources/SFDC",
    "to_salesforce": {
      "attributeMapping": []
    },
    "to_reltio": {
      "filter": "isEmpty(FirstName)", // All entities with FirstName won't be synced
      "attributeMapping": [
        {
          "uri": "configuration/entityTypes/HCP/attributes/FirstName",
          "value": "FirstName"
        },
        {
          "uri": "configuration/entityTypes/HCP/attributes/LastName",
          "value": "LastName"
        }
      ]
    }
  }
]
The following example is of a custom sobject mapped to a Reltio entity nested attribute:
[
  {
    "sobject": {
      "type": "Account",
      "recordTypeId": "012G00000015NzqIAE"
    },
    "reltioObjectType": "configuration/entityTypes/HCP",
    "sfdcSource": "configuration/sources/SFDC",
    "to_salesforce": {
      "attributeMapping": []
    },
    "to_reltio": {
      "filter": "",
      "attributeMapping": [
        {
          "uri": "configuration/entityTypes/HCP/attributes/Email",
          "filter": "isEmpty(Type__c)", // All entities with Type__c won't be synced
          "sobject": {
            "type": "Email_vod__c",
            "recordTypeId": "012G00000015O05IAE"
          },
          "value": [
            {
              "attributeMapping": [
                {
                  "uri": "configuration/entityTypes/HCP/attributes/Email/attributes/Email",
                  "value": "Name"
                },
                {
                  "uri": "configuration/entityTypes/HCP/attributes/Email/attributes/Type",
                  "value": "Type__c"
                }
              ]
            }
          ]
        }
      ]
    }
  }
]
isNotEmpty [uri] - filter by level up value, where the value exists
The following example is of an sobject mapped to a Reltio entity:
[
  {
    "sobject": {
      "type": "Account",
      "recordTypeId": "012G00000015NzqIAE"
    },
    "reltioObjectType": "configuration/entityTypes/HCP",
    "sfdcSource": "configuration/sources/SFDC",
    "to_salesforce": {
      "attributeMapping": []
    },
    "to_reltio": {
      "filter": "isNotEmpty(FirstName)", // All entities without FirstName won't be synced
      "attributeMapping": [
        {
          "uri": "configuration/entityTypes/HCP/attributes/FirstName",
          "value": "FirstName"
        },
        {
          "uri": "configuration/entityTypes/HCP/attributes/LastName",
          "value": "LastName"
        }
      ]
    }
  }
]
The following example is of a custom sobject mapped to a Reltio entity nested attribute:
[
  {
    "sobject": {
      "type": "Account",
      "recordTypeId": "012G00000015NzqIAE"
    },
    "reltioObjectType": "configuration/entityTypes/HCP",
    "sfdcSource": "configuration/sources/SFDC",
    "to_salesforce": {
      "attributeMapping": []
    },
    "to_reltio": {
      "filter": "",
      "attributeMapping": [
        {
          "uri": "configuration/entityTypes/HCP/attributes/Email",
          "filter": "isNotEmpty(Type__c)", // All entities without Type__c won't be synced
          "sobject": {
            "type": "Email_vod__c",
            "recordTypeId": "012G00000015O05IAE"
          },
          "value": [
            {
              "attributeMapping": [
                {
                  "uri": "configuration/entityTypes/HCP/attributes/Email/attributes/Email",
                  "value": "Name"
                },
                {
                  "uri": "configuration/entityTypes/HCP/attributes/Email/attributes/Type",
                  "value": "Type__c"
                }
              ]
            }
          ]
        }
      ]
    }
  }
]
notEquals

If there is a match, then the data is not synced.

[uri,value] - filter by level up value, where the value is not equal to the uri value.

The following example is of a Reltio entity mapped to an sobject:
[
  {
    "sobject": {
      "type": "Account",
      "recordTypeId": "012G00000015NzqIAE"
    },
    "reltioObjectType": "configuration/entityTypes/HCP",
    "sfdcSource": "configuration/sources/SFDC",
    "to_salesforce": {
      "attributeMapping": []
    },
    "to_reltio": {
      "filter": "notEquals(FirstName, John)",
      "attributeMapping": [
        {
          "uri": "configuration/entityTypes/HCP/attributes/FirstName",
          "value": "FirstName"
        },
        {
          "uri": "configuration/entityTypes/HCP/attributes/LastName",
          "value": "LastName"
        }
      ]
    }
  }
]
The following example is of a Reltio entity nested attribute mapped to a custom sobject:
[
  {
    "sobject": {
      "type": "Account",
      "recordTypeId": "012G00000015NzqIAE"
    },
    "reltioObjectType": "configuration/entityTypes/HCP",
    "sfdcSource": "configuration/sources/SFDC",
    "to_salesforce": {
      "attributeMapping": []
    },
    "to_reltio": {
      "filter": "",
      "attributeMapping": [
        {
          "uri": "configuration/entityTypes/HCP/attributes/Email",
          "filter": "notEquals(Type__c, Work) AND notEquals(Type__c, Business)",
          "sobject": {
            "type": "Email_vod__c",
            "recordTypeId": "012G00000015O05IAE"
          },
          "value": [
            {
              "attributeMapping": [
                {
                  "uri": "configuration/entityTypes/HCP/attributes/Email/attributes/Email",
                  "value": "Name"
                },
                {
                  "uri": "configuration/entityTypes/HCP/attributes/Email/attributes/Type",
                  "value": "Type__c"
                }
              ]
            }
          ]
        }
      ]
    }
  }
]