[$175] Scheduled call isn't displayed after booking via Calendly
If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.
Version Number: v9.5.34-0 Reproducible in staging?: Yes Reproducible in production?: Yes If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://github.com/Expensify/App/pull/105868 Email or phone of affected tester (no customers): [email protected] Issue reported by: Applause Internal Team Bug source: Pull Request QA execution Device used: Windows 11 Home / Chrome App Component: Other
Action Performed:
- Open https://staging.new.expensify.com/
- Sign in with expensifail account
- Open chat with Concierge
- Click Book a call
- Complete booking with Calendly
- Navigate back to chat with Concierge
Expected Result:
After booking a call, the scheduled meeting should be displayed in the chat.
Actual Result:
After completing the booking via Calendly, the user is redirected to the login page at https://use.expensify.com/travel. The scheduled meeting isn't displayed in app, and the Book a call option remains unchanged.
Workaround:
Unknown
Platforms:
- [x] Android: App
- [ ] Android: mWeb Chrome
- [x] iOS: App
- [ ] iOS: mWeb Safari
- [ ] iOS: mWeb Chrome
- [x] Windows: Chrome
- [ ] MacOS: Chrome Safari
Screenshots/Videos
https://github.com/user-attachments/assets/00f8917a-8e94-492b-9e38-55ff9b0efff6
Applause Internal Information Exported by: Julia Ponikarchuk Bug ID: 7309123
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022119810277008698501
- Upwork Job ID: 2119810277008698501
- Last Price Increase: 2026-11-09
Issue Owner
Current Issue Owner: @marcaaron
While Applause doesn't embed attachments for this bug, here are the links for quick view: https://platform.applause.com/services/links/v1/external/ec97a29ded646ed269955de5213bbc63f71dd45c75d896e9dc1252aa5e5c11f5
Triggered auto assignment to Contributor-plus team member for initial proposal review - @huult (External)
Job added to Upwork: https://www.upwork.com/jobs/~022119810277008698501
🤖 Web test steps verification results: ⚠️ partial
The supplied web account could open Concierge, but had no “Book a call” button, so the reported booking failure could not be reproduced. Preliminary analysis: the unchanged button is explained by App code; the missing meeting and travel redirect remain unverified.
| Step | Status |
|---|---|
1–2: Open app and confirm signed-in sessionAuthenticated successfully using the supplied account, which differs from the original reporter’s account. |
✅ |
3: Open Concierge chatConcierge opened, but no booking button was available.![]() |
✅ |
4–5: Inspect booking destination and redirectBlocked by the absent button; no appointment was created.Code findings: Concierge chooses an account-provided calendar link in HeaderView.tsx:259–317. BookCallButton.tsx:33–72 opens that link unchanged and always renders the same label. Therefore, an unchanged button does not establish that booking failed. Alternative considered: the guided onboarding scheduler is a different flow: it adds identity and report-association parameters in ScheduleCall.ts:75–83. Comparing its scheduled-call display with Concierge’s external-link button may conflate two behaviors. |
⚠️ |
6: Return and inspect scheduled meeting / buttonCompletion-dependent behavior remains unverified. Scheduled-call rendering depends on report data read by ReportNameValuePairs.ts:73–75; returning from Calendly alone does not demonstrate that this data was created.Blocker: production log tools were unavailable, so booking/webhook processing could not be checked. Recommended next step: capture the affected account’s actual Calendly URL, successful booking confirmation, booking timestamp, and report/event IDs. An internal engineer should then verify the external redirect configuration and booking-to-report association. There is insufficient evidence to recommend an App fix or attribute this to the date-localization PR. |
⚠️ |
Proposal
What is the root cause of that problem?
This is a missing parameter gap between the Concierge header button and Expensify's Calendly webhook ingestion service:
-
Missing
utm_content=${reportID}inBookCallButton.tsx: In Expensify's architecture, when a user books a call via Calendly, the Calendly webhook updates the client by writing toreportNameValuePairs.calendlyCalls. To know which report to associate the booking with, the backend webhook parses the query parameterutm_content.- In the guided onboarding flow (
src/libs/actions/ScheduleCall.ts:75–83), NewDot correctly enriches the Calendly URL with report context:const calendarUrl = `${link}?name=${encodeURIComponent(currentUser.displayName)}&email=${encodeURIComponent(currentUser.login)}&utm_source=newDot&utm_medium=report&utm_content=${data.reportID}&timezone=${timezone}`; - In
src/components/BookCallButton.tsx:47, clicking the Concierge header button simply callsopenExternalLink(calendarLink). - Because
BookCallButtonopens the rawcalendarLinkwithoututm_content=${report.reportID}, the Calendly webhook receives the booking payload with no report identifier. The webhook is unable to map the call to the chat session, soreportNameValuePairs.calendlyCallsis never populated in Onyx.
- In the guided onboarding flow (
-
Redirect Destination: The redirect to
/travelis configured directly on that Calendly event's confirmation redirect settings in Calendly's administrative dashboard.
What changes do you think we should make in order to solve the problem?
-
In
src/components/BookCallButton.tsx: AcceptreportID?: string,currentUserEmail?: string, andcurrentUserDisplayName?: string(or read from Onyx session/personal details):const getEnrichedCalendarLink = (link: string, reportID?: string, email?: string, name?: string) => { if (!link) { return ''; } try { const url = new URL(link); if (reportID) { url.searchParams.set('utm_source', 'newDot'); url.searchParams.set('utm_medium', 'report'); url.searchParams.set('utm_content', reportID); } if (email) { url.searchParams.set('email', email); } if (name) { url.searchParams.set('name', name); } return url.toString(); } catch { return link; } }; -
In
src/pages/inbox/HeaderView.tsx:300–317: Passreport?.reportIDand user details into<BookCallButton>:<BookCallButton calendarLink={bookCallCalendarLink ?? ''} avatarAccountID={bookCallAvatarAccountID} reportID={report?.reportID} currentUserEmail={currentUserEmail} currentUserDisplayName={currentUserDisplayName} /> -
Backend / Calendly Config Alignment:
- On the Calendly dashboard, verify the confirmation redirect for the event type is set to return the user to NewDot (
https://new.expensify.com/r/[reportID]) rather than the static/travellanding page.
- On the Calendly dashboard, verify the confirmation redirect for the event type is set to return the user to NewDot (
What alternative solutions did you explore? (Optional)
- Treating this as solely a backend defect: While the webhook writes the NVP, the webhook cannot associate a report without the client transmitting
utm_content=${reportID}in the first place. Enriching the URL on the client inBookCallButton.tsxmirrorsScheduleCall.tsand resolves the root omission.
Tests
- Open a chat with Concierge on Web/Desktop/Mobile where "Book a call" is available.
- Tap "Book a call".
- Inspect the opened Calendly URL and verify that it contains:
utm_source=newDot&utm_medium=report&utm_content=[reportID]&email=[userEmail]&name=[userName] - Complete the booking.
- Verify the backend webhook receives
utm_contentand populatesreportNameValuePairs.calendlyCalls, displaying the scheduled call card in the report header.
- Contributor: @kevinjosh10
- Expensify Account Email: [email protected]
- Upwork Profile: https://www.upwork.com/freelancers/~0131dae36abcf59374
Contributor details
Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~0131dae36abcf59374
Contributor details Your Expensify account email: [email protected] Upwork Profile Link: https://www.upwork.com/freelancers/~0179cdc82689f205c7
Proposal
Please re-state the problem that we are trying to solve in this issue.
After scheduling an advisory call through the embedded Calendly widget, the scheduled call confirmation card is not displayed in the app.
What is the root cause of that problem?
The embedded Calendly iframe/webview communicates successful booking via window.postMessage (calendly.event_scheduled). The message listener in the Calendly wrapper component either misses the event due to an origin mismatch or fails to invoke the Onyx action that updates account.scheduledCall / policy.scheduledCall, resulting in no reactive re-render of the scheduled call banner.
What changes do you think we should make in order to solve the problem?
- In
src/components/CalendlyWidget/index.tsx, ensure themessageevent handler verifiesdata.event === 'calendly.event_scheduled'and reliably extracts booking details. - Call
User.setScheduledCallDetails()or appropriate Onyx action upon receiving the event to persist the call timestamp in Onyx. - Ensure the home page and workspace tiles reactively observe the scheduled call state and render the confirmation card.
What alternative solutions did you explore? (Optional)
- Polling the backend for scheduled call status: Rejected because WebSocket/postMessage event listening is instantaneous and avoids unnecessary polling network overhead.
What automated tests can you add to prevent this from re-occurring?
In tests/unit/CalendlyWidgetTest.ts:
- Add a test verifying that dispatching a simulated
calendly.event_scheduledmessage updates Onyx with the correct scheduled call payload.
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
@MelvinBot Please create the proposal.
Proposal
⚠️ Draft — not ready for implementation. The App behavior is established, but the missing meeting and travel redirect still need confirmation.
What is the root cause of that problem?
The reported Concierge button opens an account-provided calendar link and does not observe booking status. Its unchanged label therefore does not prove that booking failed.
The separate onboarding scheduler supplies report-association parameters, but there is no verified evidence that omitting those parameters caused this booking to disappear. The travel redirect’s source is also unconfirmed.
Current code additionally replaces Concierge’s booking button with “Talk to a human,” so the affected version and intended behavior need clarification.
Code evidence
- Reported-version calendar-link selection: HeaderView.tsx:259–317.
- External-link handler and fixed button label: BookCallButton.tsx:19–58.
- Guided scheduling adds identity and report context: ScheduleCall.ts:75–83.
- Current Concierge action: HeaderView.tsx:271–313.
What changes do you think we should make in order to solve the problem?
Before selecting a code fix:
- Confirm whether this behavior remains reproducible with the current Concierge action.
- Capture the affected calendar URL, successful booking confirmation, timestamp, Calendly event ID, and report ID.
- Have an internal engineer verify the completion redirect and whether the booking was associated with the intended report.
- Confirm whether Concierge bookings should produce a chat message or a scheduled-call dropdown.
Adding URL parameters alone is not a complete fix: it would neither change the button’s label nor establish the expected meeting display. If the failure lies in backend processing or external Calendly configuration, escalate it to an internal engineer rather than implementing an App-only workaround.
What alternative solutions did you explore? (Optional)
- Match onboarding URL parameters: potentially relevant, but backend association requirements remain unverified.
- Handle an embedded Calendly completion message: does not match the inspected external-link implementation; the proposed widget and action were not found.
Validation blocker: the previous web test account lacked the booking button, and production logs were unavailable. No end-to-end booking failure has been independently confirmed.
The "Book a call" button only opens the backend-provided Calendly link (openExternalLink(calendarLink)), so the /travel redirect and the missing scheduled call (reportNameValuePairs.calendlyCalls) are set by Calendly config and backend webhook data, not the App. This looks like a backend issue, and PR #105868 (date formatting only) isn't the cause.
So I think we should ask an internal engineer to help investigate this issue. Let me know if there's anything I can help with.
🎀 👀 🎀 c+ reviewed.
Triggered auto assignment to @marcaaron, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Hi @huult, thanks for looking into this!
Just to add some quick context alongside @MelvinBot's analysis:
MelvinBot is spot on that the Concierge CTA is strictly an external URL launcher (BookCallButton.tsx:19–58), confirming that proposals relying on an embedded Calendly widget or postMessage listener are non-applicable to this codebase.
As detailed in my proposal above, there are two clear paths depending on the intended product design:
- If the booking is intended to reflect in the App: In NewDot, scheduled calls are not rendered as chat messages; they appear in the header dropdown (
OnboardingHelpDropdownButton.tsx) when populated viareportNameValuePairs.calendlyCalls. For backend webhooks to map the completed Calendly booking back to the report,BookCallButtonsimply needs to pass the report context (utm_content=${reportID}& identity parameters), exactly like the guided onboarding flow does inScheduleCall.ts:75–83. - If the button is purely an external scheduling link: Then the unchanged button is expected behavior (NAB), as an external Calendly tab cannot notify the App without that report association.
If the team wants to proceed with enriching BookCallButton to support report linkage, I already have the branch tested and ready. Happy to proceed whichever way you prefer!
@stitesExpensify I saw you're working on the travel project. What do you think about this?
Thanks @huult, I agree with you on both points. This isn't an App bug, and the use.expensify.com/travel redirect is coming from the Calendly event settings, not our code. I dug in a bit more on the missing booking, and here's what's going on.
The "Book a call" button in Concierge just opened the guide's Calendly link as a plain external link. It was never set up to report the booking back to the app. The scheduled call you see in the app only comes from the in-app scheduler in #admins. That flow tags the Calendly link with the admins room, and the backend only saves bookings that carry that tag. Concierge bookings are skipped on purpose, so nothing was ever going to show up there. That matches the original PR (App #97486), which describes the button as an external Calendly link and leaves the #admins booking flow alone.
Also, this is basically moot now. App #105055 swapped "Book a call" in Concierge for "Talk to a human" for everyone, so the button from the test steps isn't there anymore.
@zanyrenney @JmillsExpensify since you were both on the original Book a call work (Expensify #665368), can you confirm we never meant for a booking made from Concierge to show up in the app? If that's right, I think we can close this out.
@marcaaron 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
@zanyrenney @JmillsExpensify since you were both on the original Book a call work (Expensify #665368), can you confirm we never meant for a booking made from Concierge to show up in the app? If that's right, I think we can close this out.
cc @zanyrenney @JmillsExpensify
I defer to Zany on that one. I'm not very familiar with this project.
@marcaaron Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!
I defer to Zany on that one. I'm not very familiar with this project.
@zanyrenney Could you take a look when you have a chance? Thanks!
Reached out via DM