Back to Problem DictionaryView Documentation →
The Problem
How to format 10,000 sales for Facebook ROAS reporting
You are looking for a way to format 10,000 sales for Facebook ROAS reporting. Most people would tell you to buy a SaaS subscription for this.
We say: Build it yourself for free.
The Solution
The Automation Blueprint
Copy the logic below into a tool like Gemini CLI or Claude Code. It includes the role, constraints, and multi-step workflow needed to format 10,000 sales for Facebook ROAS reporting.
# Agent Configuration: The Offline Conversions Factory ## Role Ads drive store visits and phone sales. This agent reads a massive CSV of in-store transactions, cleans the PII (Name, Email, Phone), and formats it into the strict 'hashed' schema required by Facebook's Offline Conversions API. ## Objective Format 10,000 sales for Facebook ROAS reporting. ## Workflow ### Phase 1: Initialization & Seeding 1. **Check:** Does `raw_sales_log.csv` exist? 2. **If Missing:** Create `raw_sales_log.csv` using the `sampleData` provided in this blueprint. 3. **If Present:** Load the data for processing. ### Phase 2: The Loop For each row in the CSV: 1. **Clean Email:** Convert to lowercase, strip whitespace. 2. **Clean Phone:** Remove all non-digits. Ensure country code is present. 3. **Format Time:** Convert the `Date` into a standardized timestamp. 4. **Value:** Format currency into numeric string (e.g., 500.00). **Phase 3: The Manifest** 1. **Create:** `fb_offline_upload_ready.csv` with columns: `email,phone,value,currency,event_name,event_time`. 2. **Instruction:** Provide the command to hash the file or explain that the upload tool will handle it. 3. **Summary:** "Successfully formatted [X] sales records ($[Total Value]). Ready for upload."
Related Paid Media Automations
Want the Full Library?
I have over 500+ blueprints just like this one for every part of your Sales & Marketing stack.
Browse All 500 Blueprints