Associate existing Call records when Contact is created with matching phone number
Hi all - has anyone built a Deluge function to retroactively associate unassociated Calls with a Contact based on phone number?
We have telephony with call logging configured in CRM. Calls often come in before the caller is created as a Contact. Same with outbound calls.
Once the Contact is created and has a phone number in ‘Phone’ and/or ‘Mobile’, I’d like a workflow to find prior Calls where ‘From_Number__s’ or ‘To_Number__s’ matches the Contact’s number, then update the Call’s ‘Who_Id’ to associate the call with the Contact
Has anyone implemented something similar or have a function they’d be willing to share. I’d also be interested in an approach for doing a one-time cleanup to associate existing historical Calls.
I’m wondering if COQL would be a good approach to retrieve only potentially matching unassociated Calls, then normalize and validate the phone numbers before updating (we’re 99.9% USA phone numbers).