This question originally came up in our Slack community and the thread has been consolidated here for long-term reference.
We’re building a telehealth application using React.js and LiveKit for video calling.
Our flow:
- We don’t manually create LiveKit rooms - they’re created when a user initiates a call
- We use LiveKit webhooks (
room_startedand participant events) to update ourcallLogtable
Our requirement:
- When a patient books an appointment, we create a
callLogrecord with theappointmentId - When the call starts, we need to update that record with the
roomId
We’re considering two approaches:
- Update room metadata with
appointmentIdafter room creation, then useRoomMetadataChangedwebhook - Manually create the room in the backend with metadata already set, then use
room_startedwebhook
What’s the recommended approach for mapping appointments to rooms?