#!/usr/bin/env python3
"""
create_compliance_campaign.py — Create the FCC Compliance Alert campaign
for Listmonk list 6 (FCC Carriers - Compliance Alert).
Uses the same HTML email helpers as create_campaigns.py.
Run: python3 scripts/workers/create_compliance_campaign.py
"""
import requests
import sys
LISTMONK_URL = "https://lists.performancewest.net"
AUTH = ("api", "6X1rKPea61N4rZ1S65Hx5zvqzbCj30F6nvEe9oVGH_Y")
COMPLIANCE_CHECK_URL = "https://performancewest.net/tools/fcc-compliance-check"
ORDER_URL = "https://performancewest.net/order/fcc-compliance"
PHONE = "1-888-411-0383"
EMAIL_ADDR = "info@performancewest.net"
CONTACT = (
f'Email {EMAIL_ADDR} '
f'or call {PHONE}'
)
# ── HTML helpers (same as create_campaigns.py) ─────────────────────────
def hdr(eyebrow, headline, sub=None):
s = f'
{sub}
' if sub else ''
return (
''
''
''
' | '
'Telecom Compliance | '
'
| '
''
'| '
f' {eyebrow} '
f'{headline}{s}'
' |
|
'
)
def alert_bar():
return (
''
'| '
' '
'\U0001F6A8 ACTION REQUIRED — Your FCC filings appear to be past due'
' |
'
)
def P(t):
return f'{t}
'
def PS(t):
return f'{t}
'
def H2(t):
return f'{t}
'
def UL(*items):
return (
''
+ "".join(f'- {i}
' for i in items)
+ '
'
)
def cta(text, url):
return (
''
)
def warning_box(text):
return (
''
)
def info_box(text):
return (
''
)
def ftr():
return (
''
)
def assemble(hdr_html, bar_html, body_html, ftr_html):
inner = (
hdr_html + bar_html
+ f''
+ ftr_html
)
return (
''
''
)
# ═══════════════════════════════════════════════════════════════════════
# Campaign body
# ═══════════════════════════════════════════════════════════════════════
body = (
P("{{ .Subscriber.Attribs.company }},")
+ warning_box(
"\U0001F6A8 Our records indicate your carrier appears to have one or more "
"FCC compliance filings that are past due. "
"Failure to maintain current filings can result in forfeitures, red-light "
"status on your FRN, and disruption to your ability to do business."
)
+ P(
"The FCC has been aggressively enforcing filing deadlines "
"in 2025\u20132026. Carriers with overdue filings face:"
)
+ UL(
"Robocall Mitigation Database (RMD) \u2014 failure to "
"recertify by March 1 can lead to removal from the RMD, which means "
"downstream carriers are required to block your traffic "
"within 30 days of the FCC\u2019s removal order",
"CPNI Annual Certification \u2014 overdue certifications "
"under 47 CFR \u00A7 64.2009 carry forfeitures up to $500,000 "
"per violation",
"Form 499-A \u2014 late filers face retroactive USF "
"contributions plus interest, and USAC will place a red-light "
"hold on your FRN until the filing is current",
"BDC (Broadband Data Collection) \u2014 carriers who "
"provide broadband or retail voice must file semi-annually; non-filers "
"face enforcement action",
)
+ H2("Check your compliance status \u2014 free, instant.")
+ P(
"We built a free compliance check tool that scans your FRN against "
"FCC databases and tells you exactly which filings are current and "
"which need attention. No login required \u2014 just enter your FRN."
)
+ ''
+ H2("We handle the filings for you.")
+ P(
"Performance West specializes in FCC regulatory compliance. We file "
"499-A, CPNI certifications, RMD registrations, STIR/SHAKEN, BDC, "
"and CALEA plans for carriers across the US. Fixed pricing, no hourly "
"billing, and we handle everything from document preparation to portal "
"submission."
)
+ info_box(
"Bundle discount: Order 2 or more compliance services "
"and save 15% automatically. Most carriers need at least 499-A + CPNI + RMD."
)
+ UL(
"Form 499-A filing \u2014 $499",
"CPNI Annual Certification \u2014 $149 \u2014 includes CPNI deployment guide so you know how to properly deploy customer verification \u2014 \u23F0 same-day service available",
"RMD Registration / Recertification \u2014 $219 + $100 FCC filing fee \u2014 \u23F0 same-day service available",
"New Carrier Onboarding Bundle (everything) \u2014 $1,799",
)
+ ''
+ ''
+ ''
+ '| ⏱ | '
+ ''
+ ' Same-Day Filing Available '
+ 'CPNI and RMD filings can be completed and submitted the same day you order. '
+ 'Get back into compliance before the end of business today. '
+ ' |
|
'
+ cta("View All Compliance Services \u2192", "https://performancewest.net/services/telecom")
+ H2("Flexible payment options.")
+ P(
"We accept credit/debit cards, ACH bank transfer (no fee), "
"PayPal, Klarna (pay in 4 installments), "
"and cryptocurrency (BTC, ETH, USDC, and more). "
"Pay however works best for your business."
)
+ P(
"All compliance filing fees are tax deductible as "
"ordinary business expenses under IRC \u00A7 162."
)
+ PS(f"Questions? {CONTACT} \u2014 we\u2019re happy to review your filing status at no cost.")
+ P("\u2014 Performance West Compliance Team")
)
# ═══════════════════════════════════════════════════════════════════════
# Create the campaign
# ═══════════════════════════════════════════════════════════════════════
def create_campaign():
s = requests.Session()
s.auth = AUTH
campaign_html = assemble(
hdr(
"FCC Compliance Alert",
"Your FCC filings appear to be past due.",
"Immediate action recommended to avoid enforcement",
),
alert_bar(),
body,
ftr(),
)
r = s.post(f"{LISTMONK_URL}/api/campaigns", json={
"name": "COMPLIANCE ALERT \u2014 FCC filings past due",
"subject": "\U0001F6A8 ACTION REQUIRED \u2014 PAST DUE: Your FCC compliance filings need immediate attention",
"lists": [6], # FCC Carriers - Compliance Alert
"type": "regular",
"content_type": "html",
"body": campaign_html,
"status": "draft",
"headers": [{"key": "Reply-To", "value": "info@performancewest.net"}],
}, timeout=30)
if not r.ok:
print(f"ERROR {r.status_code}: {r.text[:200]}", file=sys.stderr)
return None
cid = r.json().get("data", {}).get("id", "?")
print(f"Campaign created: [{cid}] COMPLIANCE ALERT")
print(f"Subject: \U0001F6A8 ACTION REQUIRED \u2014 PAST DUE: Your FCC compliance filings need immediate attention")
print(f"List: 6 (FCC Carriers - Compliance Alert)")
print(f"Status: draft (review in Listmonk before sending)")
return cid
if __name__ == "__main__":
create_campaign()