A Salesforce API mock for creating CRM records.
Give your agent seeded accounts, contacts and opportunities. Check its record-creation request, then query the record’s fields and account relationships with SOQL.
contact_createdCalls POST /services/data/v67.0/sobjects/Contact
Starting records
contacts
- Id
003000000000001AAAerin.walsh@ridgeway-robotics.example
accounts
- Id
001000000000001AAA- Name
Ridgeway Robotics
Connect your agent to the Salesforce mock
When ancha runs your agent, it sets:
SALESFORCE_INSTANCE_URLSALESFORCE_ACCESS_TOKEN
Point the client you already use at them.
const response = await fetch(process.env.SALESFORCE_INSTANCE_URL + '/services/data/v67.0/query?q=' + encodeURIComponent('SELECT Id, Name FROM Account'), { headers: { Authorization: 'Bearer ' + process.env.SALESFORCE_ACCESS_TOKEN } });
const accounts = await response.json();Locally, ancha runs your agent as an ordinary process, so keep real Salesforce credentials out of its environment.
See all 14 endpoints
composite
/services/data/v67.0/compositequery
/services/data/v67.0/query/services/data/v67.0/query/:locatorsobjects
/services/data/v67.0/sobjects/services/data/v67.0/sobjects/:type/services/data/v67.0/sobjects/:type/services/data/v67.0/sobjects/:type/:field/:value/services/data/v67.0/sobjects/:type/:field/:value/services/data/v67.0/sobjects/:type/:id/services/data/v67.0/sobjects/:type/:id/services/data/v67.0/sobjects/:type/:id/services/data/v67.0/sobjects/:type/describeversions
/services/data//services/data/v67.0Seed your own data
The data the Salesforce mock starts with on every run, cut to a few records. ancha twins seed salesforce prints every field.
Full seed YAML
twins:
- salesforce
seed:
salesforce:
org:
id: 00D000000000001AAA
name: Acme
access: {}
accounts:
- Id: 001000000000001AAA
Name: Ridgeway Robotics
Industry: Manufacturing
Type: Prospect
Website: https://ridgeway-robotics.example
NumberOfEmployees: 850
AnnualRevenue: 125000000
External_Id__c: ridgeway-robotics
contacts:
- Id: 003000000000001AAA
FirstName: Erin
LastName: Walsh
Email: erin.walsh@ridgeway-robotics.example
Title: VP Operations
AccountId: 001000000000001AAA
External_Id__c: erin-ridgeway
leads:
- Id: 00Q000000000001AAA
FirstName: Theo
LastName: Reed
Company: Beacon Logistics
Email: theo.reed@beacon-logistics.example
Status: Working - Contacted
LeadSource: LinkedIn
External_Id__c: beacon-theo
opportunities:
- Id: 006000000000001AAA
Name: Ridgeway Robotics — Analytics rollout
AccountId: 001000000000001AAA
StageName: Proposal/Price Quote
CloseDate: 2026-11-30
Amount: 96000
Probability: 60
CampaignId: 701000000000001AAA
External_Id__c: ridgeway-rollout
campaigns:
- Id: 701000000000001AAA
Name: Ridgeway Robotics Q4 pilot
Type: Advertisement
Status: In Progress
IsActive: true
StartDate: 2026-10-01
EndDate: 2026-12-31
BudgetedCost: 12000
ActualCost: 3400
ClientAccount__c: 001000000000001AAA
External_Id__c: ridgeway-q4-pilot
campaignMembers:
- Id: 00v000000000001AAA
CampaignId: 701000000000001AAA
ContactId: 003000000000001AAA
Status: Responded
Check what your agent did
Checks YAML
checks:
- id: contact_created
trace:
called: POST /services/data/v67.0/sobjects/ContactTested together
All 43 toolsSalesforce API mock FAQ
Can a Salesforce agent create or update a record using an external ID?
The mock accepts PATCH / and updates the matching account or creates one. The response includes created; updateOnly=true makes a missing external ID return 404 instead of creating a record.
What should a Salesforce agent do when a SOQL response has done set to false?
Follow the mock’s nextRecordsUrl until done is true. Each query locator holds the original result set and expires after 15 minutes on the simulated clock, returning 400 with INVALID_QUERY_LOCATOR.
Will a failed Salesforce composite request undo earlier writes?
Set allOrNone: true on the mock’s / request. If a subrequest fails, the transaction rolls back; that subrequest retains its error and the others return PROCESSING_HALTED.
Install the CLI and run your agent against the Salesforce mock.
Ancha is not affiliated with Salesforce.