salesprompter-cli 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,131 @@
1
+ function marketCountrySql(market) {
2
+ if (market === "dach") {
3
+ return '"DE", "AT", "CH"';
4
+ }
5
+ if (market === "europe") {
6
+ return '"DE", "AT", "CH", "NL", "GB", "FR", "SE", "DK"';
7
+ }
8
+ return '"DE", "AT", "CH", "NL", "GB", "FR", "SE", "DK", "US"';
9
+ }
10
+ function marketQueryTerms(market) {
11
+ if (market === "dach") {
12
+ return ["germany", "austria", "switzerland", "deutschland", "schweiz", "österreich"];
13
+ }
14
+ if (market === "europe") {
15
+ return ["germany", "austria", "switzerland", "netherlands", "united kingdom", "france", "sweden", "denmark"];
16
+ }
17
+ return [];
18
+ }
19
+ function encodedLikeClause(queryTerms) {
20
+ if (queryTerms.length === 0) {
21
+ return "TRUE";
22
+ }
23
+ const clauses = queryTerms.map((term) => `LOWER(CAST(query AS STRING)) LIKE "%${term.replaceAll('"', '%%')}%"`);
24
+ return `(${clauses.join(" OR ")})`;
25
+ }
26
+ export function buildLeadlistsFunnelQueries(vendor, market) {
27
+ if (vendor !== "deel") {
28
+ throw new Error(`Unsupported funnel vendor: ${vendor}`);
29
+ }
30
+ const countries = marketCountrySql(market);
31
+ const queryTerms = marketQueryTerms(market);
32
+ const marketLikeClause = encodedLikeClause(queryTerms);
33
+ return {
34
+ queryTerms,
35
+ stages: [
36
+ {
37
+ key: "leadlist_intent_hr_sales_people_all",
38
+ description: "All Sales Navigator people lead-list definitions with HR function filter.",
39
+ sql: `SELECT COUNT(*) AS row_count, COUNT(DISTINCT leadListId) AS distinct_leadlists, COUNT(DISTINCT CAST(query AS STRING)) AS distinct_queries
40
+ FROM \`icpidentifier.SalesPrompter.leadLists_raw\`
41
+ WHERE query IS NOT NULL
42
+ AND LOWER(CAST(query AS STRING)) LIKE "%/sales/search/people%"
43
+ AND LOWER(CAST(query AS STRING)) LIKE "%type%3afunction%2cvalues%3alist((id%3a12%"`
44
+ },
45
+ {
46
+ key: "leadlist_intent_hr_sales_people_market_hints",
47
+ description: "HR Sales Navigator people lead-list definitions whose query text references the selected market.",
48
+ sql: `SELECT COUNT(*) AS row_count, COUNT(DISTINCT leadListId) AS distinct_leadlists, COUNT(DISTINCT CAST(query AS STRING)) AS distinct_queries
49
+ FROM \`icpidentifier.SalesPrompter.leadLists_raw\`
50
+ WHERE query IS NOT NULL
51
+ AND LOWER(CAST(query AS STRING)) LIKE "%/sales/search/people%"
52
+ AND LOWER(CAST(query AS STRING)) LIKE "%type%3afunction%2cvalues%3alist((id%3a12%"
53
+ AND ${marketLikeClause}`
54
+ },
55
+ {
56
+ key: "people_export_raw",
57
+ description: "Raw people export coverage before downstream enrichment.",
58
+ sql: `SELECT COUNT(*) AS row_count, COUNT(DISTINCT contactId) AS distinct_contacts, COUNTIF(company IS NOT NULL) AS with_company_name, COUNTIF(companyUrl IS NOT NULL) AS with_company_url, COUNTIF(firstName IS NOT NULL) AS with_first_name, COUNTIF(lastName IS NOT NULL) AS with_last_name
59
+ FROM \`icpidentifier.SalesPrompter.linkedinSearchExport_people_unique\``
60
+ },
61
+ {
62
+ key: "people_export_company_join_market",
63
+ description: "People exports whose company URL can be resolved to a LinkedIn company record in the selected market.",
64
+ sql: `WITH people AS (
65
+ SELECT companyUrl, firstName, lastName, REGEXP_EXTRACT(companyUrl, "company/([0-9]+)") AS companyIdFromUrl
66
+ FROM \`icpidentifier.SalesPrompter.linkedinSearchExport_people_unique\`
67
+ WHERE companyUrl IS NOT NULL
68
+ ), companies AS (
69
+ SELECT CAST(id AS STRING) AS companyId, handle, name, domain, countryCode
70
+ FROM \`icpidentifier.SalesPrompter.linkedin_companies\`
71
+ )
72
+ SELECT
73
+ COUNT(*) AS people_with_company_url,
74
+ COUNTIF(companyIdFromUrl IS NOT NULL) AS people_with_extractable_company_id,
75
+ COUNTIF(c.companyId IS NOT NULL) AS people_joined_to_company,
76
+ COUNTIF(c.countryCode IN (${countries})) AS people_in_market_company,
77
+ COUNTIF(c.countryCode IN (${countries}) AND c.domain IS NOT NULL) AS people_in_market_company_with_domain,
78
+ COUNTIF(c.countryCode IN (${countries}) AND p.firstName IS NOT NULL) AS people_in_market_with_first_name,
79
+ COUNTIF(c.countryCode IN (${countries}) AND p.lastName IS NOT NULL) AS people_in_market_with_last_name
80
+ FROM people p
81
+ LEFT JOIN companies c ON p.companyIdFromUrl = c.companyId`
82
+ },
83
+ {
84
+ key: "company_search_hr_department_market",
85
+ description: "Company search rows with HR department-headcount filter and company/domain coverage in the selected market.",
86
+ sql: `WITH hr_company_search AS (
87
+ SELECT companyId, leadListId, companyUrl, regularCompanyUrl, companyName
88
+ FROM \`icpidentifier.SalesPrompter.salesNavigatorSearchExport_companies_unique\`
89
+ WHERE query IS NOT NULL
90
+ AND LOWER(CAST(query AS STRING)) LIKE "%selectedsubfilter%3a12%"
91
+ ), enriched AS (
92
+ SELECT companyId, leadListId, handle, name, domain, countryCode, companySize, hunter_emailCount, domainBlacklisted, company_emailDomainNotFound
93
+ FROM \`icpidentifier.SalesPrompter.salesNavigatorSearchExport_companies_unique_enriched\`
94
+ )
95
+ SELECT
96
+ COUNT(*) AS company_rows,
97
+ COUNT(DISTINCT CONCAT(CAST(h.companyId AS STRING),"|",CAST(h.leadListId AS STRING))) AS distinct_company_search_rows,
98
+ COUNTIF(h.companyUrl IS NOT NULL OR h.regularCompanyUrl IS NOT NULL) AS with_linkedin_company_profile,
99
+ COUNTIF(e.handle IS NOT NULL) AS with_handle,
100
+ COUNTIF(e.countryCode IN (${countries})) AS in_market,
101
+ COUNTIF(e.countryCode IN (${countries}) AND e.domain IS NOT NULL) AS with_domain,
102
+ COUNTIF(e.countryCode IN (${countries}) AND e.domain IS NOT NULL AND COALESCE(e.domainBlacklisted, FALSE) = FALSE) AS with_usable_domain,
103
+ COUNTIF(e.countryCode IN (${countries}) AND COALESCE(e.company_emailDomainNotFound, FALSE) = TRUE) AS domain_not_found
104
+ FROM hr_company_search h
105
+ LEFT JOIN enriched e
106
+ ON CAST(h.companyId AS STRING) = CAST(e.companyId AS STRING)
107
+ AND CAST(h.leadListId AS STRING) = CAST(e.leadListId AS STRING)`
108
+ },
109
+ {
110
+ key: "downstream_contact_snapshot_market_hr_function",
111
+ description: "Downstream HR contact snapshot with cleaned names and email fields in the selected market.",
112
+ sql: `SELECT
113
+ COUNT(*) AS row_count,
114
+ COUNTIF(domain IS NOT NULL) AS with_domain,
115
+ COUNTIF(firstName_cleaned IS NOT NULL) AS with_first_name_cleaned,
116
+ COUNTIF(lastName_cleaned IS NOT NULL) AS with_last_name_cleaned,
117
+ COUNTIF(email IS NOT NULL) AS with_email,
118
+ COUNTIF(email IS NOT NULL AND COALESCE(email_invalid, FALSE) = FALSE) AS with_valid_email
119
+ FROM \`icpidentifier.SalesGPT.leadPool_new\`
120
+ WHERE CAST(functionId AS STRING) = "12"
121
+ AND UPPER(CAST(company_countryCode AS STRING)) IN (${countries})`
122
+ }
123
+ ],
124
+ notes: [
125
+ "leadPool_new is downstream and filtered; it should not be used as the market-size source of truth.",
126
+ "linkedinSearchExport_people_unique can be joined to linkedin_companies through companyUrl -> company id extraction.",
127
+ "linkedinSearchExport_people_unique does not currently join directly to cleaned-name or email tables on contactId.",
128
+ "The cleaned-name and email stage is therefore reported as a downstream snapshot, not as a strict continuation of the raw people-export funnel."
129
+ ]
130
+ };
131
+ }
package/package.json CHANGED
@@ -1,11 +1,15 @@
1
1
  {
2
2
  "name": "salesprompter-cli",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "CLI for defining ICPs, generating leads, enriching them, scoring them, and syncing to GTM tools.",
5
5
  "type": "module",
6
6
  "bin": {
7
- "salesprompter": "./dist/cli.js"
7
+ "salesprompter": "dist/cli.js"
8
8
  },
9
+ "files": [
10
+ "dist",
11
+ "README.md"
12
+ ],
9
13
  "scripts": {
10
14
  "build": "tsc -p tsconfig.json",
11
15
  "check": "tsc --noEmit -p tsconfig.json",
@@ -1,19 +0,0 @@
1
- # THIS IS AUTOGENERATED. DO NOT EDIT MANUALLY
2
- version = 1
3
- name = "salesprompter-cli"
4
-
5
- [setup]
6
- script = ""
7
-
8
- [[actions]]
9
- name = "Run"
10
- icon = "run"
11
- command = '''
12
- npm login
13
- npm publish --access public
14
- '''
15
-
16
- [[actions]]
17
- name = "npm publish --access public"
18
- icon = "tool"
19
- command = "npm publish --access public"
@@ -1,17 +0,0 @@
1
- {
2
- "name": "Global HR Tech",
3
- "industries": [
4
- "Software"
5
- ],
6
- "companySizes": [],
7
- "regions": [
8
- "Global"
9
- ],
10
- "titles": [
11
- "VP Sales",
12
- "Head of Revenue Operations"
13
- ],
14
- "pains": [],
15
- "requiredSignals": [],
16
- "excludedSignals": []
17
- }
@@ -1,77 +0,0 @@
1
- [
2
- {
3
- "companyName": "Deel",
4
- "domain": "deel.com",
5
- "industry": "Software",
6
- "region": "Global",
7
- "employeeCount": 180,
8
- "contactName": "Jordan Patel",
9
- "title": "VP Sales",
10
- "email": "jordan.patel@deel.com",
11
- "source": "heuristic-target-account",
12
- "signals": [
13
- "hiring sales reps",
14
- "expanding into new regions"
15
- ]
16
- },
17
- {
18
- "companyName": "Deel",
19
- "domain": "deel.com",
20
- "industry": "Software",
21
- "region": "Global",
22
- "employeeCount": 320,
23
- "contactName": "Taylor Morgan",
24
- "title": "Head of Revenue Operations",
25
- "email": "taylor.morgan@deel.com",
26
- "source": "heuristic-target-account",
27
- "signals": [
28
- "recent funding",
29
- "using fragmented sales tooling"
30
- ]
31
- },
32
- {
33
- "companyName": "Deel",
34
- "domain": "deel.com",
35
- "industry": "Software",
36
- "region": "Global",
37
- "employeeCount": 85,
38
- "contactName": "Morgan Diaz",
39
- "title": "VP Sales",
40
- "email": "morgan.diaz@deel.com",
41
- "source": "heuristic-target-account",
42
- "signals": [
43
- "expanding into new regions",
44
- "growing outbound team"
45
- ]
46
- },
47
- {
48
- "companyName": "Deel",
49
- "domain": "deel.com",
50
- "industry": "Software",
51
- "region": "Global",
52
- "employeeCount": 540,
53
- "contactName": "Cameron Lee",
54
- "title": "Head of Revenue Operations",
55
- "email": "cameron.lee@deel.com",
56
- "source": "heuristic-target-account",
57
- "signals": [
58
- "using fragmented sales tooling",
59
- "launching new product line"
60
- ]
61
- },
62
- {
63
- "companyName": "Deel",
64
- "domain": "deel.com",
65
- "industry": "Software",
66
- "region": "Global",
67
- "employeeCount": 260,
68
- "contactName": "Riley Brooks",
69
- "title": "VP Sales",
70
- "email": "riley.brooks@deel.com",
71
- "source": "heuristic-target-account",
72
- "signals": [
73
- "growing outbound team",
74
- "hiring sales reps"
75
- ]
76
- }
77
- ]
@@ -1,106 +0,0 @@
1
- [
2
- {
3
- "companyName": "Northstar Freight",
4
- "domain": "northstarfreight.com",
5
- "industry": "Software",
6
- "region": "Europe",
7
- "employeeCount": 180,
8
- "contactName": "Jordan Patel",
9
- "title": "Head of Revenue Operations",
10
- "email": "jordan.patel@northstarfreight.com",
11
- "source": "heuristic-seed",
12
- "signals": [
13
- "hiring sales reps",
14
- "expanding into new regions"
15
- ],
16
- "techStack": [
17
- "HubSpot",
18
- "Instantly"
19
- ],
20
- "crmFit": "medium",
21
- "outreachFit": "medium",
22
- "buyingStage": "solution-aware",
23
- "notes": [
24
- "Northstar Freight matches the Software segment.",
25
- "Jordan Patel is likely close to revenue tooling decisions."
26
- ]
27
- },
28
- {
29
- "companyName": "Brightpath Health",
30
- "domain": "brightpathhealth.io",
31
- "industry": "Financial Services",
32
- "region": "Europe",
33
- "employeeCount": 320,
34
- "contactName": "Taylor Morgan",
35
- "title": "VP Sales",
36
- "email": "taylor.morgan@brightpathhealth.io",
37
- "source": "heuristic-seed",
38
- "signals": [
39
- "recent funding",
40
- "using fragmented sales tooling"
41
- ],
42
- "techStack": [
43
- "Salesforce",
44
- "Outreach"
45
- ],
46
- "crmFit": "high",
47
- "outreachFit": "medium",
48
- "buyingStage": "active-evaluation",
49
- "notes": [
50
- "Brightpath Health matches the Financial Services segment.",
51
- "Taylor Morgan is likely close to revenue tooling decisions."
52
- ]
53
- },
54
- {
55
- "companyName": "ForgeOps Cloud",
56
- "domain": "forgeopscloud.dev",
57
- "industry": "Software",
58
- "region": "Europe",
59
- "employeeCount": 85,
60
- "contactName": "Morgan Diaz",
61
- "title": "Head of Revenue Operations",
62
- "email": "morgan.diaz@forgeopscloud.dev",
63
- "source": "heuristic-seed",
64
- "signals": [
65
- "expanding into new regions",
66
- "growing outbound team"
67
- ],
68
- "techStack": [
69
- "Apollo",
70
- "Clay"
71
- ],
72
- "crmFit": "low",
73
- "outreachFit": "high",
74
- "buyingStage": "solution-aware",
75
- "notes": [
76
- "ForgeOps Cloud matches the Software segment.",
77
- "Morgan Diaz is likely close to revenue tooling decisions."
78
- ]
79
- },
80
- {
81
- "companyName": "Summit Retail Group",
82
- "domain": "summitretailgroup.com",
83
- "industry": "Financial Services",
84
- "region": "Europe",
85
- "employeeCount": 540,
86
- "contactName": "Cameron Lee",
87
- "title": "VP Sales",
88
- "email": "cameron.lee@summitretailgroup.com",
89
- "source": "heuristic-seed",
90
- "signals": [
91
- "using fragmented sales tooling",
92
- "launching new product line"
93
- ],
94
- "techStack": [
95
- "Instantly",
96
- "Segment"
97
- ],
98
- "crmFit": "high",
99
- "outreachFit": "medium",
100
- "buyingStage": "solution-aware",
101
- "notes": [
102
- "Summit Retail Group matches the Financial Services segment.",
103
- "Cameron Lee is likely close to revenue tooling decisions."
104
- ]
105
- }
106
- ]
package/data/icp.json DELETED
@@ -1,24 +0,0 @@
1
- {
2
- "name": "EU SaaS RevOps",
3
- "industries": [
4
- "Software",
5
- "Financial Services"
6
- ],
7
- "companySizes": [
8
- "50-199",
9
- "200-499"
10
- ],
11
- "regions": [
12
- "Europe"
13
- ],
14
- "titles": [
15
- "Head of Revenue Operations",
16
- "VP Sales"
17
- ],
18
- "pains": [],
19
- "requiredSignals": [
20
- "recent funding",
21
- "growing outbound team"
22
- ],
23
- "excludedSignals": []
24
- }
package/data/leads.json DELETED
@@ -1,62 +0,0 @@
1
- [
2
- {
3
- "companyName": "Northstar Freight",
4
- "domain": "northstarfreight.com",
5
- "industry": "Software",
6
- "region": "Europe",
7
- "employeeCount": 180,
8
- "contactName": "Jordan Patel",
9
- "title": "Head of Revenue Operations",
10
- "email": "jordan.patel@northstarfreight.com",
11
- "source": "heuristic-seed",
12
- "signals": [
13
- "hiring sales reps",
14
- "expanding into new regions"
15
- ]
16
- },
17
- {
18
- "companyName": "Brightpath Health",
19
- "domain": "brightpathhealth.io",
20
- "industry": "Financial Services",
21
- "region": "Europe",
22
- "employeeCount": 320,
23
- "contactName": "Taylor Morgan",
24
- "title": "VP Sales",
25
- "email": "taylor.morgan@brightpathhealth.io",
26
- "source": "heuristic-seed",
27
- "signals": [
28
- "recent funding",
29
- "using fragmented sales tooling"
30
- ]
31
- },
32
- {
33
- "companyName": "ForgeOps Cloud",
34
- "domain": "forgeopscloud.dev",
35
- "industry": "Software",
36
- "region": "Europe",
37
- "employeeCount": 85,
38
- "contactName": "Morgan Diaz",
39
- "title": "Head of Revenue Operations",
40
- "email": "morgan.diaz@forgeopscloud.dev",
41
- "source": "heuristic-seed",
42
- "signals": [
43
- "expanding into new regions",
44
- "growing outbound team"
45
- ]
46
- },
47
- {
48
- "companyName": "Summit Retail Group",
49
- "domain": "summitretailgroup.com",
50
- "industry": "Financial Services",
51
- "region": "Europe",
52
- "employeeCount": 540,
53
- "contactName": "Cameron Lee",
54
- "title": "VP Sales",
55
- "email": "cameron.lee@summitretailgroup.com",
56
- "source": "heuristic-seed",
57
- "signals": [
58
- "using fragmented sales tooling",
59
- "launching new product line"
60
- ]
61
- }
62
- ]
package/data/scored.json DELETED
@@ -1,142 +0,0 @@
1
- [
2
- {
3
- "companyName": "Northstar Freight",
4
- "domain": "northstarfreight.com",
5
- "industry": "Software",
6
- "region": "Europe",
7
- "employeeCount": 180,
8
- "contactName": "Jordan Patel",
9
- "title": "Head of Revenue Operations",
10
- "email": "jordan.patel@northstarfreight.com",
11
- "source": "heuristic-seed",
12
- "signals": [
13
- "hiring sales reps",
14
- "expanding into new regions"
15
- ],
16
- "techStack": [
17
- "HubSpot",
18
- "Instantly"
19
- ],
20
- "crmFit": "medium",
21
- "outreachFit": "medium",
22
- "buyingStage": "solution-aware",
23
- "notes": [
24
- "Northstar Freight matches the Software segment.",
25
- "Jordan Patel is likely close to revenue tooling decisions."
26
- ],
27
- "score": 90,
28
- "grade": "A",
29
- "rationale": [
30
- "Industry matches ICP.",
31
- "Region matches ICP.",
32
- "Company size matches ICP.",
33
- "Contact title matches ICP."
34
- ]
35
- },
36
- {
37
- "companyName": "Brightpath Health",
38
- "domain": "brightpathhealth.io",
39
- "industry": "Financial Services",
40
- "region": "Europe",
41
- "employeeCount": 320,
42
- "contactName": "Taylor Morgan",
43
- "title": "VP Sales",
44
- "email": "taylor.morgan@brightpathhealth.io",
45
- "source": "heuristic-seed",
46
- "signals": [
47
- "recent funding",
48
- "using fragmented sales tooling"
49
- ],
50
- "techStack": [
51
- "Salesforce",
52
- "Outreach"
53
- ],
54
- "crmFit": "high",
55
- "outreachFit": "medium",
56
- "buyingStage": "active-evaluation",
57
- "notes": [
58
- "Brightpath Health matches the Financial Services segment.",
59
- "Taylor Morgan is likely close to revenue tooling decisions."
60
- ],
61
- "score": 100,
62
- "grade": "A",
63
- "rationale": [
64
- "Industry matches ICP.",
65
- "Region matches ICP.",
66
- "Company size matches ICP.",
67
- "Contact title matches ICP.",
68
- "Matched 1 required buying signals.",
69
- "Strong CRM fit."
70
- ]
71
- },
72
- {
73
- "companyName": "ForgeOps Cloud",
74
- "domain": "forgeopscloud.dev",
75
- "industry": "Software",
76
- "region": "Europe",
77
- "employeeCount": 85,
78
- "contactName": "Morgan Diaz",
79
- "title": "Head of Revenue Operations",
80
- "email": "morgan.diaz@forgeopscloud.dev",
81
- "source": "heuristic-seed",
82
- "signals": [
83
- "expanding into new regions",
84
- "growing outbound team"
85
- ],
86
- "techStack": [
87
- "Apollo",
88
- "Clay"
89
- ],
90
- "crmFit": "low",
91
- "outreachFit": "high",
92
- "buyingStage": "solution-aware",
93
- "notes": [
94
- "ForgeOps Cloud matches the Software segment.",
95
- "Morgan Diaz is likely close to revenue tooling decisions."
96
- ],
97
- "score": 100,
98
- "grade": "A",
99
- "rationale": [
100
- "Industry matches ICP.",
101
- "Region matches ICP.",
102
- "Company size matches ICP.",
103
- "Contact title matches ICP.",
104
- "Matched 1 required buying signals.",
105
- "Strong outreach fit."
106
- ]
107
- },
108
- {
109
- "companyName": "Summit Retail Group",
110
- "domain": "summitretailgroup.com",
111
- "industry": "Financial Services",
112
- "region": "Europe",
113
- "employeeCount": 540,
114
- "contactName": "Cameron Lee",
115
- "title": "VP Sales",
116
- "email": "cameron.lee@summitretailgroup.com",
117
- "source": "heuristic-seed",
118
- "signals": [
119
- "using fragmented sales tooling",
120
- "launching new product line"
121
- ],
122
- "techStack": [
123
- "Instantly",
124
- "Segment"
125
- ],
126
- "crmFit": "high",
127
- "outreachFit": "medium",
128
- "buyingStage": "solution-aware",
129
- "notes": [
130
- "Summit Retail Group matches the Financial Services segment.",
131
- "Cameron Lee is likely close to revenue tooling decisions."
132
- ],
133
- "score": 85,
134
- "grade": "A",
135
- "rationale": [
136
- "Industry matches ICP.",
137
- "Region matches ICP.",
138
- "Contact title matches ICP.",
139
- "Strong CRM fit."
140
- ]
141
- }
142
- ]