Salesforce
Two ways to get ax1om scores into Salesforce, and they are not alternatives so much as different moments. Scheduled writeback keeps a field current on every record. The scoring API answers for one record right now. Most teams end up using both.
Connect
Authorize Salesforce from the app in one OAuth step. The connection is read-only by default and tokens are encrypted before they are stored. ax1om then runs schema discovery: it reads your objects, fields, and record counts, and tiers fields by how populated they are, so you can see what is worth training on before you spend a run.
Nothing is written back until you point a score at a field, which is a separate, explicit step below.
Scores on the record
The no-code path. Create the custom fields on the object you are scoring, then point the score at them. On Salesforce the fields are yours to create: ax1om does not add fields to your schema.
| Field | Type | Carries |
|---|---|---|
ax1om_Score__c | Number | The 0-100 ranking. |
ax1om_Score_Date__c | Date | When the run wrote it. |
ax1om_Score_Factors__c | Long text area | The factors behind this record's score, as one compact string. |
Names are conventional, not required; point the score at whatever you called them. All three are optional and a run fills in whichever are set, skipping the rest. If no score field is configured the run still scores and reports that writeback was skipped. Scoring and writing are separate legs, and a missing field is not treated as a failure.
Writes go through the Composite sObjects API in batches of up to 200 records. The factors string echoes your own field values rolled back to your own field names, so a rep reads "Title seniority" rather than the internal columns a title expanded into.
Calling the API
When you need a score at the moment a record is created or changed rather than on the next scheduled run, call the scoring API. Keep the key in a Named Credential rather than in code, then call it from an Apex trigger, a Flow, or an External Service.
// Illustrative. Store the key in a Named Credential rather than in code:// Setup > Named Credentials > ax1om, URL https://api.ax1om.ai,// with a Custom Header Authorization: Bearer {!$Credential.Password}
HttpRequest req = new HttpRequest();req.setEndpoint('callout:ax1om/v1/score');req.setMethod('POST');req.setHeader('Content-Type', 'application/json');req.setBody(JSON.serialize(new Map<String, Object>{ 'model_id' => 'mdl_abc123', 'explain' => true, 'records' => new List<Map<String, Object>>{ new Map<String, Object>{ 'title' => lead.Title, 'industry' => lead.Industry, 'employees'=> lead.NumberOfEmployees } }}));
HttpResponse res = new Http().send(req);// res.getBody() carries score, conversion_likelihood, and top_reason_* fields.You get back the score, the underlying likelihood, and the factors:
{ "model_id": "mdl_abc123", "scores": [ { "score": 82, "conversion_likelihood": 0.823, "enriched": false, "top_reason_1": "Title seniority", "top_reason_2": "Industry: SaaS", "top_reason_3": "Company size band" } ], "records_scored": 1}
Records the model has never seen are still scored from the fields you send,
flagged enriched: false, so this works on a brand-new inbound
lead. Full field tables, the error envelope, and versioning are in the
API reference.
Which path to use
| Use | When | Cost |
|---|---|---|
| Scheduled writeback | Reps read the score in a list view or report. Freshness of a day is fine. | No code, no API metering. |
| Scoring API | Routing, assignment, or a form response has to branch on the score immediately. | Apex or Flow work, and each call meters. |
A common shape is both: writeback keeps the field current for everyone, and an Apex trigger calls the API on create so the routing rule has a number to work with before the next scheduled run.
Limits and notes
- Callouts from Apex are subject to Salesforce's own governor limits. Prefer a queueable or batch context over a synchronous trigger callout when you are scoring more than a handful of records.
-
Batch the API rather than looping:
POST /v1/scoretakes up to 1000 records in one call and returns one row per record, in order. -
Use a test key (
ax1m_sk_test_) while you wire it up. It scores against the real model but meters into a separate free bucket, so a sandbox integration never touches your live allowance. - Writeback is scheduled on the score, not on the connection. Cadence and time are set on the score's Scoring Schedule and Settings card.
Agents can reach the same predictions over MCP instead of raw HTTP. If the record you want ranked is a company rather than a person, see account scoring.