CRM: Reassigning a Lead Creates a Duplicate
After the customer is transferred between sales representatives, two similar positions or two telephone tasks are created.
Why is this happening?
An interface or automatic can create a new lead when changing the maintainer, instead of updating the existing record and adding the history event.
Step by step solution
1. Compare the IDs of the two positions. If different, check the data path.
2 . When changing the maintainer, perform UPDATE the existing lead, and save the history in a separate event table.
3 . Block multiple sending of the same mutation at two clicks and resume requests.
4 . Add a transfer integration test between three employees.
5 . Control deduplication with webhooks regardless of the manual allocation mechanism.
How do I check the score?
The record retains the same ID, and the story shows previous maintainers without a second copy of the client.
Do not automatically delete one of the two entries without checking his comments and contact history.