if they exist they'll be in one of the csvs
by search for I mean omit because if it is there then they received it since this isn't limited to just DL
ahh want me to run this again and add these to the NOT LIKE list? Want the query to remove duplicate leadids or would you like all the data?
I added these to the NOT LIKE column and we went from 3,893 missing email leads to 17,918 when I added these handful of emails to the NOT LIKE. Here is the query I am using.
l.id AS missing_leadid,
ct.name AS campaign_name,
ls.name AS status_name,
l.createdate,
'Missing Attorney Email' AS issue_type
FROM lead l
JOIN case_type ct ON l.casetypeid = ct.id
JOIN lead_status ls ON l.statusid = ls.id
WHERE
ls.id IN (1074, 1075) -- Should have triggered attorney emails
AND l.id NOT IN (
-- Exclude leads that already have attorney email records
SELECT DISTINCT lh.leadid
FROM lead_history lh
WHERE lh.username LIKE '%intakes@tortintakeprofessionals.com%'
AND lh.username NOT LIKE '%esigntracker@robot.zapier.com%'
AND lh.username NOT LIKE '%leadpool@robot.zapier.com%'
AND lh.username NOT LIKE '%tony@tortintakeprofessionals.com%'
AND lh.username NOT LIKE '%brettmichael@tortintakeprofessionals.com%'
AND lh.username NOT LIKE '%alan@tortintakeprofessionals.com%'
AND lh.username NOT LIKE '%luis@tortintakeprofessionals.com%'
AND lh.username NOT LIKE '%jackson@tortintakeprofessionals.com%'
AND lh.username NOT LIKE '%alicia@tortintakeprofessionals.com%'
AND lh.username NOT LIKE '%cassie@tortintakeprofessionals.com%'
AND lh.username NOT LIKE '%data@shield-legal.com%'
AND lh.username NOT LIKE '%management@tortintakeprofessionals.com%'
AND lh.username NOT LIKE '%screenersubmit@robot.zapier.com%'
AND lh.username NOT LIKE '%flags@robot.zapier.com%'
AND lh.username NOT LIKE '%rr@openjar.com%'
AND lh.username NOT LIKE '%commissionautomation@robot.zapier.com%'
AND lh.username NOT LIKE '%notifications@law.lawruler.net%'
AND lh.username NOT LIKE '%declinebot@robot.zapier.com%'
AND lh.username NOT LIKE '%hfhfhgjfjfjjffiiii2@gmail.com%'
-- New attorney emails to exclude
AND lh.username NOT LIKE '%akinard@elglaw.com%'
AND lh.username NOT LIKE '%Jonathan@elglaw.com%'
AND lh.username NOT LIKE '%AFFFIntake@elglaw.com%'
AND lh.username NOT LIKE '%dan@levinsonlegalgroup.com%'
AND lh.username NOT LIKE '%bencrumpcases@bencrump.com%'
AND lh.username NOT LIKE '%processing@simmonsfirm.com%'
AND lh.username NOT LIKE '%Intakes@sgghlaw.com%'
AND lh.username NOT LIKE '%kasia@sgghlaw.com%'
AND lh.username NOT LIKE '%parker@sgghlaw.com%'
AND lh.username NOT LIKE '%rmeadow@meadowlawfirm.com%'
AND lh.username NOT LIKE '%acrowell@meadowlawfirm.com%'
AND lh.username NOT LIKE '%jgordon@meadowlawfirm.com%'
AND lh.username NOT LIKE '%kyle@meadowlawfirm.com%'
AND lh.username NOT LIKE '%jbecker@meadowlawfirm.com%'
AND lh.username NOT LIKE '%claims@dicellolevitt.com%'
AND lh.username NOT LIKE '%biolabcontracts@smstrial.com%'
)
ORDER BY ct.name, l.createdate DESC
ill keep an eye out for the full list and we'll approach this again so I dont keep sending reports
More complete exclusion list = fewer false positives
how did the file jump up when it should be limiting based on the emails added?
it was because I'd added them to NOT LIKE -- here is the updated query that output 3,229
-- Find leads that should have gotten attorney emails but have NO attorney email records
SELECT
l.id AS missing_leadid,
ct.name AS campaign_name,
ls.name AS status_name,
l.createdate,
'Missing Attorney Email' AS issue_type
FROM lead l
JOIN case_type ct ON l.casetypeid = ct.id
JOIN lead_status ls ON l.statusid = ls.id
WHERE
ls.id IN (1074, 1075) -- Should have triggered attorney emails
AND l.id NOT IN (
-- Exclude leads that have ANY attorney email communication
SELECT DISTINCT lh.leadid
FROM lead_history lh
WHERE (
-- Look for ANY attorney email communication (not just intakes@)
lh.username LIKE '%@elglaw.com%'
OR lh.username LIKE '%@levinsonlegalgroup.com%'
OR lh.username LIKE '%@bencrump.com%'
OR lh.username LIKE '%@simmonsfirm.com%'
OR lh.username LIKE '%@sgghlaw.com%'
OR lh.username LIKE '%@meadowlawfirm.com%'
OR lh.username LIKE '%@dicellolevitt.com%'
OR lh.username LIKE '%@smstrial.com%'
OR lh.username LIKE '%intakes@tortintakeprofessionals.com%'
)
AND lh.username NOT LIKE '%esigntracker@robot.zapier.com%'
AND lh.username NOT LIKE '%leadpool@robot.zapier.com%'
AND lh.username NOT LIKE '%tony@tortintakeprofessionals.com%'
AND lh.username NOT LIKE '%brettmichael@tortintakeprofessionals.com%'
AND lh.username NOT LIKE '%alan@tortintakeprofessionals.com%'
AND lh.username NOT LIKE '%luis@tortintakeprofessionals.com%'
AND lh.username NOT LIKE '%jackson@tortintakeprofessionals.com%'
AND lh.username NOT LIKE '%alicia@tortintakeprofessionals.com%'
AND lh.username NOT LIKE '%cassie@tortintakeprofessionals.com%'
AND lh.username NOT LIKE '%data@shield-legal.com%'
AND lh.username NOT LIKE '%management@tortintakeprofessionals.com%'
AND lh.username NOT LIKE '%screenersubmit@robot.zapier.com%'
AND lh.username NOT LIKE '%flags@robot.zapier.com%'
AND lh.username NOT LIKE '%rr@openjar.com%'
AND lh.username NOT LIKE '%commissionautomation@robot.zapier.com%'
AND lh.username NOT LIKE '%notifications@law.lawruler.net%'
AND lh.username NOT LIKE '%declinebot@robot.zapier.com%'
AND lh.username NOT LIKE '%hfhfhgjfjfjjffiiii2@gmail.com%'
)
ORDER BY ct.name, l.createdate DESC;
the issue is their are no null so I am trying tricks to pull this data
Can you just grab one specific lead that you KNOW should have gotten an attorney email but didn't, and show me everything about it?
And give me the lead id so I am not shooting in the dark?
And give me the lead id so I am not shooting in the dark?
the reason being is that leadid is duplicated 39 times and is sent to dozens of people ... ill think on it tonight and give it another whirl in the morning
different campaigns or same?
im digging on it now -- whatever, doesnt matter I am just trying to fully understand these flows and why and what is happening so I don't keep throwing around SQL queries without the full picture
So for lead 88372: • It went through the process and got DECLINED • It sent internal notifications to Shield Legal team But it never got sent to an external law firm attorney
still making a clear picture of whats going on
there are a variety of different reasons and yes I will grab a few more
thats what makes this more abstract, the variety
Can you show me an example of a lead that DID get sent to an external attorney correctly?
Hey Carter -- still waiting on these examples. I need 3 of each at least. This is something I am going to have to really dig on the entire logs of the leadid you send over so I can see these journeys and I can identify a way to get this data because brute forcing SQL is worthless until I can have a better picture.
ok thanks...let me look into that now...I have some free time
lol thanks. Yeah it's been a good one.
so in the meeting today we discussed also a good point of reference to make sure they were signed docs would be esigned date as a main filed finding completed docs...obviously the email is the hardest part
yeah once I can see some solid variations between missing/not sent versus sent. I can dive on this. Otherwise I am just brute forcing SQL to see if we can pull them without me seeing the full picture
I was just looking over the list you sent of lead status
I was absorbed in this new ai agent for the tort finder. Didnt even realize the time
yeah Dustin said it would take a bit of both
Find a handful you know were not sent. And a handful for sure that were properly sent. The data is so ... strewn, if that is a word.
Once I can really see their journeys through the system I should be able to identify how to programmatically differentiate them.
do you have an updated list of what you have sorted so far since we found more emails to see if it filtered them out?
Just what I sent over. No nulls exist in the database and every lead is sent to someone. It's a mess. Once I have those things from you I will have some more tools to actually sort this out.
Our data is .. so patchy .. and different everywhere,
It's very difficult to answer some of these questions unless I actually can see what the journeys look like. Why? I am hoping to find some markers that will let me alter these SQL statements,
ok looking through a few of these some have api integration too
here is an example of that 758517
its a mess carter lol thats why this is so hard to see
Create SEC webhook triggered - Response: HTTP Code: OK - Reponse: {"attempt":"019852e4d0eb009ace2ae73a3960df71","id":"019852e4-d0eb-009a-ce2a-e73a3960df71","requestid":"019852e4d0eb009ace2a_e73a3960df71","status":"success"}
just find a handful of IDs that absolutely the lawyer did not get
that is the message for that
im going to have to pull the database entries for the lead ids and really pin down whats going on and what is consistant
thats why the CSV has some and some were sent, it's the consistency i am going to be looking for once you get the ids -- because then i can have a clear picture and identify some marker
I agree. but once we get this formula down on what pulls it we will be able to create a db search in the future lets say every 15 days to see if this happens again
ok, I am sure setting up some sort of automation would be bad once we figure out how to search the db.
i run our compliance surveillance pipeline for them: finds new employees from the last 60 days, pull 10 audio files, transcribes and then uses LLM to answer questions.
it might be easier moving forward to since data seems to be getting a little more consistent
once we understand the journey well be able to nail it down
yeah I saw that audio surveillance...it was pretty cool
wait till you see the transcription chat bot for the call center and review guys -- waiting on Tyson to ahdnle some permissions issue int he DB for some users using the routes
Once he is done with that I am going to hold a small workshop
I wish there was a way for us to know which campaigns are set up with api and which ones are email triggered
Another thing we'll have to drill down once we sort this out.
If it's possible. I'll figure it out.
seems like there should be a basic trigger or tag or something that would pull if there is api present
Yeah hopefully the same approach with studying the journeys can reveal some marker (that is unknown to us right now outside of guesses)
brb got to finish this thing for dustin
oh we've got all those just get me like 5-10 lead ids you know sent and the ones you know didnt
I know but I have to go through each of these to see which ones didn't send
ok so you do have them all because the first list you had didn't have them all
trying to get through the list of the 17000 leads to find the ones that didn't send
no rush, i have to finish a few projects
lets keep it all in one csv you can send over
its just guess work at this point. If I get lucky to grab an id and find one
haha and once you find them I have to figure out wtf is going on with their journey and find some markers so we can make a consistent SQL query so we can setup an automation lolol
maybe you can run the report again and see if it does a better job pulling out the ones that have emails. I am just randomly grabbing and ID and putting into lawruler, looking in the activity logs to see if I see an email
give me an hour to finish this up and ill run another one
this file is much smaller -- not sure if it is any more help though.
518914 500122 426639 91557 91538 70144 626918 622920 34822 544709 541627 504208 468995 396679 360090 319598 421278 445321 444723 127688 127268 811863 808665 765493 678965 231736 775434 770586 766375 765087 764979 764057 62220 801452 776791 776547 776468 776224 753621 739472 714764 682252 704853 778246 479200
not sure about the crump files as there might be a different process but here are a few I found
awesome -- to confirm this list is ones that were not sent
lmk and ill start diving on this today
the only ones I would need to double check on are the crump ones. They so email delivered but they do not have an email address....so maybe there is an internal process. I will check that out
well for these above, all were 100% for sure no email sent to the lawyer, you put together a good list above
no, I had some crump ones in there, I just need to confirm or you could ask someone in integration if that means an email was sent
I'll give you an id for one
let me roll through some of these .. ill focus on this today
if you look on 2/9/24 it says system Email Status: delivered.
that is the one I am not sure about since we work with Crump here
yeah the issue is it ALWAYS sends an email to Someone
but usually it shows an email address where it sends...on crumps they don't
"AmexBenCrump@onderlaw.com, jon@bencrump.com",98129,AMEX Discrimination - Crump/Onder - Shield Legal,1075,Signed e-Sign FINAL
Ok. Digging on this. I have found something obscure.
Lead # 794693 -- 07/10/2025 03:53:22 PM Tort Intake Email sent via Scheduled AFFF PFAS Military Base Exposure - Levinson - ELG - TC SA - Shield Legal was triggered to , akinard@elglaw.com,Jonathan@elglaw.com,AFFFIntake@elglaw.com,dan@levinsonlegalgroup.com by Tort Intake
Where you see "Shield Legal was triggered to ," and then some emails.
Lead #623038 -- Email sent via Scheduled CA Juvenile Detention Abuse - Crump - Slater - Shield Legal - Declines was triggered to , bencrumpcases@bencrump.com,intake@sssfirm.com,selene@sssfirm.com,aslater@sssfirm.com by Tort Intake
Lead # 91781 -- 11/10/2022 10:50:07 AM Tort Intake Email sent via Scheduled AMEX Discrimination - Crump/Onder was triggered to , by Tort Intake Just like in the Terrell Blackmon case, this shows: "triggered to ," with what appears to be a blank recipient field. Followed by "Email Status : delivered" and "Email Status : opened"
So it seems we're looking in the logs for the marker: "Crump/Onder was triggered to , by Tort Intake"
ill give you an update before I leave this is much more abstract of an issue than I thought
the only other piece would be if an api was triggered so there would be success or some sort of payload response
you'd think that -- i am going to spend more time on this
ill let you know in a bit where I am with this
I do know I have seen quite a few with the api success response so it does exist
its just hard to believe how ... hard it is to get answers from the data. I am hoping with Tyson taking ownership of the data that this will eventually be cleaner
Between law ruler, looker, our postgres, and other data sources. Everything has wrong, missing or different data.
yeah I know...it's everywhere.
thanks for digging in
also ... if you need a list of all the lawyers, for whatever reason, keep this on hand, these were the unique emails for lawyers only I pulled from a list of a few hundred thousand signed and the declined leads.
I was doing a brief look and I don't see an openjar.com on there
that was a marketing firm that popped up as well
this was just from the signed e-sign final and the declined I removed openjar
no but they did work for them
signed retainers and sent it to them
then openjar claimed it as theirs lol
my old company did that a lot for people
so keep that one in there for cases being delivered or not