Session Summary
Sam asked how to connect the Meta Ads API to Litify Salesforce and whether Codex can carry the work.
What Was Accomplished
- Loaded Litify live-default guidance, which requires repo plus live Litify validation before important Salesforce assumptions.
- Checked the routines-build repo for existing Meta Ads, Facebook, Conversions API, Lead Ads, leadgen, fbclid, fbc, fbp, and UTM integration code. No existing Meta Ads to Litify routine was found in this repo.
- Confirmed the local AGENTS.md pointer references AGENT-TOOL-MANIFEST.md, but that file was not present in the current repo path.
- Checked current primary documentation sources for the integration shape:
- Meta Lead Ads retrieval/webhook concepts.
- Meta Conversions API for sending CRM/server events back to Meta.
- Salesforce REST upsert by External ID.
- Produced a practical architecture recommendation for two loops: inbound lead capture and outbound conversion feedback.
Recommendation
Build this as a small owned integration service, not as a browser-only Zap. The best first version is:
- Meta Lead Ads webhook receives a leadgen event.
- Service retrieves full lead details from Meta Graph API.
- Service normalizes phone, email, name, source campaign, ad set, ad, form, and tracking identifiers.
- Service upserts into Litify/Salesforce using a unique external ID such as Meta_Lead_ID__c on the correct intake or web-form object.
- Service logs every event locally and to Notion or routine outputs.
- A scheduled outbound job reads qualified Litify milestones and sends server-side events back to Meta Conversions API.
Suggested Next Steps
- Verify live Litify objects and fields before any writes, especially whether Meta leads should land first on Web_Form__c, litify_pm__Intake__c, Lead, or a staging object.
- Check whether fields exist for Meta Lead ID, form ID, page ID, campaign/ad/adset IDs, fbclid, fbc, fbp, UTM source, UTM campaign, and source platform.
- Decide whether to use a Cloudflare Worker, Pipedream, or repo-hosted scheduled service. Cloudflare Worker is likely the cleanest cloud-first path if secrets and retry logging are set up correctly.