Skip to main content

Workflow Notifications

Notifications in the Adamondo backend are triggered by workflow transitions (reservations, document approvals, etc.).

[!NOTE] All notification side effects are non-blocking and executed after the transaction commits. Failure to send a notification will not roll back the database transaction.

Reservation Workflow Notifications

ActionHost NotificationGuest Notification
inquiryPush: New Inquiry - "You have received a new inquiry."

Email: Template type inquiry

Socket: New Inquiry - "You have a new inquiry"
Push: New Inquiry Sent - "Your inquiry has been sent to the host."

Email: Template type bookingRequestGuest

Socket: New Inquiry - "You have sent a new inquiry"
preApprovedPush: Request Pre-Approved - "You have pre-approved the booking request."

Socket: Pre-Approved - "You have pre-approved the request"
Push: Request Pre-Approved - "Your booking request has been pre-approved!"

Email: Template type bookingPreApproval

Socket: Pre-Approved - "Your booking request is pre-approved"
declinedPush: Request Declined - "You have declined the booking request."

Socket: Declined - "You declined the request"
Push: Request Declined - "Your booking request has been declined."

Email: Template type bookingDeclinedToGuest

Socket: Declined - "Your request was declined"
paidPush: New Booking Confirmed - "A guest has confirmed a booking."

Email: Template type bookingConfirmedToHost

Socket: Booking Confirmed - "A new booking has been confirmed"
Push: Booking Confirmed - "Your booking is confirmed!"

Email: Template type bookingConfirmedToGuest

Socket: Booking Confirmed - "Your booking is confirmed"
cancelledByGuestPush: Reservation Cancelled - "Guest has cancelled the reservation."

Email: Template type cancelledByGuest

Socket: Cancelled - "Guest cancelled the reservation"
Push: Reservation Cancelled - "You have cancelled your reservation."

Socket: Cancelled - "You cancelled the reservation"
cancelledByHostPush: Reservation Cancelled - "You have cancelled the reservation."

Socket: Cancelled - "You cancelled the reservation"
Push: Reservation Cancelled - "Host has cancelled the reservation."

Email: Template type cancelledByHost

Socket: Cancelled - "Host cancelled the reservation"
expiredPush: Request Expired - "A booking request has expired."

Email: Template type bookingExpiredHost

Socket: Expired - "Request expired"
Push: Request Expired - "Your booking request has expired."

Email: Template type bookingExpiredGuest

Socket: Expired - "Request expired"
complete... (same as above) ...
issue_claim...
escalate_claim...

Document Approval Workflow Notifications

ActionOwner NotificationAdmin Notification
submitPush: Document Submitted
Socket: DOCUMENT_SUBMITTED
Push: New Document to Review
Email: Template adminDocumentReview
Socket: DOCUMENT_SUBMITTED
resubmitPush: Document Resubmitted
Socket: DOCUMENT_SUBMITTED
Push: Document Resubmitted
Email: Template adminDocumentReview
Socket: DOCUMENT_SUBMITTED
approvePush: Document Approved!
Email: Template documentVerification
Socket: DOCUMENT_APPROVED
requestChangesPush: Changes Requested
Email: Template documentVerification
Socket: DOCUMENT_CHANGES_REQUESTED

Debugging and Simulation

You can simulate notifications and view the generated email HTML in development:

  • Reservations: POST /debug/simulate-reservation-notifications/:threadId
  • Documents: POST /debug/simulate-document-notifications/:documentId

To generate a full set of simulation files for both workflows, run:

yarn workspace @adamondo/backend generate:docs:notifications

The output is saved to ./email-simulations/ in the backend root.