Skip to content

[CLEAN] Synthetic Benchmark PR #26782 - fix: Make BOOKING_CANCELLED` webhook payload consistent for regular cancellation and request-reschedule flow#693

Closed
tomerqodo wants to merge 2 commits intobase_pr_26782_20260121_1795from
clean_pr_26782_20260121_1795
Closed

[CLEAN] Synthetic Benchmark PR #26782 - fix: Make BOOKING_CANCELLED` webhook payload consistent for regular cancellation and request-reschedule flow#693
tomerqodo wants to merge 2 commits intobase_pr_26782_20260121_1795from
clean_pr_26782_20260121_1795

Conversation

@tomerqodo
Copy link

Benchmark PR calcom#26782

Type: Clean (correct implementation)

Original PR Title: fix: Make BOOKING_CANCELLED` webhook payload consistent for regular cancellation and request-reschedule flow
Original PR Description: ## What does this PR do?

Fixes inconsistencies in the BOOKING_CANCELLED webhook payload when triggered via the "Request Reschedule" flow vs regular cancellations.

Issues Fixed:

  1. Missing organizer.id - The usersToPeopleType() function in requestReschedule.handler.ts was not including the id field when converting users to Person objects, causing intermittent organizer.id missing errors for webhook consumers.

  2. Missing payload fields - The request reschedule cancellation webhook was missing several fields that are present in regular cancellation webhooks:

    • eventTypeId (Int)
    • length (Int)
    • iCalSequence (Int)
    • eventTitle (String)
    • status (String)
  3. New requestReschedule field - Added a new boolean field to help webhook consumers distinguish between:

    • Regular cancellations (requestReschedule: false)
    • Cancellations triggered by a reschedule request (requestReschedule: true)

Changes:

  • Updated requestReschedule.handler.ts to include id in organizer and pass additional fields
  • Updated BookingWebhookFactory.ts to support new cancellation payload fields
  • Updated handleCancelBooking.ts to include requestReschedule: false
  • Updated cancelAttendeeSeat.ts to include requestReschedule: false
  • Updated DI scaffolding (BookingWebhookService, BookingPayloadBuilder, DTOs, params)
  • Updated webhook documentation (webhooks.mdx)

Note: This is a non-breaking change - only adds new fields to existing payloads.

Visual Demo (For contributors especially)

Before (Request Reschedule cancellation webhook - missing fields):

{
  "triggerEvent": "BOOKING_CANCELLED",
  "payload": {
    "organizer": {
      // "id" was MISSING
      "email": "organizer@example.com",
      "name": "Organizer Name"
    }
    // Missing: eventTypeId, length, iCalSequence, eventTitle, status, requestReschedule
  }
}

After (Request Reschedule cancellation webhook - complete):

{
  "triggerEvent": "BOOKING_CANCELLED",
  "payload": {
    "organizer": {
      "id": 1,
      "email": "organizer@example.com",
      "name": "Organizer Name"
    },
    ... other fields
    "eventTypeId": 100,
    "length": 30,
    "iCalSequence": 2,
    "eventTitle": "Strategy Session",
    "status": "CANCELLED",
    "requestReschedule": true
  }
}

Regular cancellation webhook (now includes new field):

{
  "triggerEvent": "BOOKING_CANCELLED",
  "payload": {
    ... other fields
    "requestReschedule": false
  }
}

Mandatory Tasks (DO NOT REMOVE)

  • I have self-reviewed the code (A decent size PR without self-review might be rejected).
  • I have updated the developer docs in /docs if this PR makes changes that would require a documentation change. Updated docs/developing/guides/automation/webhooks.mdx and packages/features/webhooks/WEBHOOK_PAYLOADS.md.
  • I confirm automated tests are in place that prove my fix is effective or that my feature works.

How should this be tested?

Test 1: Regular Cancellation

  1. Create a booking
  2. Cancel the booking as the host
  3. Check the webhook payload includes:
    • organizer.id is present
    • requestReschedule: false

Test 2: Request Reschedule Cancellation

  1. Create a booking
  2. As the host, click "Request Reschedule"
  3. Check the webhook payload includes:
    • organizer.id is present
    • eventTypeId, length, iCalSequence, eventTitle, status are all present
    • requestReschedule: true

Test 3: Seat Cancellation

  1. Create a seated event booking with multiple attendees
  2. Cancel one attendee's seat
  3. Check the webhook payload includes requestReschedule: false

Checklist

@github-actions
Copy link

Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted.

Details:

No release type found in pull request title "[CLEAN] Synthetic Benchmark PR #26782 - fix: Make BOOKING_CANCELLED` webhook payload consistent for regular cancellation and request-reschedule flow". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit

@github-actions
Copy link

This PR has been marked as stale due to inactivity. If you're still working on it or need any help, please let us know or update the PR to keep it active.

@github-actions github-actions bot added the Stale label Jan 30, 2026
@github-actions
Copy link

This PR has been closed due to inactivity. Please feel free to reopen it if you'd like to continue the work.

@github-actions github-actions bot closed this Feb 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants