Search Filters
From Social ID Developers
(Difference between revisions)
Renato.neves (Talk | contribs) (→Fields) |
|||
(10 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | + | The standard used in [[POST database/people/search|contact search]] is "SQL-like": the syntax is very similar with what we use to query relational databases. Some examples: | |
{| | {| | ||
Line 12: | Line 12: | ||
|} | |} | ||
− | == Operators == | + | == Logical Operators == |
{| | {| | ||
− | ! align="left" width="200px" | | + | ! align="left" width="200px" | Code |
− | ! align="left" width="200px" | | + | ! align="left" width="200px" | Operation |
− | ! align="left" | | + | ! align="left" | Example |
+ | |+ | ||
+ | ! align="left" width="200px" | and | ||
+ | | width="200px" | Conjunction | ||
+ | | profile.name.formatted = 'Guilherme Silva' and profile.gender = 'male' | ||
+ | |+ | ||
+ | ! align="left" width="200px" | or | ||
+ | | width="200px" | Disjunction | ||
+ | | profile.name.formatted = 'Guilherme Silva' or profile.gender = 'male' | ||
+ | |+ | ||
+ | ! align="left" width="200px" | not | ||
+ | | width="200px" | Negation | ||
+ | | not profile.gender = 'male' | ||
+ | |} | ||
+ | |||
+ | == Relational Operators == | ||
+ | |||
+ | {| | ||
+ | ! align="left" width="200px" | Code | ||
+ | ! align="left" width="200px" | Operation | ||
+ | ! align="left" | Example | ||
|+ | |+ | ||
! align="left" width="200px" | = | ! align="left" width="200px" | = | ||
− | | width="200px" | | + | | width="200px" | Equality |
| profile.name.formatted = 'Guilherme Silva' | | profile.name.formatted = 'Guilherme Silva' | ||
|+ | |+ | ||
! align="left" width="200px" | != | ! align="left" width="200px" | != | ||
− | | width="200px" | | + | | width="200px" | Difference |
− | | profile.name.formatted = 'Guilherme Silva' | + | | profile.name.formatted != 'Guilherme Silva' |
|+ | |+ | ||
! align="left" width="200px" | < | ! align="left" width="200px" | < | ||
− | | width="200px" | | + | | width="200px" | Lesser than |
| profile.id < 100 | | profile.id < 100 | ||
|+ | |+ | ||
! align="left" width="200px" | > | ! align="left" width="200px" | > | ||
− | | width="200px" | | + | | width="200px" | Greater than |
| profile.id > 100 | | profile.id > 100 | ||
|+ | |+ | ||
! align="left" width="200px" | <= | ! align="left" width="200px" | <= | ||
− | | width="200px" | | + | | width="200px" | Lesser than or equals |
| profile.id <= 100 | | profile.id <= 100 | ||
|+ | |+ | ||
! align="left" width="200px" | >= | ! align="left" width="200px" | >= | ||
− | | width="200px" | | + | | width="200px" | Greater than or equals |
| profile.id >= 100 | | profile.id >= 100 | ||
|+ | |+ | ||
! align="left" width="200px" | like | ! align="left" width="200px" | like | ||
− | | width="200px" | | + | | width="200px" | "like" operator |
| profile.name.given_name like 'Guilher%' | | profile.name.given_name like 'Guilher%' | ||
|+ | |+ | ||
! align="left" width="200px" | between | ! align="left" width="200px" | between | ||
− | | width="200px" | | + | | width="200px" | Between :A and :B |
| profile.id between 1 and 3 | | profile.id between 1 and 3 | ||
|+ | |+ | ||
! align="left" width="200px" | in | ! align="left" width="200px" | in | ||
− | | width="200px" | | + | | width="200px" | "in" operator |
| profile.id IN (100, 99, 104) | | profile.id IN (100, 99, 104) | ||
|+ | |+ | ||
! align="left" width="200px" | is null | ! align="left" width="200px" | is null | ||
− | | width="200px" | | + | | width="200px" | Attribute is null |
| profile.religion is null | | profile.religion is null | ||
|+ | |+ | ||
! align="left" width="200px" | is not null | ! align="left" width="200px" | is not null | ||
− | | width="200px" | | + | | width="200px" | Attribute is not null |
| profile.religion is not null | | profile.religion is not null | ||
|} | |} | ||
− | == | + | == Namespaces == |
− | + | The fields can be specified in the "namespace.field_name" standard. We have the following namespaces and fields: | |
− | + | ||
− | + | ||
=== person === | === person === | ||
{| | {| | ||
− | ! align="left" width="200px" | | + | ! align="left" width="200px" | Field |
− | ! align="left" width="400px" | | + | ! align="left" width="400px" | Description |
|+ | |+ | ||
| person.id | | person.id | ||
− | | | + | | Identification number |
|+ | |+ | ||
| person.email | | person.email | ||
− | | Email | + | | Email address |
+ | |+ | ||
+ | | person.user_email | ||
+ | | User email address | ||
|+ | |+ | ||
| person.created | | person.created | ||
− | | | + | | Creation date/time |
|+ | |+ | ||
| person.updated | | person.updated | ||
− | | | + | | Date/time of the last update |
|} | |} | ||
Line 92: | Line 113: | ||
{| | {| | ||
− | ! align="left" width="200px" | | + | ! align="left" width="200px" | Field |
− | ! align="left" width="400px" | | + | ! align="left" width="400px" | Description |
|+ | |+ | ||
| profile.display_name | | profile.display_name | ||
− | | | + | | Display name |
|+ | |+ | ||
| profile.name.formatted | | profile.name.formatted | ||
− | | | + | | Full name |
|+ | |+ | ||
| profile.name.family_name | | profile.name.family_name | ||
− | | | + | | Last name |
|+ | |+ | ||
| profile.name.middle_name | | profile.name.middle_name | ||
− | | | + | | Middle name |
|+ | |+ | ||
| profile.name.given_name | | profile.name.given_name | ||
− | | | + | | First name |
|+ | |+ | ||
| profile.name.honorific_prefix | | profile.name.honorific_prefix | ||
− | | | + | | Honorific (prefix) |
|+ | |+ | ||
| profile.name.honorific_suffix | | profile.name.honorific_suffix | ||
− | | | + | | Honorific (suffix) |
|+ | |+ | ||
| profile.nickname | | profile.nickname | ||
− | | | + | | Nickname |
|+ | |+ | ||
| profile.updated | | profile.updated | ||
− | | | + | | Date/time of the last update |
|+ | |+ | ||
| profile.birthday | | profile.birthday | ||
− | | | + | | Birthday |
|+ | |+ | ||
| profile.gender | | profile.gender | ||
− | | | + | | Gender |
|+ | |+ | ||
| profile.preferred_username | | profile.preferred_username | ||
− | | | + | | Preferred username |
|+ | |+ | ||
| profile.utf_offset | | profile.utf_offset | ||
− | | | + | | UTC offset |
|+ | |+ | ||
| profile.about_me | | profile.about_me | ||
− | | | + | | About me |
|+ | |+ | ||
| profile.current_location | | profile.current_location | ||
− | | | + | | Current location |
|+ | |+ | ||
| profile.religion | | profile.religion | ||
− | | | + | | Religion |
|+ | |+ | ||
| profile.status | | profile.status | ||
− | | | + | | Last Twitter status, if available |
|+ | |+ | ||
| profile.emails.value | | profile.emails.value | ||
Line 307: | Line 328: | ||
=== custom === | === custom === | ||
+ | |||
+ | The custom fields that can be used for search depend on the custom fields created on Webforms. Each Account has its own collection of custom fields. To search on these fields you can simply create rules using "custom.field_name". | ||
+ | |||
+ | === login_app === | ||
+ | |||
+ | {| | ||
+ | ! align="left" width="200px" | Field | ||
+ | ! align="left" width="400px" | Description | ||
+ | |+ | ||
+ | | login_app.id | ||
+ | | Login app identification number | ||
+ | |} | ||
+ | |||
+ | === campaign === | ||
+ | |||
+ | {| | ||
+ | ! align="left" width="200px" | Field | ||
+ | ! align="left" width="400px" | Description | ||
+ | |+ | ||
+ | | campaign.id | ||
+ | | Campaign identification number | ||
+ | |} |
Latest revision as of 16:36, 30 December 2021
The standard used in contact search is "SQL-like": the syntax is very similar with what we use to query relational databases. Some examples:
SQL | People Search API | select * from profile where profile.gender = 'male' | profile.gender = 'male' | select * from profile where profile.gender = 'male' or profile.religion = 'Atheist' | profile.gender = 'male' or profile.religion = 'Atheist' |
---|
Contents |
Logical Operators
Code | Operation | Example | and | Conjunction | profile.name.formatted = 'Guilherme Silva' and profile.gender = 'male' | or | Disjunction | profile.name.formatted = 'Guilherme Silva' or profile.gender = 'male' | not | Negation | not profile.gender = 'male' |
---|
Relational Operators
Code | Operation | Example | = | Equality | profile.name.formatted = 'Guilherme Silva' | != | Difference | profile.name.formatted != 'Guilherme Silva' | < | Lesser than | profile.id < 100 | > | Greater than | profile.id > 100 | <= | Lesser than or equals | profile.id <= 100 | >= | Greater than or equals | profile.id >= 100 | like | "like" operator | profile.name.given_name like 'Guilher%' | between | Between :A and :B | profile.id between 1 and 3 | in | "in" operator | profile.id IN (100, 99, 104) | is null | Attribute is null | profile.religion is null | is not null | Attribute is not null | profile.religion is not null |
---|
Namespaces
The fields can be specified in the "namespace.field_name" standard. We have the following namespaces and fields:
person
Field | Description | person.id | Identification number | person.email | Email address | person.user_email | User email address | person.created | Creation date/time | person.updated | Date/time of the last update |
---|
profile
Field | Description | profile.display_name | Display name | profile.name.formatted | Full name | profile.name.family_name | Last name | profile.name.middle_name | Middle name | profile.name.given_name | First name | profile.name.honorific_prefix | Honorific (prefix) | profile.name.honorific_suffix | Honorific (suffix) | profile.nickname | Nickname | profile.updated | Date/time of the last update | profile.birthday | Birthday | profile.gender | Gender | profile.preferred_username | Preferred username | profile.utf_offset | UTC offset | profile.about_me | About me | profile.current_location | Current location | profile.religion | Religion | profile.status | Last Twitter status, if available | profile.emails.value | profile.emails.type | profile.emails.primary | profile.urls.value | profile.urls.type | profile.urls.primary | profile.phone_numbers.value | profile.phone_numbers.type | profile.ims.value | profile.ims.type | profile.languages_spoken.name | profile.languages_spoken.level | profile.addresses.formatted | profile.addresses.street_address | profile.addresses.locality | profile.addresses.region | profile.addresses.postal_code | profile.addresses.country | profile.organizations.name | profile.organizations.department | profile.organizations.title | profile.organizations.type | profile.organizations.start_date | profile.organizations.end_date | profile.organizations.location | profile.organizations.description | profile.organizations.primary | profile.educations.name | profile.educations.type | profile.educations.start_date | profile.educations.end_date | profile.educations.description | profile.educations.degree | profile.interests.name | profile.interests.category | profile.interests.link | profile.likes.name | profile.likes.category | profile.likes.link | profile.political_views | profile.picture_url | profile.profile_url | profile.locale | profile.verified_account | profile.verified_email | profile.hometown | profile.interested_in_meeting | profile.quotes | profile.significant_other | profile.industry | profile.professional_headline | profile.specialties | profile.honors |
---|
custom
The custom fields that can be used for search depend on the custom fields created on Webforms. Each Account has its own collection of custom fields. To search on these fields you can simply create rules using "custom.field_name".
login_app
Field | Description | login_app.id | Login app identification number |
---|
campaign
Field | Description | campaign.id | Campaign identification number |
---|