Skip to content

tour-denied

Source of truth: packages/notifications/src/translations.ts

DomainChannelsRecipients
toursin-app + email + pushCustomer who requested the tour
SourceContext
packages/api/src/services/tours.ts:554updateTourStatus
interface TourDeniedData {
agentName: string;
propertyAddress: string;
denyReason: string;
listingUrl: string;
}

The caller invokes triggerWorkflow('tour-denied', recipientIds, data) where data is the TourDeniedData shape above. The server pre-translates the payload via getTranslatedPayload('tour-denied', recipientLocale, data) from @repo/notifications before sending, producing { inAppBody, emailSubject, emailBody } for the dashboard templates to render.

Knock dashboard template body: {{ inAppBody }}.

LocalePreview source
es❌ ${p.agentName} rechazó el recorrido en ${p.propertyAddress}
en❌ ${p.agentName} denied the tour at ${p.propertyAddress}

Subject: {{ emailSubject }}. Body: {{ emailBody }} (HTML mode, dashboard escaping OFF — every user-supplied string is escaped server-side via escapeHtml from @repo/notifications).

LocaleSubject preview
esRecorrido rechazado en ${p.propertyAddress}
enTour denied at ${p.propertyAddress}

Email body is composed by emailBody.es in packages/notifications/src/translations.ts via the layout components in packages/notifications/src/email-layout.ts (wrapEmailLayout, ctaButton, calloutBox, quoteBlock, propertyCard, detailTable / detailRow). Body source is not inlined here because it spans tens of lines per locale — open the source file for the full template.

Push delivery is configured at the Knock dashboard level for this workflow (FCM channel step with {{ inAppBody }} as the notification body). iOS APNs is deferred until the dashboard p8 key is wired — see Configuration → mobile push.