Clay Icon

Creating a Numbering Formula for Leads in Clay

·
·

Hey everyone! 👋 I’m trying to create a numbering formula in Clay to get the first lead from each company. In Excel, I would normally use a formula like =IF(A2=A1, B1+1, 1), but I’m having trouble replicating that logic in Clay's Formula Generator. I've tried using this formula: Compares the current row's company domain Company Domain with the previous row's company domain Company Domain If they match, it increments the number from the previous row. If not, it starts counting from 1. But it’s not giving me the correct output. I need a way to number leads per company, so I can easily filter out just the first one from each group. Any ideas or suggestions on how to get this to work properly? Appreciate any help! 🙏

  • Avatar of Channeled
    Channeled
    APP
    ·
    ·

    To create a numbering formula in Clay that identifies the first lead from each company, you can use our "Score Row in Clay" feature. Here's how you can approach this: 1. Use the "Score Row in Clay" integration. 2. Set up a scoring criterion based on the company domain. 3. Configure the scoring to assign 1 point to the first occurrence of each domain and 0 to subsequent occurrences. This will effectively number your leads per company, allowing you to easily filter for the first lead from each group. To implement this, you'll need to use our Formula Generator to create a custom formula that compares the current row's company domain with the previous row's. Would you like more detailed steps on how to set this up in Clay?

  • Avatar of Shoaib K.
    Shoaib K.
    ·
    ·

    yes, I would like more detailed steps on how to set this up in Clay?

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·

    There is no vertical memory in clay. You cant reference whats happening in the above row. You can use lookup multiple rows enrichment and lookup on domain/company name company name column to find the total number of leads per company and then action on that further.

  • Avatar of Shoaib K.
    Shoaib K.
    ·
    ·

    Hi Muhammad S., thank you for your response, I have used lookup multiple rows enrichment on domain and find the total number of leads per company but how do I use this information, like how do I filter out only the first leads, it give information like 4 results etc.

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·

    what you mean by first lead and why first lead is imp? Use case? you can write the leads pulled from lookup multiple rows to another table and then do a dedupe on the domain

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·

    or simply duplicate the table and dedupe on the doman

  • Avatar of Muhammad S.
    Muhammad S.
    ·
    ·

    this will keep the first entry and remove the duplicates on domain level

  • Avatar of Shoaib K.
    Shoaib K.
    ·
    ·

    no duplicates, but multiple leads from the same company, I don't want to reach out to multiple people at the same company at the same time

  • Avatar of Shoaib K.
    Shoaib K.
    ·
    ·

    so I want to filter out my lead list to 1 person per company, then 2nd 3rd etc

  • Avatar of Bo (.
    Bo (.
    ·
    ·

    Hey Shoaib,

    Got it! In this case, I'd recommend following these steps. This formula will give a number to each lead from the same company and allow you to process rows by their number. For example, you can start with lead number one, then move on to lead number two, and so on.

    Here's the exact formula to use: {{Unique ID}}?({{Lookup Multiple Rows in Other Table}}?.records?.findIndex(r=> r['Unique ID']?.toString()==={{Unique ID}}?.toString())> -1?{{Lookup Multiple Rows in Other Table}}?.records?.findIndex(r=> r['Unique ID']?.toString()==={{Unique ID}}?.toString())+1:2):2

  • Avatar of Channeled
    Channeled
    APP
    ·
    ·

    This thread was picked up by our in-app web widget and will no longer sync to Slack. If you are the original poster, you can continue this conversation by logging into https://app.clay.com and clicking "Support" in the sidebar. If you're not the original poster and require help from support, please post in 02 Support.