salesprompter-cli 0.1.35 → 0.1.36

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.
@@ -12,6 +12,19 @@ function marketCountries(market) {
12
12
  function sqlStringList(values) {
13
13
  return values.map((value) => `'${value.replaceAll("'", "\\'")}'`).join(", ");
14
14
  }
15
+ function companySizeEmployeeCountSql(field) {
16
+ return `CASE TRIM(${field})
17
+ WHEN '1-10' THEN 10
18
+ WHEN '11-50' THEN 30
19
+ WHEN '51-200' THEN 125
20
+ WHEN '201-500' THEN 350
21
+ WHEN '501-1000' THEN 750
22
+ WHEN '1001-5000' THEN 2500
23
+ WHEN '5001-10.000' THEN 7500
24
+ WHEN '10.000+' THEN 10000
25
+ ELSE NULL
26
+ END`;
27
+ }
15
28
  function broadTitlePredicateSql(field) {
16
29
  return [
17
30
  `LOWER(${field}) LIKE '%head of hr%'`,
@@ -54,6 +67,7 @@ function titleExclusionPredicateSql(field) {
54
67
  export function buildDeelOutreachExportSql(options) {
55
68
  const countries = marketCountries(options.market);
56
69
  const countryClause = countries.length > 0 ? `UPPER(CAST(p.company_countryCode AS STRING)) IN (${sqlStringList(countries)})` : "TRUE";
70
+ const companySizeEmployeeCount = companySizeEmployeeCountSql("CAST(p.companySize AS STRING)");
57
71
  return `WITH hr_leadlists AS (
58
72
  SELECT
59
73
  CAST(leadListId AS STRING) AS leadListId,
@@ -120,7 +134,8 @@ WHERE CAST(p.functionId AS STRING) = '12'
120
134
  AND CAST(p.firstName_cleaned AS STRING) IS NOT NULL
121
135
  AND CAST(p.lastName_cleaned AS STRING) IS NOT NULL
122
136
  AND SAFE_CAST(p.emailScore AS INT64) >= ${Math.trunc(options.minEmailScore)}
123
- AND CAST(p.companySize AS STRING) IN ('200-499', '501-1000', '1001-5000', '5001-10.000', '10.000+')
137
+ AND ${companySizeEmployeeCount} >= 100
138
+ AND ${companySizeEmployeeCount} <= 2500
124
139
  AND (
125
140
  ${broadTitlePredicateSql("CAST(p.jobTitle AS STRING)")}
126
141
  )
@@ -11,6 +11,19 @@ function marketCountries(market) {
11
11
  function sqlStringList(values) {
12
12
  return values.map((value) => `'${value.replaceAll("'", "\\'")}'`).join(", ");
13
13
  }
14
+ function companySizeEmployeeCountSql(field) {
15
+ return `CASE TRIM(${field})
16
+ WHEN '1-10' THEN 10
17
+ WHEN '11-50' THEN 30
18
+ WHEN '51-200' THEN 125
19
+ WHEN '201-500' THEN 350
20
+ WHEN '501-1000' THEN 750
21
+ WHEN '1001-5000' THEN 2500
22
+ WHEN '5001-10.000' THEN 7500
23
+ WHEN '10.000+' THEN 10000
24
+ ELSE NULL
25
+ END`;
26
+ }
14
27
  function broadTitlePredicateSql() {
15
28
  return [
16
29
  "LOWER(c.jobTitle) LIKE '%head of hr%'",
@@ -58,6 +71,7 @@ export function buildDirectPathLeadExportSql(vendor, market, limit) {
58
71
  const countryClause = countries.length > 0 ? `co.countryCode IN (${sqlStringList(countries)})` : "TRUE";
59
72
  const broadTitlePredicate = broadTitlePredicateSql();
60
73
  const titleExclusions = titleExclusionPredicateSql();
74
+ const companySizeEmployeeCount = companySizeEmployeeCountSql("co.companySize");
61
75
  return `WITH hr_leadlists AS (
62
76
  SELECT
63
77
  CAST(leadListId AS STRING) AS leadListId,
@@ -132,7 +146,8 @@ JOIN hr_leadlists l ON c.leadListId = l.leadListId
132
146
  LEFT JOIN companies co ON c.companyId = co.companyId
133
147
  WHERE ${countryClause}
134
148
  AND co.domain IS NOT NULL
135
- AND co.companySize IN ('200-499', '501-1000', '1001-5000', '5001-10.000', '10.000+')
149
+ AND ${companySizeEmployeeCount} >= 100
150
+ AND ${companySizeEmployeeCount} <= 2500
136
151
  AND (
137
152
  ${broadTitlePredicate}
138
153
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "salesprompter-cli",
3
- "version": "0.1.35",
3
+ "version": "0.1.36",
4
4
  "description": "Sales workflow CLI for guided lead generation, enrichment, scoring, and sync.",
5
5
  "author": "Daniel Sinewe <hello@danielsinewe.com>",
6
6
  "type": "module",
@@ -16,6 +16,7 @@
16
16
  ],
17
17
  "scripts": {
18
18
  "build": "tsc -p tsconfig.json",
19
+ "benchmark:linkedin:direct": "node ./scripts/benchmark-linkedin-direct-strategies.mjs",
19
20
  "build:docs:site": "node ./scripts/build-docs-site.mjs",
20
21
  "check": "tsc --noEmit -p tsconfig.json",
21
22
  "supabase:migrations:check": "node ./scripts/check-app-supabase-migrations.mjs",