|
| 1 | +import { CompanyEnrichIcon } from '@/components/icons' |
| 2 | +import type { BlockConfig, BlockMeta } from '@/blocks/types' |
| 3 | +import { AuthMode, IntegrationType } from '@/blocks/types' |
| 4 | + |
| 5 | +export const CompanyEnrichBlock: BlockConfig = { |
| 6 | + type: 'companyenrich', |
| 7 | + name: 'CompanyEnrich', |
| 8 | + description: 'Enrich, search, and discover similar companies', |
| 9 | + longDescription: |
| 10 | + 'Look up company profiles by domain, search company names and domains, and discover lookalike accounts. Enrichment costs 1 credit per call; search costs 1 credit per result (1 minimum); similar-company discovery costs 5 per result (5 minimum).', |
| 11 | + docsLink: 'https://docs.sim.ai/integrations/companyenrich', |
| 12 | + category: 'tools', |
| 13 | + integrationType: IntegrationType.Sales, |
| 14 | + authMode: AuthMode.ApiKey, |
| 15 | + bgColor: '#1488CC', |
| 16 | + icon: CompanyEnrichIcon, |
| 17 | + canvasPresentation: { |
| 18 | + defaultTitle: 'CompanyEnrich', |
| 19 | + sentences: { |
| 20 | + byOperation: { |
| 21 | + enrich: [{ text: 'Enrich company', field: 'domain', core: true }], |
| 22 | + search: [{ text: 'Search companies for', field: 'query', core: true }], |
| 23 | + similar: [{ text: 'Find companies similar to', field: 'domain', core: true }], |
| 24 | + }, |
| 25 | + }, |
| 26 | + }, |
| 27 | + subBlocks: [ |
| 28 | + { |
| 29 | + id: 'operation', |
| 30 | + title: 'Operation', |
| 31 | + type: 'dropdown', |
| 32 | + options: [ |
| 33 | + { label: 'Enrich Company', id: 'enrich' }, |
| 34 | + { label: 'Search Companies', id: 'search' }, |
| 35 | + { label: 'Find Similar Companies', id: 'similar' }, |
| 36 | + ], |
| 37 | + value: () => 'enrich', |
| 38 | + }, |
| 39 | + { |
| 40 | + id: 'domain', |
| 41 | + title: 'Company Domain', |
| 42 | + type: 'short-input', |
| 43 | + placeholder: 'example.com', |
| 44 | + required: true, |
| 45 | + condition: { field: 'operation', value: ['enrich', 'similar'] }, |
| 46 | + }, |
| 47 | + { |
| 48 | + id: 'query', |
| 49 | + title: 'Search Query', |
| 50 | + type: 'short-input', |
| 51 | + placeholder: 'Enter a company name or domain', |
| 52 | + required: true, |
| 53 | + condition: { field: 'operation', value: 'search' }, |
| 54 | + }, |
| 55 | + { |
| 56 | + id: 'page', |
| 57 | + title: 'Page', |
| 58 | + type: 'short-input', |
| 59 | + placeholder: 'Defaults to 1', |
| 60 | + mode: 'advanced', |
| 61 | + condition: { field: 'operation', value: ['search', 'similar'] }, |
| 62 | + }, |
| 63 | + { |
| 64 | + id: 'pageSize', |
| 65 | + title: 'Page Size', |
| 66 | + type: 'short-input', |
| 67 | + placeholder: '1 to 100 (defaults to 10)', |
| 68 | + mode: 'advanced', |
| 69 | + condition: { field: 'operation', value: ['search', 'similar'] }, |
| 70 | + }, |
| 71 | + { |
| 72 | + id: 'apiKey', |
| 73 | + title: 'API Key', |
| 74 | + type: 'short-input', |
| 75 | + placeholder: 'Enter your CompanyEnrich API key', |
| 76 | + password: true, |
| 77 | + required: true, |
| 78 | + }, |
| 79 | + ], |
| 80 | + tools: { |
| 81 | + access: ['companyenrich_enrich', 'companyenrich_search', 'companyenrich_similar'], |
| 82 | + config: { |
| 83 | + tool: (params) => `companyenrich_${params.operation}`, |
| 84 | + params: (params) => ({ |
| 85 | + ...params, |
| 86 | + page: params.page === undefined || params.page === '' ? undefined : Number(params.page), |
| 87 | + pageSize: |
| 88 | + params.pageSize === undefined || params.pageSize === '' |
| 89 | + ? undefined |
| 90 | + : Number(params.pageSize), |
| 91 | + }), |
| 92 | + }, |
| 93 | + }, |
| 94 | + inputs: { |
| 95 | + apiKey: { type: 'string', description: 'CompanyEnrich API key' }, |
| 96 | + domain: { type: 'string', description: 'Company domain' }, |
| 97 | + query: { type: 'string', description: 'Company name or domain search' }, |
| 98 | + page: { type: 'number', description: 'One-based page number' }, |
| 99 | + pageSize: { type: 'number', description: 'Companies per page (1–100)' }, |
| 100 | + }, |
| 101 | + outputs: { |
| 102 | + company: { type: 'json', description: 'Enriched company profile' }, |
| 103 | + items: { type: 'json', description: 'Matching company profiles' }, |
| 104 | + page: { type: 'number', description: 'Current page number' }, |
| 105 | + totalPages: { type: 'number', description: 'Total available pages' }, |
| 106 | + totalItems: { type: 'number', description: 'Total matching companies' }, |
| 107 | + scores: { type: 'json', description: 'Similarity scores keyed by company UUID' }, |
| 108 | + }, |
| 109 | +} |
| 110 | + |
| 111 | +export const CompanyEnrichBlockMeta = { |
| 112 | + tags: ['enrichment', 'sales-engagement'], |
| 113 | + url: 'https://companyenrich.com', |
| 114 | + templates: [ |
| 115 | + { |
| 116 | + icon: CompanyEnrichIcon, |
| 117 | + title: 'CompanyEnrich lead qualification', |
| 118 | + prompt: |
| 119 | + 'When a company domain arrives, enrich it and return a qualification summary using industry and employee range.', |
| 120 | + modules: ['agent', 'workflows'], |
| 121 | + category: 'sales', |
| 122 | + tags: ['enrichment'], |
| 123 | + }, |
| 124 | + { |
| 125 | + icon: CompanyEnrichIcon, |
| 126 | + title: 'CompanyEnrich CRM field audit', |
| 127 | + prompt: |
| 128 | + 'For each supplied CRM company domain, enrich the profile and return suggested values for missing name, industry, and website fields. Do not overwrite CRM records.', |
| 129 | + modules: ['agent', 'workflows'], |
| 130 | + category: 'sales', |
| 131 | + tags: ['enrichment'], |
| 132 | + }, |
| 133 | + { |
| 134 | + icon: CompanyEnrichIcon, |
| 135 | + title: 'CompanyEnrich account research', |
| 136 | + prompt: |
| 137 | + 'When given a target company domain, enrich the company and produce a research brief with its description and technology stack.', |
| 138 | + modules: ['agent', 'workflows'], |
| 139 | + category: 'sales', |
| 140 | + tags: ['enrichment'], |
| 141 | + }, |
| 142 | + { |
| 143 | + icon: CompanyEnrichIcon, |
| 144 | + title: 'CompanyEnrich lookalike shortlist', |
| 145 | + prompt: |
| 146 | + 'Given a best-customer domain, find ten similar companies and rank the shortlist using returned similarity scores.', |
| 147 | + modules: ['agent', 'workflows'], |
| 148 | + category: 'sales', |
| 149 | + tags: ['enrichment'], |
| 150 | + }, |
| 151 | + { |
| 152 | + icon: CompanyEnrichIcon, |
| 153 | + title: 'CompanyEnrich competitor discovery', |
| 154 | + prompt: |
| 155 | + 'Given a competitor domain, find similar companies and summarize their industries and descriptions for review.', |
| 156 | + modules: ['agent', 'workflows'], |
| 157 | + category: 'sales', |
| 158 | + tags: ['enrichment'], |
| 159 | + }, |
| 160 | + { |
| 161 | + icon: CompanyEnrichIcon, |
| 162 | + title: 'CompanyEnrich company discovery', |
| 163 | + prompt: |
| 164 | + 'When a user provides a company-name query, search the first page and return a table of matching names, domains, and industries.', |
| 165 | + modules: ['agent', 'workflows'], |
| 166 | + category: 'sales', |
| 167 | + tags: ['enrichment'], |
| 168 | + }, |
| 169 | + { |
| 170 | + icon: CompanyEnrichIcon, |
| 171 | + title: 'CompanyEnrich technology qualification', |
| 172 | + prompt: |
| 173 | + 'Given a list of company domains and a target technology, enrich each company and flag records whose returned technologies include that technology.', |
| 174 | + modules: ['agent', 'workflows'], |
| 175 | + category: 'sales', |
| 176 | + tags: ['enrichment'], |
| 177 | + }, |
| 178 | + ], |
| 179 | + skills: [ |
| 180 | + { |
| 181 | + name: 'research-company', |
| 182 | + description: 'Research an account from its domain', |
| 183 | + content: |
| 184 | + '# Research an account from its domain\n\nUse companyenrich_enrich on the supplied domain. Summarize its company name, industry, employee range, description, and technologies. Keep unavailable fields unknown.\n\nCheck the credit cost before requesting additional records or pages.\n\nSources: https://companyenrich.com/ and https://docs.companyenrich.com/docs/getting-started.', |
| 185 | + }, |
| 186 | + { |
| 187 | + name: 'fill-company-gaps', |
| 188 | + description: 'Suggest missing company fields for CRM records', |
| 189 | + content: |
| 190 | + '# Suggest missing company fields for CRM records\n\nFor each supplied domain, use companyenrich_enrich. Compare its fields to the supplied CRM record and return suggested missing values without editing the CRM.\n\nCheck the credit cost before requesting additional records or pages.\n\nSources: https://companyenrich.com/ and https://docs.companyenrich.com/docs/getting-started.', |
| 191 | + }, |
| 192 | + { |
| 193 | + name: 'find-lookalike-accounts', |
| 194 | + description: 'Build a lookalike account shortlist', |
| 195 | + content: |
| 196 | + '# Build a lookalike account shortlist\n\nUse companyenrich_similar with a customer domain and a bounded page size. Rank results by scores and return company names and domains.\n\nCheck the credit cost before requesting additional records or pages.\n\nSources: https://companyenrich.com/ and https://docs.companyenrich.com/docs/getting-started.', |
| 197 | + }, |
| 198 | + { |
| 199 | + name: 'discover-competitors', |
| 200 | + description: 'Explore companies similar to a competitor', |
| 201 | + content: |
| 202 | + '# Explore companies similar to a competitor\n\nUse companyenrich_similar with the supplied competitor domain. Compare descriptions and industries; describe results as candidates, not proven competitors.\n\nCheck the credit cost before requesting additional records or pages.\n\nSources: https://companyenrich.com/ and https://docs.companyenrich.com/docs/getting-started.', |
| 203 | + }, |
| 204 | + { |
| 205 | + name: 'qualify-company-technology', |
| 206 | + description: 'Check the reported technology stack of target accounts', |
| 207 | + content: |
| 208 | + '# Check the reported technology stack of target accounts\n\nUse companyenrich_enrich for each supplied company domain. Compare technologies with the user-provided target and flag matches and unknowns.\n\nCheck the credit cost before requesting additional records or pages.\n\nSources: https://companyenrich.com/ and https://docs.companyenrich.com/docs/getting-started.', |
| 209 | + }, |
| 210 | + ], |
| 211 | +} as const satisfies BlockMeta |
0 commit comments