Does the Salesforce Data filtering support an and/or functionality and can we use more then one attribute as filters?

Question

Does the Salesforce Data filtering support an and/or functionality and can we use more then one attribute as filters?

Answer

Currently, Salesforce Data filtering supports an and/or functionality, and we can use more than one attribute of the entity as filters.

Data filtering support the following functions[equals, notEquals], and [OR, AND] logic operations between those functions: 

To Salesforce direction:

Function 
Description
Mapping example

equals

[uri,value] - filter by level up value, where the value have to be equals to uri value

Entity mapped to 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=Jhon will be synced
      "attributeMapping": [],
      "relatedObjects": []
    },
    "to_reltio": {
      "attributeMapping": []
    }
  }
]

Entity mapped to sobject with "complex filter" with 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=Jhohnny and LastName=Mnemonic will be synced
      "attributeMapping": [],
      "relatedObjects": []
    },
    "to_reltio": {
      "attributeMapping": []
    }
  }
]

Entity nested attribute mapped to 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": []
    }
  }
]

notEquals

[uri,value] - filter by level up value, where the value have not to be equals to uri value

Entity mapped to 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": []
    }
  }
]

Entity nested attribute mapped to 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": []
    }
  }
]
isEmpty [uri] - filter by level up value, where the value should not exist

Entity mapped to sobject:

[
  {
    "sobject": {
      "type": "Account",
      "recordTypeId": "012G00000015NzqIAE"
    },
    "reltioObjectType": "configuration/entityTypes/HCP",
    "sfdcSource": "configuration/sources/SFDC",
    "to_salesforce": {
      "filter": "isEmpty(configuration/entityTypes/HCP/attributes/FirstName)", // All entities with FirstName won't be synced
      "attributeMapping": [],
      "relatedObjects": []
    },
    "to_reltio": {
      "attributeMapping": []
    }
  }
]

Entity nested attribute mapped to 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": "isEmpty(configuration/entityTypes/HCP/attributes/Email/attributes/Type)", //All entities with Type 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": []
    }
  }
]
isNotEmpty [uri] - filter by level up value, where the value should exist

Entity mapped to 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": []
    }
  }
]

Entity nested attribute mapped to 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 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": []
    }
  }
]

 

To Reltio direction:

Function 
Description
Mapping example
Function 
Description
Mapping example

equals

If match, data will be synced

[uri,value] - filter by level up value, where the value have to be equals to uri value

Sobject mapped to 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"
        }
      ]
    }
  }
]

Entity mapped to sobject with "complex filter" with 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
      "attributeMapping": [
        {
          "uri": "configuration/entityTypes/HCP/attributes/FirstName",
          "value": "FirstName"
        },
        {
          "uri": "configuration/entityTypes/HCP/attributes/LastName",
          "value": "LastName"
        }
      ]
    }
  }
]

Custom sobject mapped to 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"
                }
              ]
            }
          ]
        }
      ]
    }
  }
]

notEquals

If match, data will not be synced

[uri,value] - filter by level up value, where the value have not to be equals to uri value

Entity mapped to 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"
        }
      ]
    }
  }
]

Entity nested attribute mapped to 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"
                }
              ]
            }
          ]
        }
      ]
    }
  }
]
isEmpty [uri] - filter by level up value, where the value should not exist

Sobject mapped to 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"
        }
      ]
    }
  }
]

Custom sobject mapped to 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 should exist

Sobject mapped to 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"
        }
      ]
    }
  }
]

Custom sobject mapped to 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"
                }
              ]
            }
          ]
        }
      ]
    }
  }
]

 

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.