ifta: 3-touch business-day cadence + 'I already filed it' suppression

- Multi-touch reminders at 10/7/4 BUSINESS days before each deadline (weekends
  skipped; biz-day math so a touch never lands purely on a weekend with no
  runway). Escalating tone soft -> urgent -> last-chance, with the 'almost too
  late to DIY, we can still file it' angle so it's a convenience sale, not a free
  reminder service. ifta_touch_no tracks the highest touch sent so each touch
  hits only carriers below that level; never repeats a touch.
- 'I already filed it' one-click link: HMAC-tokenized GET /api/v1/ifta/filed
  (token matches between Python builder and api/src/routes/ifta.ts -- verified
  identical output), records ifta_self_filed_at, friendly confirmation page,
  stops further touches this cycle + gives DIY-vs-prospect signal. Builder
  excludes self-filed carriers.
- migration 094 (ifta_touch_no) + 095 (ifta_self_filed_at); cycle reset clears
  both each new quarter. Verified: biz-day touch schedule, token cross-match.
This commit is contained in:
justin 2026-06-13 23:41:14 -05:00
parent 872154ebf7
commit 3d4226e95c
6 changed files with 220 additions and 40 deletions

View file

@ -4,8 +4,9 @@
</div>
<div style="background:#fff;border:1px solid #e2e8f0;padding:32px;border-radius:0 0 12px 12px">
<p style="font-size:15px;color:#374151;line-height:1.6">{{ .Subscriber.Attribs.company }},<br>DOT# {{ .Subscriber.Attribs.dot_number }}</p>
<h1 style="font-size:22px;color:#dc2626;margin:16px 0">Your IFTA quarterly return is due {{ .Subscriber.Attribs.ifta_due_date }}.</h1>
<p style="font-size:15px;color:#374151;line-height:1.6">If you run interstate, your IFTA fuel-tax return for <strong>{{ .Subscriber.Attribs.ifta_quarter }}</strong> is coming due. Miss it and you face:</p>
<h1 style="font-size:22px;color:#dc2626;margin:16px 0">{{ .Subscriber.Attribs.ifta_headline }}</h1>
<p style="font-size:15px;color:#374151;line-height:1.6">{{ .Subscriber.Attribs.ifta_urgency }}</p>
<p style="font-size:15px;color:#374151;line-height:1.6">Your IFTA fuel-tax return for <strong>{{ .Subscriber.Attribs.ifta_quarter }}</strong> is due <strong>{{ .Subscriber.Attribs.ifta_due_date }}</strong>. Miss it and you face:</p>
<ul style="font-size:15px;color:#374151;line-height:1.8">
<li><strong>Late penalties</strong> ($50 or 10% of net tax due, whichever is greater)</li>
<li><strong>Interest</strong> on unpaid tax in every member jurisdiction</li>
@ -32,6 +33,10 @@
<a href="{{ .Subscriber.Attribs.lp_link }}&utm_source=listmonk&utm_medium=email&utm_campaign=ifta-quarterly@TrackLink" style="display:inline-block;padding:14px 36px;background:#f97316;color:#fff;font-weight:700;border-radius:8px;text-decoration:none;font-size:16px">10-4 - File My IFTA Return &rarr;</a>
</div>
<p style="font-size:14px;color:#64748b;line-height:1.6">Or call us directly at <a href="tel:8884110383" style="color:#f97316;font-weight:600">(888) 411-0383</a>.</p>
<div style="text-align:center;margin:18px 0 4px;padding-top:14px;border-top:1px solid #e5e7eb">
<p style="font-size:13px;color:#94a3b8;margin:0 0 6px">Already took care of this quarter?</p>
<a href="{{ .Subscriber.Attribs.ifta_filed_link }}" style="font-size:13px;color:#64748b;text-decoration:underline">I already filed it - stop reminding me</a>
</div>
<p style="font-size:14px;color:#64748b">Performance West Inc.<br>DOT Compliance Services</p>
</div>
<div style="text-align:center;padding:16px;font-size:11px;color:#94a3b8"><a href="https://performancewest.net" style="color:#94a3b8">performancewest.net</a> &middot; (888) 411-0383</div><div style="text-align:center;padding:0 16px 18px;font-size:11px;color:#94a3b8;line-height:1.7">Gotta hit a 10-100 and pull off this channel? <a href="{{ UnsubscribeURL }}" style="color:#94a3b8;text-decoration:underline">Unsubscribe here</a>.<br>Performance West Inc. &middot; 525 Randall Ave Ste 100-1195, Cheyenne, WY 82001</div>