Instead of lead-based. I.e. process trial request emails individually,
in serial. This should fix a number of bugs we’ve seen recently.
Find previous via email query should be more accurate.
Send new contact email should be more accurate.
Process coco contacts in series to avoid race condition bugs when two
contacts belong on the same eventual Close lead.
School now optional
N/A placeholder on district field and don't save it if it's n/a
Updating required field error UI a bit, and there is some larger
refactoring needed here later.
NCES phone number for district only entries will currently be a child
school, will fix later.
Closes#3818
Fetching leads by name via Close.io API is not reliable. Adding two
checks to protect against sending duplicate emails:
1. Query leads via recipient email to avoid creating duplicate leads.
Duplicate leads can result in duplicate automatic emails sent.
2. Lookup lead email activity when sending mails, and compare email
templates and recipient address.
Moving user-specific information from customized fields to activity
notes
Lots of data reformatting and renaming
Lots of perf/readability improvements via async.parallel