CRM delivery
AI Integration with Salesforce
Scope Salesforce AI integration by org, objects, permissions and automation, then prove complete outcomes across composite requests.
An AI integration with Salesforce should be defined against an actual organisation, its enabled products, its object model and the identity that performs each operation. “Connect the CRM” leaves too many unanswered questions: which fields can be read, which records can be changed, what automation runs after a write and what evidence proves that the business transaction completed?
This guide focuses on integrating an external AI service with Salesforce Platform records used by Sales Cloud or Service Cloud. It does not assume that Agentforce, Data Cloud or a particular packaged connector is licensed or configured. A Salesforce administrator and integration lead should agree the object and permission contract before a model is allowed to propose production changes.
Confirm the org and API boundary
Start with the production org identifier, relevant environments, edition, enabled products and chosen API version. Confirm API entitlement for the organisation and API permission for the integration identity. Salesforce documents these as separate requirements in its REST API access guidance. Do not price or promise an integration on the assumption that every subscription exposes the same interface.
Next inventory the objects involved. Distinguish standard objects, custom objects and managed-package objects. Inspect the deployed metadata for field types, required values, record types and permitted relationships. A label displayed to an administrator is not a stable API contract, and a field visible in one profile may be unavailable to the integration user. Record the supported operation for each object rather than treating read access as permission to create or update.
Select an API version deliberately and retain the request and response examples used for acceptance. A new model release should not also change the Salesforce interface version unnoticed. The API-first integration guide explains how to keep the application contract separate from the model's changing behaviour.
Give the integration an identity with a specific job
A dedicated integration identity makes it easier to attribute operations and remove access without disabling a colleague's account. Salesforce's integration-user guidance describes a server-to-server pattern using a run-as user and permission sets. Check the current authentication configuration supported by your org; the existence of a user licence does not itself grant the required business permissions.
Define three separate scopes: objects and operations, readable or writable fields, and accessible records. If the assistant summarises cases for one service team, it does not automatically need all opportunities, contacts or attachments. Where the middleware acts for multiple human users, decide how their individual permissions constrain the service identity. Do not assume a broad service account automatically reproduces each person's access.
Custom Apex endpoints require particular care. Salesforce documents that Apex data operations can run in system mode, while explicit user-mode operations can enforce the relevant user access controls. Review the actual endpoint implementation against the official CRUD and field-security guidance. Authentication at the front door does not establish that every custom query behind it respects the intended scope.
A worked failure: the case changed, the follow-up did not exist
Consider an illustrative Service Cloud integration. An AI assistant reads an authorised equipment-support case, proposes a concise issue classification and prepares a follow-up task. A reviewer approves both. The integration sends a composite request containing a Case update followed by Task creation. A validation rule rejects the Task because a locally required custom field is absent.
The outer HTTP response can still be successful while a subrequest fails. In the documented Composite resource, allOrNone affects rollback within the composite request; when it is false, independent successful subrequests may remain committed. These details are specified in Salesforce's Composite request documentation. They do not imply rollback of every external consequence caused by other systems.
If the integration reads only the outer status, it may tell the service manager that the case was classified and the task assigned. In reality the classification exists and the task does not. The recovery action is to establish the exact subrequest outcomes, inspect the resulting records and repair the missing step under the approved business rules. Replaying the entire bundle without investigation can create a second task if the earlier outcome was merely uncertain.
The acceptance test should therefore include a deliberately rejected Task, a missing permission, an invalid relationship and a lost response. It should prove which result the user sees in each case. “The API returned 200” is insufficient evidence for a multi-record business outcome.
Create an object-operation contract the administrator can approve
| Contract item | What to record | Acceptance evidence |
|---|---|---|
| Case read | Permitted record population, fields and source freshness. | Allowed case is available; another team's restricted case is denied. |
| Case classification update | Allowed field and values, approved proposal, relevant current state. | Unexpected field or stale decision context prevents the update. |
| Task creation | Required fields, valid relationship, assignment rule and duplicate protection. | One recognised Task ID and the expected relationship are recorded. |
| Post-write automation | Relevant flows, validation rules, triggers and downstream notifications. | Sandbox evidence shows the resulting business state and side effects. |
| Partial completion | Subrequest outcomes, reconciliation method and repair authority. | Operator can resolve an incomplete bundle without blind replay. |
| Change ownership | Owner of each object rule and notification of incompatible changes. | A changed required field is detected before production use. |
This table should refer to your actual field names and configured rules in the private project specification. Public examples should hide customer information and internal identifiers. A screenshot of a successful user-interface action is useful context, but the API identity and automation path still require their own test.
Understand what happens after the write
A CRM update may activate business automation. Ask the administrator to identify relevant record-triggered flows, validation rules, Apex triggers and integrations for each changed object. Decide which downstream effect is part of your acceptance scope. If the task is to create a draft follow-up, automatic external notification may be an unintended consequence even when the record itself is correct.
Separate the time at which Salesforce accepts a record change from the time at which another system completes its work. If an external scheduling platform receives a later event, keep its acknowledgement as separate evidence. A Salesforce record identifier is not proof of a confirmed appointment elsewhere. For this asynchronous boundary, use the event and reconciliation principles in event-driven AI integration.
Data read for a proposal can become stale before approval. Establish how the integration detects a material change and whether it must request review again. The exact mechanism depends on the API and object behaviour; do not transplant a concurrency method from another CRM without checking support. The business condition to preserve is that the executed change matches the context the reviewer approved.
Evaluate Arabic content without weakening structured fields
For Saudi teams, test Arabic and mixed-language case descriptions, transliterated product names and right-to-left text in the destination interface. Keep structured Salesforce values independent of the language in which the assistant explains them. A translated display label should map to the approved stored value through a controlled dictionary, not through a fresh model guess on every write.
Evaluate classification on examples that administrators can adjudicate. Include negation, an uncertain customer statement, two issues in one description and a request that needs a human to choose the category. Measure the final stored classification and the quality of the supporting explanation separately. A fluent explanation does not compensate for an invalid or misleading field value.
Personal information copied into prompts, retrieval indexes or support traces belongs in the integration's data-flow review. PDPL integration compliance addresses purpose and processor responsibilities, while integration access control covers the user-to-service permission boundary.
Release with a repair path, not just a connector
Begin in an isolated environment with representative configuration and safe test records. Demonstrate read-only assistance, approved writes and failure recovery as separate capabilities. Before production, document authentication renewal, permission revocation, relevant limits, retry conditions and the owner of unresolved outcomes. Confirm the current limits for the actual org and selected APIs instead of copying a generic quota into the design.
Use integration acceptance tests to exercise both permitted work and denied work. Retain a business-level correlation reference linking the proposed change, approval, Salesforce responses and any downstream receipt. Audit logging should make a partial outcome reconstructable without copying whole case descriptions into every diagnostic record.
Trusted Data's enterprise workflow automation overview offers related commercial context for coordinating human review and system actions. Your Salesforce delivery specification should still identify the exact org, objects and evidence required.
To discuss AI integration and delivery with OpenForAI, prepare an object list, masked request examples and an administrator-approved account of the automation triggered by writes. Enquire about a Salesforce AI integration project with these boundaries so that scope and acceptance can be agreed against your configured environment.
FAQ
Your questions, answered.
Does an external Salesforce AI integration require Agentforce?
Not necessarily. The integration described here uses supported Salesforce interfaces to read or change records from an external service. Agentforce and other Salesforce products have their own capabilities, licensing and configuration. Identify the required business outcome first, then compare the available native and external approaches against the actual org rather than assuming one product is mandatory.
Why can a Salesforce composite request return 200 when part of it failed?
The outer response reports handling of the composite request, while individual subresponses describe the operations inside it. Inspect every relevant subresponse and understand the chosen allOrNone behaviour. A successful outer status does not prove that all intended records were created or that downstream systems completed their work. Retain object identifiers and reconcile uncertain results before retrying.
Can we use an administrator account for a Salesforce AI connector?
An administrator account is usually much broader than a single integration requires. Define the objects, fields, records and operations the service actually needs, then configure an appropriate dedicated identity and permission assignments. Confirm licence and authentication requirements in the org. If a temporary privileged test is unavoidable, it must not become the production permission baseline.
How should Arabic labels map to Salesforce picklist values?
Use an administrator-approved mapping between the displayed Arabic label, the intended meaning and the stored API value. Test it against the applicable record type and field configuration. The model can suggest a category or explain it in Arabic, but it should not invent stored values. Ambiguous requests should remain unclassified or go to review under the agreed process.
What changes in Salesforce can break an existing AI integration?
Relevant changes include required custom fields, validation rules, picklist values, record types, permission assignments, triggers, flows and API-version behaviour. Maintain a contract inventory and a representative acceptance pack owned jointly by the administrator and integration team. A connector that still authenticates may nevertheless produce incomplete records or unintended side effects after configuration changes.
Should failed Salesforce write bundles be replayed automatically?
Only when the failure is understood and the retry is safe under the operation contract. An explicit rejection, a partial composite result and a lost response are different situations. Determine which records already exist, whether approval remains valid and whether an external action occurred. Use the recognised destination identifiers and duplicate-protection mechanism rather than replaying a whole bundle blindly.