Build a library of segment lists that enable targeted marketing, accurate reporting, and proper suppression. These lists form the foundation of segment-based operations.
.envhubspot-api-client installed via uv/create-icp-tiers first)/fix-lifecycle-stages first)Before executing, collect the following information from the user:
Q1: What are your key customer segments?
Q2: What engagement criteria define "active" for your business?
List NameTypeCriteriaAll CustomersActiveLifecycle stage = CustomerAll PartnersActiveContact type = Partner (or custom property)CompetitorsStaticManually curated from known competitor domainsInternal EmployeesActiveEmail domain matches company domainSuppressed ContactsActiveMarketing status = non-marketing OR globally unsubscribed
List NameTypeCriteriaICP Tier 1ActiveICP tier property = Tier 1ICP Tier 2ActiveICP tier property = Tier 2ICP Tier 3ActiveICP tier property = Tier 3Non-ICPActiveICP tier property = Non-ICP or unknown
List NameTypeCriteria[Industry Name]ActiveIndustry = [value](Create one per target industry)
List NameTypeCriteriaHighly Engaged (90 days)ActiveEmail open or click in last 90 daysDisengaged (6+ months)ActiveNo email engagement in 180+ daysNever EngagedActiveNo email opens ever AND created 30+ days ago
Use the Lists API to create active (smart) lists:
python
from hubspot import HubSpot
api_client = HubSpot(access_token=os.getenv("HUBSPOT_API_TOKEN"))
# Example: Create "All Customers" list
api_client.crm.lists.lists_api.create(
list_create_request={
"name": "All Customers",
"objectTypeId": "0-1", # contacts
"processingType": "DYNAMIC",
"filterBranch": {
"filterBranchType": "OR",
"filters": [{
"filterType": "PROPERTY",
"property": "lifecyclestage",
"operation": {
"operationType": "ENUMERATION",
"operator": "IS_EQUAL_TO",
"value": "customer"
}
}]
}
}
)
Create each list, verify member count, and document the list ID.
For static lists (Competitors), create the list and manually add contacts or import from a CSV.
[Category] - Segment Name (e.g., [ICP] - Tier 1, [Industry] - Manufacturing).