From de576e2a9aa5015382be5582d282f9d22c985f03 Mon Sep 17 00:00:00 2001 From: Floke Date: Mon, 9 Mar 2026 08:42:22 +0000 Subject: [PATCH] docs(connector): [31e88f42] Document webhook de-duplication shield Document the newly implemented de-duplication logic in the SuperOffice Connector README. This explains the problem of duplicate 'contact.created' webhooks from SuperOffice and how the worker now skips redundant jobs. --- connector-superoffice/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/connector-superoffice/README.md b/connector-superoffice/README.md index 2fc83144..791e7755 100644 --- a/connector-superoffice/README.md +++ b/connector-superoffice/README.md @@ -32,6 +32,12 @@ This directory contains Python scripts designed to integrate with the SuperOffic * **Solution:** **Late Name Resolution**. The worker persists the resolved Company Name and Associate Shortname to the SQLite database as soon as it fetches them from SuperOffice. * **Status Priority:** Success (`COMPLETED`) now "outshines" subsequent ignored echos (`SKIPPED`). Once an account is green, it stays green in the dashboard cluster for 15 minutes. +#### 🛡️ D. Webhook De-Duplication (Contact Creation) +* **Problem:** SuperOffice occasionally sends *multiple* `contact.created` webhooks for the *same* new contact within a very short timeframe. This leads to duplicate processing jobs for the same entity. +* **Solution:** A **de-duplication shield** has been implemented in `worker.py` (March 2026). + * Before extensive processing, the worker now checks `connector_queue.db` via `queue_manager.check_for_recent_duplicate()`. + * If a `contact.created` event for the same company name is already `PROCESSING` or has been `COMPLETED` within the last 5 minutes, the current job is immediately `SKIPPED` as a duplicate. + ### 3. Advanced API Handling (Critical Fixes) * **OData Pagination:** We implemented `odata.nextLink` support (Manuel Zierl's advice) to correctly handle large result sets (>1000 records).