Skip to main content
A support agent keeps the CRM current from conversations. Updating a phone number is cheap to undo. Merging two customer records is not, so it waits for a person. Deleting a record destroys the thing every receipt points at, so an agent never does it.

The policy

runnable

The code

runnable file=main.py

What the agent sees

The revision number in the effect key is what tells a duplicate from a change: the same revision twice is one effect; a new revision is a new one.

The receipt

runnable

When an AMBIGUOUS appears

Read the record back. If the field holds the new value, ctrlrun resolve crm:c_1:phone:8 --committed; if not, --failed. For a merge whose reply was lost, check which record still exists before resolving: a merge is the one update here that cannot be undone by another update.

Next