Skip to content

Generate Ai Run Condition

POST
/enrichment/ai-formula/generate-condition

Turn a rule in words into a run condition. SPENDS CREDITS, TOKEN-METERED.

“Only run for CEOs with no work email” becomes an expression you can put in a config’s run_condition, so the enrichment skips rows it should not touch - which is how this pays for itself.

The charge is METERED ON TOKENS rather than flat: a long rule with a large sample record costs more than a short one. Keep sampleData to a single representative record.

Authorizations

Parameters

Header Parameters

X-Target-Org-Id
Any of:
string

Request Body required

Describe in words when an enrichment should run; get back an expression.

The app takes a FREE DICT here, so this model takes one too rather than narrowing below it - every field is optional and unknown keys are forwarded untouched. Narrowing would refuse a body the browser accepts, which is the mirror image of the bug the strict models elsewhere in this file prevent.

object
entityType
Any of:
string
fields
Any of:
Array<string>
prompt
Any of:
string
sampleData
Any of:
object
key
additional properties
any
key
additional properties
any

Responses

200

Successful Response

object
data
required

One enrichment object, open-shaped.

Open on purpose: a workbench column set is defined by the CUSTOMER at runtime, and the enrichment result shapes grow with every provider added. Pinning them would drop whatever a provider returned that this contract had not caught up on, which on an enrichment surface is the data the customer paid for.

object
key
additional properties
any
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
notes
Any of:
Array<string>
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer
total_available
Any of:
integer
total_is_lower_bound
Any of:
boolean

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string