How to use HubSpot advanced filters?
Starting from the end of September 2022, in addition to the date filters, Coupler.io allows you to filter HubSpot data by almost any property.
Content
- Advanced filter structure
- Conditions allowed per field type
- Advanced filter setup guide (example)
- Filters example per data entity
- Combine a few filters
- Possible errors
Advanced filter structure
- property name (e.g. 'dealstage')
- condition (one of the available options: e.g. Equal)
- value (e.g. 'closedwon')
The property name can be taken from HubSpot UI in the same way as you get a custom field internal name: How to find HubSpot columns names.
The condition can be selected from the following pre-defined drop-down list:
- Equal - equal to the specified value
- Not equal - not equal to the specified value
- Greater than - greater than the specified value
- Greater than or equal to - greater than or equal to the specified value
- Less than - less than the specified value
- Less than or equal to - less than or equal to the specified value
- Contains - contains the specified value. You can use wildcards (*) to complete a partial search. For example, use the value *@hubspot.com to retrieve all emailswith a HubSpot email address.
- Doesn’t contain - doesn't contain the specified value.
- Has a value - has a value for the specified property.
- Doesn’t have a value - doesn't have a value for the specified property.
The value should be defined by the user for all conditions except "Has a value" and "Doesn’t have a value": it can be the name of the deal stage, the status of the lead, the amount value for the deal amount, etc.
Conditions allowed per field type
Each field in HubSpot has its type: it can be single-line text, radio button select, multiple select, etc.
Depending on the field type, different conditions can be used:
Type | Allowed Conditions | Property example |
Single-line text | Equal / Not equal Contains / Doesn’t contain Has a value / Doesn’t have a value |
Deal name, Company name |
Multiple-line text | Equal / Not equal Contains / Doesn’t contain Has a value / Doesn’t have a value |
Deal description, Company description |
Single on/off checkbox | Equal / Not equal Has a value / Doesn’t have a value |
Company "Is Public" property |
Multiple checkbox | Equal / Not equal Has a value / Doesn’t have a value |
Company "Web technologies" property |
Dropdown select | Equal / Not equal Has a value / Doesn’t have a value |
Deal pipeline, Deal priority |
Radio select | Equal / Not equal Has a value / Doesn’t have a value |
Deal stage, Lead status |
Date picker | Equal / Not equal Greater than / Less than Greater than or equal to / Less than or equal to Has a value / Doesn’t have a value |
Last Activity Date |
Number | Equal / Not equal Greater than / Less than Greater than or equal to / Less than or equal to Has a value / Doesn’t have a value |
Amount, Revenue |
Calculation | Equal / Not equal Greater than / Less than Greater than or equal to / Less than or equal to Has a value / Doesn’t have a value |
Exchange rate |
Score | Equal / Not equal Greater than / Less than Greater than or equal to / Less than or equal to Has a value / Doesn’t have a value |
Contact score |
Advanced filter setup guide (example)
User case: I want to fetch deals on the "Deal postponed" stage (it is a custom stage added on the HubSpot side) of the "Sales Pipeline" default pipeline.
Action #1: Identify the name of the deal stage property in HubSpot:
- Go to HubSpot -> Settings (use the gearwheel icon in the top right corner).
- Navigate to 'Data management' -> 'Properties'.
- Select 'Deal properties' in the Select an object drop-down.
- Use the search field to type the name of the field.
- Click 'Deal stage', then click the '</>' icon.
- The internal name is the name of the property in HubSpot. Copy it.
Action #2: Select the condition from the predefined list.
'Deal stage' has a 'Radio select' field type in HubSpot, i.e. it has one of the defined values. As we want to only export deals with the 'Deal postponed' stage, we can only use 'EQ' as a condition rather than 'CONTAINS_TOKEN'.
Action #3: Define an internal name for the "Deal postponed" stage.
- Go to HubSpot -> Settings (using the gearwheel icon in the top right corner).
- Navigate to 'Data management' -> 'Object' -> 'Deals'.
- Navigate to the 'Pipelines' tab.
- Select the needed pipeline.
- Click the '</>' icon for the needed deal stage.
- Copy the Internal id.
Action #4. Build filter in Coupler.io wizard:
Once you define the property, condition, and value, you can insert them into the Advanced filters field of your HubSpot importer. In our example, it looks as follows:
- Property: dealstage
- Condition: Equal
- Value: 16301206
Filters example per data entity
Deals
Fetch Deals with a specific pipeline
- Property: pipeline
- Condition: Equal
- Value: <<internal ID>>
- "default" for HubSpot default "Sales" Pipeline:
- numeric ID for the created custom pipeline:
Coupler.io settings:
Fetch Deals with a specific status (stage)
- Property: dealstage
- Condition: Equal
- Value:
- default stage names (appointmentscheduled, qualifiedtobuy, presentationscheduled, decisionmakerboughtin, contractsent, closedwon, closedlost)
- custom deal stage - should be the internal id of created stage:
Coupler.io settings:
Fetch Deals with a Record ID greater than XXX
- Property: hs_object_id (internal name of "Record Id" field)
- Condition: Greater than
- Value: id of the deal you want to start with (can be copied from Deal view page URL):
Coupler.io settings:
Contacts
Fetch Contacts with a specific original source
- Property: hs_analytics_source (internal name of the "Original source" field)
- Condition: Equal
- Value: internal value for one of the options provided by HubSpot: ORGANIC_SEARCH, PAID_SEARCH, EMAIL_MARKETING, SOCIAL_MEDIA, REFERRALS, OTHER_CAMPAIGNS, DIRECT_TRAFFIC, OFFLINE, PAID_SOCIAL
Coupler.io settings:
Company
Fetch Companies with a city that has "New" in the name
- Property: city (internal name of "City" field)
- Condition: Contains
- Value: new
Coupler.io settings:
Note: Value for this condition is not case sensitive and counts as a separate word, so if "new" is a filter value => cities "New York", "new mexico", "NEW DELHI" will be found, BUT "Newfoundland" will be skipped.
Product
Fetch Product with assigned owner date >= some date
- Property: hubspot_owner_assigneddate (internal name of "Owner Assigned Date" field)
- Condition: Greater than or equal to
- Value: date in timestamp in milliseconds format -> i.e. 2022-01-01 -> 1640995200000You can use any online tool to transform date into timestamp - i.e. https://www.epochconverter.com/
Coupler.io settings:
Combine few filters
It is possible to add up to 2 advanced filters. Their conditions will be applied using AND logical operator:
This filter setup example returns deals of the "Closed Won" stage from the default "Sales" pipeline.
It's also possible to combine the date filter with the advanced filter if necessary. In this case, you can only use 1 date filter and 1 advanced filter:
This filter setup example returns deals of the "Closed Won" stage created from the beginning of this month.
Possible errors
Error #1. If you use more than 2 filters (any: date or advanced), you receive an execution error:
To fix this issue, you need to remove extra filters to have only 2 filters (both date and advanced).
Error #2. In case of an error after the importer runs with filters setup, it can be that the used property/condition/value is wrong or the filter by this property is not available:
To fix this issue, you need to review if you set up the filter properly. Please check the values used for:
- property name (it should be HubSpot internal key - see how to get it).
- value
- it should be the value of proper type - e.g. timestamp in ms for date properties or number in case you use Greater/Less operators
- it should value from the predefined list - in case you use a filter for pipeline, stage, etc.
and edit them to have a valid filter.
If you cannot set up the needed filter or are not sure if HubSpot allows filtering by the needed property - write to our support team and we will help you!