Skip to content

Enrichment Run

Enrichment fills in missing information on a record from Lightfield’s data providers.

Enrich a record
client.EnrichmentRun.Enrich(ctx, entityID, params) (*EnrichmentRunEnrichResponse, error)
POST/v1/enrichmentRun/{entitySlug}/{entityId}
Get enrichment run status
client.EnrichmentRun.GetEnrichmentRun(ctx, runID) (*EnrichmentRunGetEnrichmentRunResponse, error)
GET/v1/enrichmentRun/{runId}
ModelsExpand Collapse
type EnrichmentRunEnrichResponse struct{…}
EnrichmentRun EnrichmentRunEnrichResponseEnrichmentRun

The run, or null when the request was skipped.

ID string

The enrichment run ID.

CompletedAt string

When the run finished, or null while it is still open.

CreatedAt string
EntityID string

The ID of the record being enriched.

EntityType string

The type of record being enriched.

One of the following:
const EnrichmentRunEnrichResponseEnrichmentRunEntityTypeContact EnrichmentRunEnrichResponseEnrichmentRunEntityType = "contact"
const EnrichmentRunEnrichResponseEnrichmentRunEntityTypeAccount EnrichmentRunEnrichResponseEnrichmentRunEntityType = "account"
StartedAt string

When the run began executing, or null while it is queued.

Status string

Where the run is: queued and running are in flight; completed, failed and timed_out are final.

One of the following:
const EnrichmentRunEnrichResponseEnrichmentRunStatusQueued EnrichmentRunEnrichResponseEnrichmentRunStatus = "queued"
const EnrichmentRunEnrichResponseEnrichmentRunStatusRunning EnrichmentRunEnrichResponseEnrichmentRunStatus = "running"
const EnrichmentRunEnrichResponseEnrichmentRunStatusCompleted EnrichmentRunEnrichResponseEnrichmentRunStatus = "completed"
const EnrichmentRunEnrichResponseEnrichmentRunStatusFailed EnrichmentRunEnrichResponseEnrichmentRunStatus = "failed"
const EnrichmentRunEnrichResponseEnrichmentRunStatusTimedOut EnrichmentRunEnrichResponseEnrichmentRunStatus = "timed_out"
TargetFields []string

The fields this run set out to fill.

Trigger string

What started the run: creation when the record was created, manual when requested through the API.

One of the following:
const EnrichmentRunEnrichResponseEnrichmentRunTriggerCreation EnrichmentRunEnrichResponseEnrichmentRunTrigger = "creation"
const EnrichmentRunEnrichResponseEnrichmentRunTriggerManual EnrichmentRunEnrichResponseEnrichmentRunTrigger = "manual"
UpdatedAt string
Reason EnrichmentRunEnrichResponseReason

Why the request was skipped: no_targets when the workspace enriches nothing this record is missing, no_operations when no provider can be scheduled for the targeted fields — because none looks them up on request, or because the record lacks the inputs (such as an email or domain) a lookup would need. Null otherwise.

One of the following:
const EnrichmentRunEnrichResponseReasonNoTargets EnrichmentRunEnrichResponseReason = "no_targets"
const EnrichmentRunEnrichResponseReasonNoOperations EnrichmentRunEnrichResponseReason = "no_operations"
Status EnrichmentRunEnrichResponseStatus

started when this request began a run, already_running when one was already enriching the record, skipped when there was nothing to enrich.

One of the following:
const EnrichmentRunEnrichResponseStatusStarted EnrichmentRunEnrichResponseStatus = "started"
const EnrichmentRunEnrichResponseStatusAlreadyRunning EnrichmentRunEnrichResponseStatus = "already_running"
const EnrichmentRunEnrichResponseStatusSkipped EnrichmentRunEnrichResponseStatus = "skipped"
type EnrichmentRunGetEnrichmentRunResponse struct{…}
ID string

The enrichment run ID.

CompletedAt string

When the run finished, or null while it is still open.

CreatedAt string
EntityID string

The ID of the record being enriched.

EntityType EnrichmentRunGetEnrichmentRunResponseEntityType

The type of record being enriched.

One of the following:
const EnrichmentRunGetEnrichmentRunResponseEntityTypeContact EnrichmentRunGetEnrichmentRunResponseEntityType = "contact"
const EnrichmentRunGetEnrichmentRunResponseEntityTypeAccount EnrichmentRunGetEnrichmentRunResponseEntityType = "account"
StartedAt string

When the run began executing, or null while it is queued.

Status EnrichmentRunGetEnrichmentRunResponseStatus

Where the run is: queued and running are in flight; completed, failed and timed_out are final.

One of the following:
const EnrichmentRunGetEnrichmentRunResponseStatusQueued EnrichmentRunGetEnrichmentRunResponseStatus = "queued"
const EnrichmentRunGetEnrichmentRunResponseStatusRunning EnrichmentRunGetEnrichmentRunResponseStatus = "running"
const EnrichmentRunGetEnrichmentRunResponseStatusCompleted EnrichmentRunGetEnrichmentRunResponseStatus = "completed"
const EnrichmentRunGetEnrichmentRunResponseStatusFailed EnrichmentRunGetEnrichmentRunResponseStatus = "failed"
const EnrichmentRunGetEnrichmentRunResponseStatusTimedOut EnrichmentRunGetEnrichmentRunResponseStatus = "timed_out"
TargetFields []string

The fields this run set out to fill.

Trigger EnrichmentRunGetEnrichmentRunResponseTrigger

What started the run: creation when the record was created, manual when requested through the API.

One of the following:
const EnrichmentRunGetEnrichmentRunResponseTriggerCreation EnrichmentRunGetEnrichmentRunResponseTrigger = "creation"
const EnrichmentRunGetEnrichmentRunResponseTriggerManual EnrichmentRunGetEnrichmentRunResponseTrigger = "manual"
UpdatedAt string