Image showing an AI Agent detecting Lead duplicates in Salesforce

Lead duplicate detection with Agent Script

Finding Lead and Account Duplicates with Salesforce Agent Script Duplicate data is one of those CRM problems that is frustrating and can slow down the sales team. For this project, I built a Salesforce Agent Script agent that helps answer a very practical question: How confident are we that this Lead represents this Account? Instead of letting the agent guess, I connected it to deterministic Apex actions. The agent can have the conversation, but the scoring logic comes from Salesforce data and clear rules. ...

May 17, 2026 · Tarek Mustafa
Image showing a cartoonish image about using Agentforce to search for lead data

Lead Enrichment with Python and SerpAPI

Enriching Salesforce Leads with Place IDs I built a Python-driven automation that enriches Salesforce Leads using Google Place IDs as a stable identifier for businesses on Google Maps. The goal was to move beyond manual lead research. If a Lead already has a Place ID, the script can use that identifier to fetch structured business details and sync the useful fields back into Salesforce. The Three Ingredients 1. Salesforce Lead Object Configuration To prepare Salesforce for enrichment, I added custom fields to the Lead object. This included a Place ID field to serve as the lookup key, along with fields for Google rating, review count, website, and other useful business details. ...

April 11, 2026 · Tarek Mustafa
Image showing a cartoonish image about using Agentforce to search for lead data

Searching for Leads in Salesforce

Searching for Leads with Salesforce Agentforce Building on my lead enrichment automation, I wanted to create a more intuitive way for sellers to interact with their data. Instead of scrolling through list views, I built a custom Agentforce Agent that allows sellers to find high-value prospects simply by asking. The Three Ingredients 1. Custom Fields & Logic To make the search meaningful, I added industry-specific fields like Estimated Monthly Orders, Average Order Value, Cuisine, and delivery availability. I then built a Lead Score Flow that calculates a priority score using this formula: ...

April 7, 2026 · Tarek Mustafa
Image showing a cartoonish image about using a Salesforce for Lead Data Enhancement

Basic Lead Enrichment in Salesforce

Basic Lead Enrichment in Salesforce with Agentforce To get more hands-on experience with Salesforce automation, I used a Developer Edition org to build a basic AI-assisted lead enrichment flow. When a new Lead is created with limited company information, the automation uses Agentforce to look for missing contact details and then updates the Lead record. The goal was simple: reduce manual research for fields like phone number, email, and website, while still keeping the setup easy to inspect and improve. ...

December 26, 2025 · Tarek Mustafa