Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions components/explorium/actions/enrich-business/enrich-business.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import explorium from "../../explorium.app.mjs";
import constants from "../../common/constants.mjs";

export default {
key: "explorium-enrich-business",
name: "Enrich Business",
description: "Enrich business data with comprehensive insights for lead generation, risk assessment, and business intelligence. [See the documentation](https://developers.explorium.ai/reference/businesses_enrichments)",
version: "0.0.1",
type: "action",
props: {
explorium,
type: {
type: "string",
label: "Enrichment Type",
description: "The type of enrichment to perform",
options: constants.BUSINESS_ENRICHMENT_TYPES,
},
businessId: {
type: "string",
label: "Business ID",
description: "The ID of the business to enrich",
},
},
async run({ $ }) {
const { data } = await this.explorium.enrichBusiness({
$,
type: this.type,
data: {
business_id: this.businessId,
},
});
$.export("$summary", `Enriched business ${this.businessId} with ${this.type}`);
return data;
},
};
35 changes: 35 additions & 0 deletions components/explorium/actions/enrich-prospect/enrich-prospect.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import explorium from "../../explorium.app.mjs";
import constants from "../../common/constants.mjs";

export default {
key: "explorium-enrich-prospect",
name: "Enrich Prospect",
description: "Enrich prospect records with comprehensive professional and contact information to enhance outreach and engagement strategies. [See the documentation](https://developers.explorium.ai/reference/prospects_enrichments)",
version: "0.0.1",
type: "action",
props: {
explorium,
type: {
type: "string",
label: "Enrichment Type",
description: "The type of enrichment to perform",
options: constants.PROSPECT_ENRICHMENT_TYPES,
},
prospectId: {
type: "string",
label: "Prospect ID",
description: "The ID of the prospect to enrich",
},
},
async run({ $ }) {
const { data } = await this.explorium.enrichProspect({
$,
type: this.type,
data: {
prospect_id: this.prospectId,
},
});
$.export("$summary", `Enriched prospect ${this.prospectId} with ${this.type}`);
return data;
},
};
85 changes: 85 additions & 0 deletions components/explorium/actions/fetch-businesses/fetch-businesses.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import explorium from "../../explorium.app.mjs";

export default {
key: "explorium-fetch-businesses",
name: "Fetch Businesses",
description: "Fetches business records using filters. [See the documentation](https://developers.explorium.ai/reference/list_businesses)",
version: "0.0.1",
type: "action",
props: {
explorium,
name: {
propDefinition: [
explorium,
"name",
],
},
country: {
propDefinition: [
explorium,
"country",
],
},
size: {
propDefinition: [
explorium,
"size",
],
},
revenue: {
propDefinition: [
explorium,
"revenue",
],
},
websiteKeywords: {
type: "string[]",
label: "Website Keywords",
description: "Filter by website keywords",
optional: true,
},
},
async run({ $ }) {
const { data } = await this.explorium.fetchBusinesses({
$,
data: {
mode: "full",
size: 100,
page_size: 100,
filters: {
company_name: this.name
? {
values: [
this.name,
],
}
: undefined,
country_code: this.country
? {
values: [
this.country,
],
}
: undefined,
company_size: this.size
? {
values: this.size,
}
: undefined,
company_revenue: this.revenue
? {
values: this.revenue,
}
: undefined,
website_keywords: this.websiteKeywords
? {
values: this.websiteKeywords,
}
: undefined,
},
},
});
$.export("$summary", `Fetched ${data.length} businesses`);
return data;
},
};
99 changes: 99 additions & 0 deletions components/explorium/actions/fetch-prospects/fetch-prospects.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
import explorium from "../../explorium.app.mjs";
import constants from "../../common/constants.mjs";

export default {
key: "explorium-fetch-prospects",
name: "Fetch Prospects",
description: "Fetches prospect records using filters. [See the documentation](https://developers.explorium.ai/reference/fetch_prospects)",
version: "0.0.1",
type: "action",
props: {
explorium,
name: {
propDefinition: [
explorium,
"name",
],
},
country: {
propDefinition: [
explorium,
"country",
],
},
size: {
propDefinition: [
explorium,
"size",
],
},
revenue: {
propDefinition: [
explorium,
"revenue",
],
},
jobLevel: {
type: "string[]",
label: "Job Level",
description: "Filter by job level",
options: constants.PROSPECT_JOB_LEVELS,
optional: true,
},
jobDepartment: {
type: "string[]",
label: "Job Department",
description: "Filter by job department",
options: constants.PROSPECT_JOB_DEPARTMENTS,
optional: true,
},
},
async run({ $ }) {
const { data } = await this.explorium.fetchProspects({
$,
data: {
mode: "full",
size: 100,
page_size: 100,
filters: {
company_name: this.name
? {
values: [
this.name,
],
}
: undefined,
country_code: this.country
? {
values: [
this.country,
],
}
: undefined,
company_size: this.size
? {
values: this.size,
}
: undefined,
company_revenue: this.revenue
? {
values: this.revenue,
}
: undefined,
job_level: this.jobLevel
? {
values: this.jobLevel,
}
: undefined,
job_department: this.jobDepartment
? {
values: this.jobDepartment,
}
: undefined,
},
},
});
$.export("$summary", `Fetched ${data.length} prospects`);
return data;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import explorium from "../../explorium.app.mjs";

export default {
key: "explorium-match-business-id",
name: "Match Business ID",
description: "Match a businesse to its unique identifier using business name and domain. [See the documentation](https://developers.explorium.ai/reference/match_businesses)",
version: "0.0.1",
type: "action",
props: {
explorium,
name: {
type: "string",
label: "Business Name",
description: "The name of the business to match",
},
domain: {
type: "string",
label: "Domain",
description: "The domain of the business to match",
},
},
async run({ $ }) {
const response = await this.explorium.matchBusinessId({
$,
data: {
businesses_to_match: [
{
name: this.name,
domain: this.domain,
},
],
},
});
$.export("$summary", `Matched business ID for ${this.name} (${this.domain})`);
return response;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import explorium from "../../explorium.app.mjs";

export default {
key: "explorium-match-prospect-id",
name: "Match Prospect ID",
description: "Match individual prospects to unique identifiers using email addresses. [See the documentation](https://developers.explorium.ai/reference/match_prospects-1)",
version: "0.0.1",
type: "action",
props: {
explorium,
email: {
type: "string",
label: "Email",
description: "The email address of the prospect to match",
},
},
async run({ $ }) {
const response = await this.explorium.matchProspectId({
$,
data: {
prospects_to_match: [
{
email: this.email,
},
],
},
});
$.export("$summary", `Matched prospect ID for ${this.email}`);
return response;
},
};
Loading
Loading