ipaas-portfolio

04 — Lead Trigger Dashboard

A live extension of the trigger -> filter -> transform -> action pattern from project 03, swapping the file/CLI-based workflow for an HTTP endpoint and a real-time dashboard. Simulates the most common Salesforce integration pattern: a Lead is created or updated, and downstream systems react to it.

trigger  ->  filter  ->  transform  ->  action

No external dependencies — the server is built entirely on Python’s standard library (http.server), no Flask/pip install required.

Run it

python lead_dashboard.py

Open http://127.0.0.1:5002 in a browser. In a second terminal, from the same folder, simulate a Salesforce Lead trigger:

curl.exe -X POST http://127.0.0.1:5002/webhook/lead/salesforce -H "Content-Type: application/json" -d "@sample_lead_event.json"

PowerShell alternative (avoids curl/alias quoting issues):

Invoke-RestMethod -Uri http://127.0.0.1:5002/webhook/lead/salesforce -Method Post -ContentType "application/json" -InFile sample_lead_event.json

The dashboard auto-refreshes every 3 seconds and shows the lead as Accepted. Edit sample_lead_event.json — set LeadSource to something outside the allowed list, or remove “Open” from Status — and resend to see a Filtered row instead.

Files

Extending it