how do I do a conditional enrichment?
To perform a conditional enrichment in Clay: 1. Go to Run Settings of any enrichment column 2. Add your condition in the "Only run if" box 3. Use the "Use AI" button to input plain language instructions instead of complex formulas 4. Type your condition - for example: "Only run if /headcount is greater than 40" (use "/" to reference columns) 5. Click "Generate Formula" - AI will convert your request into a formula 6. Verify the output by checking sample results to ensure your condition works as expected This saves credits by only running enrichments when specific conditions are met, rather than on every row.
Hi Joel, thank you for reaching out. When you create an enrichment, scroll to the bottom of the menu that appears. Under "Run Settings"> "Only Run if" press on "Use AI".
After selecting this, you'll be able to either use an AI prompt in the first box or JavaScript to instruct Clay on how to process the results from a column. An example of what this looks like is shown below:
In this case, I recommend using the first box to specify to Clay what type of condition it should verify before it runs this AI column. For example, you could tell it to only run if a certain column has not got a result. Then, click on "Generate Formula," which will create a JavaScript formula for you and show the results that would be generated if the formula were applied. If you're satisfied with the results, simply click "Output Is Correct, Save Formula." The button is shown below:
Please let me know if this helps!
Thank you. This helped.
Happy to help!