Clay Icon

Delete Clay table if company doesn't exist in HubSpot

Β·
Β·

Can I insert a condition such as if company does not exist in HubSpot, then delete in Clay table?

  • Avatar of Clay Team
    Clay Team
    APP
    Β·
    Β·

    Great question! We don't currently have the option to delete values based on conditions like this but may be part of an update down the road. For now, you can still have a separate view in your table where you filter and surface them, so then you can go into once a week or so and delete them

  • Avatar of Willy H.
    Willy H.
    Β·
    Β·

    do I lose my enrichments I've already ran?

  • Avatar of Clay Team
    Clay Team
    APP
    Β·
    Β·

    If you delete the record, yep, the enrichment gets lost. If you don't want to enrich those that don't exist in your CRM, you can still use their Lookup feature to determine if you have them or not, then that can be part of subsequent conditional formulas that only run if they do exist.

  • Avatar of Willy H.
    Willy H.
    Β·
    Β·

    No I mean for the records I want to keep

  • Avatar of Clay Team
    Clay Team
    APP
    Β·
    Β·

    Oh, no, if you're filtering and deleting those that you don't want, all the rest should remain in the table.

  • Avatar of Willy H.
    Willy H.
    Β·
    Β·

    If I delete a company in Hubspot, I'd want that to reflect in the Clay table, and if I create another view with the current HS companies

  • Avatar of Willy H.
    Willy H.
    Β·
    Β·

    I don't want to re-enrich

  • Avatar of Willy H.
    Willy H.
    Β·
    Β·

    that would eat up my credits

  • Avatar of Willy H.
    Willy H.
    Β·
    Β·

    does that make sense?

  • Avatar of Clay Team
    Clay Team
    APP
    Β·
    Β·

    Yep, then hubspots lookup integration is how you can prevent that since there's no option to auto-delete from Clay yet.

  • Avatar of Clay Team
    Clay Team
    APP
    Β·
    Β·

    But the issue is that if you do delete it from HS then nothing will come back, so I also understand that. Do you have a DNC list instead?

  • Avatar of Clay Team
    Clay Team
    APP
    Β·
    Β·

    Maybe that could be a workaround, adding those separately to another Clay DNC table... Here's an example of how to setup a lookup for DNC - https://www.loom.com/share/80d613c10d5248f6bfc662cc95c8023d Based on matches, you can set up conditional formulas so existing records don't get enriched or contacted.

  • Avatar of Willy H.
    Willy H.
    Β·
    Β·

    damn it I lost them all

  • Avatar of Willy H.
    Willy H.
    Β·
    Β·

    any rollback features?

  • Avatar of Clay Team
    Clay Team
    APP
    Β·
    Β·

    Usually when you delete rows a purple banner to undo it appears at the bottom but if you missed it then happy to add more credits so you can re-run it. Undoing column/enrichments is a bit difficult in the backend so we don't as an option, also maybe because of API calls involved.

  • Avatar of Willy H.
    Willy H.
    Β·
    Β·

    Well I created another view, then in the copy of the view deleted all the companies

  • Avatar of Willy H.
    Willy H.
    Β·
    Β·

    then tried to re-import the companies

  • Avatar of Clay Team
    Clay Team
    APP
    Β·
    Β·

    Ahh, I see, no filters applied so all were selected instead?

  • Avatar of Willy H.
    Willy H.
    Β·
    Β·

    but then I lost all of the enrichments

  • Avatar of Willy H.
    Willy H.
    Β·
    Β·

    tbh honest I don't know how many credits it cost

  • Avatar of Clay Team
    Clay Team
    APP
    Β·
    Β·

    how many records and what enrichments did you have? it could be estimated

  • Avatar of Willy H.
    Willy H.
    Β·
    Β·

    465 and just the LinkedIn enrichment

  • Avatar of Willy H.
    Willy H.
    Β·
    Β·

    but here's the odd part

  • Avatar of Willy H.
    Willy H.
    Β·
    Β·

    Default view v. copy view

  • Avatar of Willy H.
    Willy H.
    Β·
    Β·

    I'm not sure why it deleted both views when I only asked it to delete the views from one of them...

  • Avatar of Clay Team
    Clay Team
    APP
    Β·
    Β·

    Got it, so that enrichment only costs 1 credit per row. I'll add them back so you can run it again.And to clarify, all data in your table is stored there, so if it's deleted from one view it's also removing the source. Views don't make a copy of your data set.

  • Avatar of Willy H.
    Willy H.
    Β·
    Β·

    Oh

  • Avatar of Willy H.
    Willy H.
    Β·
    Β·

    I didn't know that

  • Avatar of Willy H.
    Willy H.
    Β·
    Β·

    I thought each view was independent

  • Avatar of Clay Team
    Clay Team
    APP
    Β·
    Β·

    That's why we recommend applying filters to each view, that way you can segment them better and only work with the ones you want to keep

  • Avatar of Willy H.
    Willy H.
    Β·
    Β·

    so how would I filter the companies no longer in the CRM

  • Avatar of Willy H.
    Willy H.
    Β·
    Β·

    like what would I apply?

  • Avatar of Clay Team
    Clay Team
    APP
    Β·
    Β·

    I would only run or re-run this integration after you remove records in your CRM

    cf8df769-e7e4-4057-8e5a-3fd8a34daaea.png(33 kB)
  • Avatar of Clay Team
    Clay Team
    APP
    Β·
    Β·

    if you imported the list into Clay before deleting them from hubspot, then that's the way. You can then delete the ones that return as "no company found"

  • Avatar of Clay Team
    Clay Team
    APP
    Β·
    Β·

    Added the credits back into the account too :)

  • Avatar of Willy H.
    Willy H.
    Β·
    Β·

    !!!

  • Avatar of Willy H.
    Willy H.
    Β·
    Β·

    you're the man

  • Avatar of Willy H.
    Willy H.
    Β·
    Β·

    got it!