Skip to main content
Preventing AI Agents from Overwriting Newer CRM Changes
November 23, 2026 at 8:00 AM
crm-versions-mirrored.png

A sales operations agent reads an account record and prepares a small update. Before it sends the change, a person corrects the same record. The agent then writes the values it saw earlier, replacing the correction with an older value. Both requests can succeed, and the activity log can look perfectly ordinary.

This is a lost update. It can happen without a model inventing information or exceeding its permissions. The agent may have understood the request correctly and used an approved API. The failure sits between reading a record and committing a change, where another process had time to act.

For agents working with CRM records, the write contract needs to include what was read, which fields may change and what should happen if the record has moved on. A successful HTTP response alone cannot establish that the business result was correct.

Carry the record version into the write

Consider a hypothetical account-maintenance agent in a Dynamics 365 workflow backed by Dataverse. A user asks it to update a customer's telephone number from a verified service request. While the agent prepares the update, an account manager changes the customer's billing instructions.

Sending a full copy of the account back to the server creates unnecessary risk. Start with a narrow patch containing only the intended telephone field. That reduces the number of unrelated values the integration can accidentally replace. It still leaves a conflict if someone else changes the telephone number during the same interval.

Keep the record version alongside the retrieved values. The write should carry a condition requiring that version to remain current. If the condition fails, the connector should return a distinct conflict result to the workflow instead of treating the operation as a completed update.

Microsoft's Dataverse concurrency overview describes checking whether a row changed between retrieval and an attempted update or deletion. Check the target table's support before building a workflow around that behavior. Make it a deployment check for every relevant environment, rather than assuming a successful test against one table proves all connectors behave the same way.

The application should hold version tokens as opaque values. They belong to the connector and execution layer. There is no useful reason for the language model to calculate a new version, compare numeric-looking token values or fill in a missing token from context.

A conflict needs a business decision

Suppose the telephone update is rejected because the account changed. The connector can read the latest version and compare the fields that matter to this specific request. If only an unrelated field changed, the workflow may be allowed to rebuild the narrow update against the new version. That policy should be explicit and bounded.

If the telephone number itself changed, sending the original patch again can erase another person's work. Return the competing values to an authorized reviewer or ask the requesting user to resolve the difference. Record that the update remains pending. Do not describe a conflict as a successful correction simply because the agent produced a polite final response.

Avoid an endless read-and-retry loop. A busy account might change repeatedly, and a workflow can spend its entire execution budget chasing it. Limit retries, retain the proposed change and move unresolved work to a queue with an owner. A conflict is often useful evidence that two business processes need clearer responsibility for the same field.

Some integrations can safely merge independent changes. Others cannot. A customer address, tax classification and invoice settings may have dependencies that a field-by-field comparison misses. The integration team should define those dependencies with the people who operate the process. The model can help explain the competing proposals, while the application enforces which resolution paths are allowed.

Keep connector guarantees separate

For the Web API implementation, Microsoft's conditional operations documentation explains using ETags and request preconditions with Dataverse. Use the actual returned version for a version-specific check; a general existence condition does not establish that a record is unchanged. Verify the precise behavior with the endpoint and table your connector uses.

This protection concerns the record being changed. It does not automatically make a multi-record business process consistent. If a decision depends on account terms, an order and an inventory reservation, checking only the account version leaves the other inputs outside that check. Work through the service's transaction and validation capabilities before promising that a collection of separate calls behaves as one operation.

Duplicate protection is another separate concern. A request can time out after the server has committed it. Version checking does not, by itself, tell the caller whether that earlier request succeeded. Keep the operation tracking and reconciliation described in our article on agent retries and duplicate ERP transactions. The two controls address different failure modes.

Test the conflict path deliberately. Pause a test workflow after its read, change the target field through a second client, and resume the agent. Confirm that the original value is not written over the newer one. Repeat with an unrelated change, a deleted record and a connector response that omits its expected version token. The workflow should report each outcome accurately.

A small update can still trigger downstream work. Keep an audit record of the request, affected fields, version condition and final result, with access appropriate to the underlying customer information. That gives support a way to explain why a change stopped and gives the business a practical route to resolve it.

If your team is adding agents to CRM or order-management workflows, Business Dynamics can help review the connector's write rules and conflict handling before those updates reach production.