Sam needed to fix a performance problem with the RingCentral-to-Litify sync automation, process a backlog of 76 pending RingSense tasks, investigate a competing native Salesforce flow built by Nathaniel (a Salesforce admin in the office), handle the resulting duplicate Notes from both systems running simultaneously, and generate an analysis of 46,474 unlinked tasks across the entire Salesforce org.
The session spanned March 31 through April 3, 2026, picking up from earlier sessions that had established the matching criteria, verified Notes work in the Salesforce mobile app, approved the initial backfill, and discussed the automation approach.
The core automation syncs RingSense call summaries from Salesforce Tasks to Litify Notes (litify_pm__lit_Note__c), matching calls to Matters/Intakes via phone number lookup. This runs as a Python script executed by a Perplexity Computer cron job.
The original rc_litify_sync.py had a full-table dedup query that pulled every existing Litify Note with an RC external ID, then compared against the current batch. On a growing table, this caused 5-10 minute timeouts.
Fix applied: Replaced the upfront full-table dedup with a batch IN-clause approach. Instead of querying all Notes, the script now collects the external IDs for the current batch of RingSense tasks and queries only those specific IDs. This reduced runtime from 5-10 minutes (timeout) to approximately 15 seconds.
Additional optimizations:
After the optimization, the script successfully processed 76 pending tasks from the prior 2 days. Of those, 196 total tasks were identified as genuinely unmatched (no Matter or Intake could be found for their associated Accounts). These went into the unmatched cache.
Sam reported that someone in his office (Nathaniel) had built a Salesforce flow that went live around March 31 at 3 PM ET.
Flow name: RingCentral_Process_RingSense_Calls
Type: Record-Triggered Flow on the Task object
What it does: When a new Task is created with Subject containing "[RingSense]", the flow creates a SAIL_Call_Log__c record with parsed fields (Summary, Call Notes, Next Steps, Direction, Score) and creates a litify_pm__lit_Note__c (Litify Note) linked to the same Matter/Intake.
Since going live (March 31 3 PM ET through April 2 morning):