Delete Handling — clean up NC when entities deleted in GHL #3

Open
opened 2026-07-13 04:28:39 +00:00 by francois · 0 comments
Owner

Problem

When a contact, appointment, or opportunity is deleted in GHL/FG Funnels, the corresponding NC entity (vCard, calendar event, Deck card) is NOT removed or archived.

Requirements

  • Contact deleted in GHL → delete/archive vCard in NC
  • Appointment deleted in GHL → delete calendar event in NC (CalendarSyncService has deleteCalendarEvent() but needs testing)
  • Opportunity deleted in GHL → archive Deck card (DeckSyncService has cardService->delete() but needs verification)
  • File deleted in GHL → file stays in NC (maybe mark as "orphaned"?)
  • Respect sync mode: if mode is off, do nothing
  • Log deletions in sync log output

Webhook events to handle

  • ContactDelete (already in handleGhlEvent but ContactSyncService::handleWebhook just swallows it)
  • AppointmentDelete (CalendarSyncService has delete logic but untested)
  • OpportunityDelete (DeckSyncService has delete logic but untested)

Acceptance

  • ContactDelete removes vCard from CardDAV
  • AppointmentDelete removes event from CalDAV
  • OpportunityDelete archives Deck card
  • Deletions are logged in sync output
  • FileDelete handled gracefully
## Problem When a contact, appointment, or opportunity is deleted in GHL/FG Funnels, the corresponding NC entity (vCard, calendar event, Deck card) is NOT removed or archived. ## Requirements - Contact deleted in GHL → delete/archive vCard in NC - Appointment deleted in GHL → delete calendar event in NC (CalendarSyncService has deleteCalendarEvent() but needs testing) - Opportunity deleted in GHL → archive Deck card (DeckSyncService has cardService->delete() but needs verification) - File deleted in GHL → file stays in NC (maybe mark as "orphaned"?) - Respect sync mode: if mode is ``off``, do nothing - Log deletions in sync log output ## Webhook events to handle - ``ContactDelete`` (already in handleGhlEvent but ContactSyncService::handleWebhook just swallows it) - ``AppointmentDelete`` (CalendarSyncService has delete logic but untested) - ``OpportunityDelete`` (DeckSyncService has delete logic but untested) ## Acceptance - [ ] ContactDelete removes vCard from CardDAV - [ ] AppointmentDelete removes event from CalDAV - [ ] OpportunityDelete archives Deck card - [ ] Deletions are logged in sync output - [ ] FileDelete handled gracefully
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
partage/ghl-nextcloud-integration#3
No description provided.