WhatsApp Business Template Rejection Guard & Compliance Linter
Check selected WhatsApp template structure and flag possible policy issues before submission. Meta reviews and approves templates; this linter cannot guarantee acceptance.
Problem it addresses
Build an open-source WhatsApp Business template compliance checker: 1) Python linter (wa_template_linter.py) scanning template text for disallowed promotional trigger words, sequential variable constraints ({{1}}, {{2}}), and required unsubscribe/opt-out phrasing, 2) Four illustrative template examples; they are not pre-tested or Meta-approved (Order Updates, COD Verification, Cart Abandonment, Back-in-Stock), 3) Meta policy cheat sheet.
Who it is for
BOTH operating in high-growth e-commerce, digital publishing, and direct-response marketing across Saudi Arabia, UAE, and Egypt.
What is inside
Key files listed in the README repository architecture:
config/meta_rejection_rules.jsondata/illustrative_templates.jsonexamples/valid_and_rejected_templates.jsonLICENSEpolicies/meta-whatsapp-policy-summary.mdREADME.mdreports/linter_results.csvsrc/template_guard.pysrc/wa_template_linter.pytemplates/illustrative_templates_ar.jsontests/test_guard.pytests/test_linter.py
How to evaluate and use it
- Read the README first and confirm that the documented problem matches your use case.
- Inspect the listed files to find the data, tools, templates, and tests relevant to your task.
- Follow the repository’s Quick Start and check prerequisites before running commands.
- Compare outputs with documented examples and review limitations before using them in a decision or client workflow.
Quick Start from the README: python -m unittest discover -s tests · python src/template_guard.py --help
Scope and limitations
- Variable Parameter Spacing: Flags templates where dynamic variables (e.g. {{1}}) lack surrounding space or contain trailing punctuation that causes Meta API rejections.
- Category Classification Alignment: Audits template text to ensure Marketing, Utility, and Authentication templates are correctly declared per Meta pricing tiers.
- Prohibited Content Screening: Screens text against Meta commercial policies prohibiting deceptive promises, sensitive health claims, and gambling terms.
This page summarizes the available documentation; it does not establish performance or business results. Verify data and prerequisites before use.