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.
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.
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)
Example:
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
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:
|
|
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:
|
|
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 . |
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
- 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. - Address types are separated by
RecordType
. The sync mapping and sbc inputMappings have severalAddress_vod__c
related object mappings differing byrecordTypeId
sObject attribute, and mapping for different address types may be unique. - Address types are separated by some field value, for example
addressType
. The sync mapping and sbc inputMappings have singleAddress_vod__c
related object, and mapping for different address types is the same. - Address types are separated by boolean attribute, for example,
shipping_vod__c
andmailing_vod__c
boolean fields and each address type has an appropriate selected field. The sync mapping and sbc inputMappings have singleAddress_vod__c
related object, and mapping for the different address types is the same.
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 |