IS LIVE
Book a Demo
All Posts
· Laine · 10 min read

Build a Salesforce Custom Object With AI (Step by Step)

Build a Salesforce custom object with AI — no admin, no Apex. A step-by-step look at what gets created, how it deploys, and how to keep it safe.

SalesforceCustom ObjectsAISentinelCRM
Terminal-style diagram of a Salesforce custom object being generated and deployed by AI

You can build a Salesforce custom object with AI — describe the thing your business actually tracks in plain English, and let the AI write the metadata, deploy it, and explain every line back to you. No admin queue, no Apex, no clicking through forty setup screens. This is the tutorial version of a claim we make a lot: your AI can be your CRM developer. Below, we build a real custom object end to end, then read the generated metadata line by line so you understand exactly what landed in your org.

What a custom object actually is (and when you need one)

Salesforce ships with standard objects: Accounts, Contacts, Leads, Opportunities, Cases. They cover the generic shape of a business. The moment your business tracks something that isn’t one of those — a property inspection, a loan draw, a coaching session, a warranty claim, a site visit — you have two bad options and one good one.

The bad options: cram the data into an unrelated standard object (Opportunities become a junk drawer), or paste it into a Notes field where nothing is queryable or reportable. The good option is a custom object: a purpose-built table with its own fields, records, relationships, and reports.

A custom object is the difference between “we sort of track that in a spreadsheet” and “that’s a first-class thing in our CRM with automation and dashboards hanging off it.” If you’ve ever wished you could report on something your CRM doesn’t officially know about, you needed a custom object.

Why people don’t build them (and why that’s changing)

Custom objects have always been the right answer and the annoying answer. Building one properly means understanding object settings, name fields, field types, picklist value sets, relationships, page layouts, and the Metadata API if you want it version-controlled and deployable. That’s admin work, and admin work means either learning it yourself or waiting on someone who already has.

So the object never gets built. The business bends around the CRM instead of the CRM bending around the business — which is exactly the pattern we argue against when we say to stop adapting to your CRM.

What’s changed is the hands. An AI that can read your org, write metadata, and deploy through the same Metadata API a developer would use can build the object in one sitting. You still make the decisions — what to track, what the fields mean — but you skip the mechanical tax. That’s the same shift behind Salesforce automation without hiring an Apex developer: the judgment stays human, the labor moves to the AI.

What we’re building in this tutorial

Let’s build something concrete. Say you’re a real estate investor and every deal involves inspecting the property. Today that lives in a spreadsheet nobody updates. We want it in Salesforce as a proper object so it’s reportable and linkable to the rest of the deal.

We’ll create a Property Inspection custom object with:

  • An auto-numbered name (INSP-0001, INSP-0002…) so records are easy to reference.
  • An Inspection Date (date field).
  • A Status picklist: Scheduled, Completed, Failed.
  • A Repair Estimate currency field.
  • A Notes long text area.

The pattern generalizes to anything you track. Swap “Property Inspection” for “Renewal,” “Onboarding Task,” or “Warranty Claim” and the steps are identical.

Step 1 — Describe the object in plain English

You don’t start with XML. You start with a sentence. Into your connected AI you type something like:

“Create a custom object called Property Inspection. Give it an auto-number name field formatted INSP-{0000}, an Inspection Date (date), a Status picklist with Scheduled, Completed, and Failed, a Repair Estimate currency field, and a Notes long text area. Deploy it to the sandbox first.”

That’s the whole “spec.” The AI’s job is to turn that into valid Salesforce metadata and get it into your org safely. Notice the last sentence — deploy to the sandbox first. Say it, and you get a dry run before anything touches production. (More on why that matters below.)

If you’ve never wired an AI up to your org, the mechanics of doing it safely are their own short guide: how to connect Claude to your Salesforce org the safe way.

Step 2 — What the AI actually creates (the metadata, explained)

Behind that one sentence, the AI writes Salesforce metadata — the XML definitions Salesforce uses to describe your org’s structure. Here’s the object definition it generates, Property_Inspection__c.object-meta.xml:

<?xml version="1.0" encoding="UTF-8"?>
<CustomObject xmlns="http://soap.sforce.com/2006/04/metadata">
    <label>Property Inspection</label>
    <pluralLabel>Property Inspections</pluralLabel>
    <nameField>
        <label>Inspection Number</label>
        <type>AutoNumber</type>
        <displayFormat>INSP-{0000}</displayFormat>
    </nameField>
    <deploymentStatus>Deployed</deploymentStatus>
    <sharingModel>ReadWrite</sharingModel>
</CustomObject>

And a field definition, Status__c.field-meta.xml:

<?xml version="1.0" encoding="UTF-8"?>
<CustomField xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>Status__c</fullName>
    <label>Status</label>
    <type>Picklist</type>
    <valueSet>
        <valueSetDefinition>
            <value><fullName>Scheduled</fullName><default>true</default></value>
            <value><fullName>Completed</fullName><default>false</default></value>
            <value><fullName>Failed</fullName><default>false</default></value>
        </valueSetDefinition>
    </valueSet>
</CustomField>

You don’t have to write this. But you should be able to read it, because reading it is how you confirm the AI built what you meant — not what it guessed. We’ll go line by line in a moment.

Step 3 — How it deploys: the Metadata API and the __c suffix

The AI doesn’t hand-edit your org through the UI. It packages the metadata and deploys it through Salesforce’s Metadata API, the same programmatic interface admins and developers use for repeatable, version-controlled changes. Salesforce’s own CustomObject and CustomField Metadata API documentation is the canonical reference for every property in those files.

Two things worth knowing:

First, the __c suffix. Every custom object and custom field in Salesforce ends in __c (“custom”). Your object becomes Property_Inspection__c; your status field becomes Status__c. That’s how Salesforce distinguishes your additions from its standard schema — and it’s why later you’ll query Property_Inspection__c, not Property Inspection.

Second, deployment is a transaction, not a stream of clicks. The Metadata API takes the whole package and either deploys it or fails it as a unit, with a result you can inspect. That’s a large part of why serious CRM changes belong on this API rather than a person poking at Setup — and, for the same reason, why AI CRM changes belong on a server, not a laptop, where the deploy runs from one accountable place. Salesforce Ben’s complete guide to the Metadata API is a good deeper read on how these deploys behave.

Step 4 — Read it back and confirm

Deploying isn’t the finish line — confirming is. Ask the AI to query the new object and return a couple of rows, or just describe it back. Because the object is real Salesforce schema now, a normal SOQL query works:

SELECT Name, Inspection_Date__c, Status__c, Repair_Estimate__c
FROM Property_Inspection__c
WHERE Status__c = 'Completed'
ORDER BY Inspection_Date__c DESC

If that returns without error, the object exists, the fields exist, and the API names match what you expect. You’ve verified the build without opening Setup once. (And if the idea of never writing SOQL yourself appeals — that’s the point; you describe the question, the AI writes the query.)

Line by line: reading the metadata your AI wrote

Here’s the habit that keeps you in control: skim the generated metadata and make sure each line says what you meant. Using the object file above:

  • <label> and <pluralLabel> are what humans see in the UI — “Property Inspection” and “Property Inspections.” Wrong here means wrong tab names, nothing worse.
  • <nameField> with <type>AutoNumber</type> and <displayFormat>INSP-{0000}</displayFormat> is the record’s headline field. AutoNumber means Salesforce assigns INSP-0001, INSP-0002, and so on — you never type a name. If you’d wanted people to type a name instead, this would say <type>Text</type>.
  • <deploymentStatus>Deployed</deploymentStatus> means the object is live and usable, not hidden as “In Development.”
  • <sharingModel>ReadWrite</sharingModel> is the default record visibility. ReadWrite means everyone with object access can see and edit records; Private would lock records to their owner. This is a real decision — if inspections are sensitive, you’d want to catch this line and change it.

And the Status field:

  • <type>Picklist</type> makes it a dropdown, not free text — so nobody logs “complete,” “Done,” and “finished” as three different states.
  • The three <value> entries are your options, and <default>true</default> on “Scheduled” sets the starting value.

Four minutes of reading, and you know exactly what’s in your org. That’s the difference between AI you supervise and AI you cross your fingers over.

How to keep this safe and recoverable

Here’s the honest part. Giving an AI the ability to deploy schema to your CRM is powerful, and power without visibility is how you end up afraid to use it. The answer isn’t to lock the AI down until it’s useless. It’s to make everything it does visible and reversible.

That’s the model we build Sentinel around: your AI gets a dedicated server with a connection to your org, and every action it takes is written to an audit log, with a snapshot taken before deploys and a sandbox-first pipeline for Salesforce so changes are tested before they reach production. If a deploy isn’t what you wanted, you can see exactly what happened and roll back to the snapshot — the full approach is laid out in logs, snapshots, and sandbox-first deploys.

To be clear about what that does and doesn’t do: it doesn’t stop your AI from making a change you’ll regret. Nothing honest can promise that. What it does is guarantee you can see the change and undo it — freedom to move, plus the visibility to recover. A custom object is a friendly first build precisely because it’s additive and easy to reverse, which makes it a great way to prove the workflow before you point the AI at anything scarier.

What this costs versus the alternative

A Salesforce admin building this by hand is fast — maybe an hour once you include the picklist, layout, and a test record. The real cost isn’t the hour; it’s the queue. If you don’t have an admin, the object waits weeks, or you pay a contractor a minimum engagement to do an hour of work.

With Sentinel, the same build is a sentence and a review. Sentinel is $500/month per Sentinel, plus a one-time $2,500 onboarding fee on your first Sentinel only — and one Sentinel builds unlimited objects, fields, and automations against your org. The math only gets more lopsided the more of these you build, which for most growing businesses is a lot. A custom object is rarely the last thing you’ll want; it’s usually the first of many, and the same one you’d hand to your AI as a starter build.

Try it

Pick the one thing your business tracks that your CRM doesn’t officially know about. That’s your first custom object. Describe it in a sentence, deploy it to a sandbox, read the metadata back, and confirm it with a query. If you want an AI with the hands to actually do it — and the audit log and snapshots to keep it recoverable — set up your Sentinel and start building.

Ready to see what AI can do for your business?

Start a Conversation