Accelerate the Value of Data

Perform Search

This API allows you to perform searches in Reltio Customer Tenant, Data Tenant, and Salesforce.

The query parameters in the API can be provided using the Salesforce fields. These fields are then converted to the Reltio attributes within the API call using the synchronization mapping.

Salesforce supports two methods of search: For more information on these search methods, refer the Salesforce documentation by clicking the links above.

The Search Before Create (SBC) API utilizes both the SOSL and SOQL methods. If the SOSL search option is switched on, SBC will perform the search using the SOSL method first.

To enable SOSL search, use the useSOSL option in the options query parameter. The SOSL search option cannot be used under the following conditions:
  • Search value contains a single character
  • Search is performed by non-text fields
  • Search is performed by the child object (for example, by an Address field for Veeva organization)
  • Search query returns the child object fields (for example, select query parameter contains an Address field for Veeva organization)
Note: If conditions are not completed, then a regular SOQL search is applied.

Example:

Table 1. Parameters
Search Criteria SOSL Complaint Reason
Account by name containing Joe true
Account by revenue equals to $10000 false Search only by numeric field, so that SOQL will be used
Account by name containing Some Company and revenue equals to $100000 true

Request

GET {SbcApiUrl}/{tenant}/{profile}/search
Table 2. Parameters
Type Name Required Description
Headers Authorization Yes
Path SbcApiUrl Yes SBC service URL
tenant Yes Tenant ID
profile Yes Profile name
Query sObject Yes Type of Salesforce object
recordTypeId no Record Type Id of Salesforce object
select no List of fields in results. Example: select=FirstName,LastName,Address_vod__c.City
options no Search options:
  • searchByOv - search only in ov=true values
  • useContains - compare values as contains (equals (startsWith?) is used by default)
  • useFuzzy - search with fuzzy match operator
  • useOr - several conditions will be combined with the ‘OR’ statement
  • useSOSL - search by using search query (SOSL) instead of SOQL as priority search method in Salesforce
filter yes SBC search filter that contains the field:data map. Example: FirstName:John,LastName:Doe
searchin no Parameter used to override default options to search only in specific sources
max no Limits number of records in the search results. The limit is is distributed between all search sources in priority:
  1. Salesforce
  2. Customer tenant
  3. Data tenant
sort no Field to sort search results. Example: Name
order no Order of sorting. Applicable only in combination with the sort parameter. Possible values:
  • asc - results appear in the ascending order.
  • desc - results appear in the descending order.
The default sorting order is asc.

Request Example

https://idev-01-sfdc-sbc-api.reltio.com/account360/profileName/search?sObject=Account&recordTypeId=123600000CiouYYu&filter=Name:abc&searchIn=ct,dt&options=searchByOv,useContains&max=10

https://idev-01-sfdc-sbc-api.reltio.com/account360/profileName/search?sObject=Account&recordTypeId=123600000CiouYYu&filter=Name:Alex,Address_vod__c.123600000CiouYYu.City:San&searchIn=ct,dt&options=searchByOv,useContains&max=10

Response Example

{
 "sf": [],
 "dt": [],
 "ct": [
   {
     "attributes": {
       "type": "Account"      
     },
     "FirstName": "HCPTest-73799013",
     "LastName": "LastName",
     "Salutation": "Mr.",
     "Website": null,
     "Description": null,
     "Active__c": null,
     "PersonHomePhone": null,
     "PersonMobilePhone": null,
     "relatedObjects": [
       {
         "attributes": {
           "type": "Address_vod__c"
         },
         "Name": "AddressLine1-73799013",
         "Address_line_2_vod__c": "AddressLine2Updated",
         "City_vod__c": "City-73799013",
         "Zip_vod__c": "11111",
         "State_vod__c": "AK",
         "Country_vod__c": "UNITED STATES",
         "Primary_vod__c": true,
         "AdditionalInfo_vod__c": "AdditionalInfoUpdated",
         "Account_vod__c": "001f400000O4AaJAAV"
       }
     ]
   }
 ]
}

Search in Address Objects

There are several scenarios of Salesforce metadata configuration for related Address objects and search scenarios as follows:
  1. Address types are not separated. The sync mapping and sbc inputMappings have single Address_vod__c related object mapping, and mapping for different address types is the same.
  2. Address types are separated by RecordType. The sync mapping and sbc inputMappings have several Address_vod__c related object mappings differing by recordTypeId sObject attribute, and mapping for different address types may be unique.
  3. Address types are separated by some field value, for example addressType. The sync mapping and sbc inputMappings have single Address_vod__c related object, and mapping for different address types is the same.
  4. Address types are separated by boolean attribute, for example, shipping_vod__c and mailing_vod__c boolean fields and each address type has an appropriate selected field. The sync mapping and sbc inputMappings have single Address_vod__c related object, and mapping for the different address types is the same.
Table 3. Parameters
SF Configuration Search in all Addresses Search in a particular Address
Supported Query Comments Supported Query Comments
No Separation Y Address_vod_c.fieldName:value N
RecordType Y Address_vod_c.RecordTypeID_X.fieldName:value, Address_vod_c.RecordTypeID_Y.fieldName:value "options"=useOr In this case, provide value for each address type and provide the options request parameter with the useOr option in the search criteria. Else, the search will search with a condition to search for some value in all address types. Address_vod_c.RecordTypeID_X.fieldName:value
Address type field Y Address_vod_c.fieldName:value Y Address_vod_c.fieldName:value,Address_vod_c.Type:typeValue User must specify a value for the address type field to ensure that the search result is based on the user provided value. Else, the search is performed by all addresses.
Note: The address type field must be mapped to the appropriate Reltio attribute.
Several boolean fields Y Address_vod_c.fieldName:value Y Address_vod_c.fieldName:value,Address_vod_c.Type_field:true