tour-requested
Source of truth:
packages/notifications/src/translations.ts
Quick facts
Section titled “Quick facts”| Domain | Channels | Recipients |
|---|---|---|
| tours | in-app + email + push | Agent on the property |
Trigger sites
Section titled “Trigger sites”| Source | Context |
|---|---|
packages/api/src/services/tours.ts:425 | createTour |
Payload — TourRequestedData
Section titled “Payload — TourRequestedData”interface TourRequestedData { customerName: string; propertyAddress: string; listingUrl: string; scheduledAt: string;}Channel steps
Section titled “Channel steps”Trigger step
Section titled “Trigger step”The caller invokes triggerWorkflow('tour-requested', recipientIds, data) where data is the TourRequestedData shape above. The server pre-translates the payload via getTranslatedPayload('tour-requested', recipientLocale, data) from @repo/notifications before sending, producing { inAppBody, emailSubject, emailBody } for the dashboard templates to render.
In-app feed
Section titled “In-app feed”Knock dashboard template body: {{ inAppBody }}.
| Locale | Preview source |
|---|---|
es | 🗓️ ${p.customerName} solicitó un recorrido en ${p.propertyAddress} para ${p.scheduledAt} |
en | 🗓️ ${p.customerName} requested a tour at ${p.propertyAddress} on ${p.scheduledAt} |
Subject: {{ emailSubject }}. Body: {{ emailBody }} (HTML mode, dashboard escaping OFF — every user-supplied string is escaped server-side via escapeHtml from @repo/notifications).
| Locale | Subject preview |
|---|---|
es | Nueva solicitud de recorrido en ${p.propertyAddress} |
en | New tour request for ${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 (Android FCM)
Section titled “Push (Android FCM)”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.
See also
Section titled “See also”- Notifications overview — the workflow grid, source-of-truth file map.
- Configuration — env vars, dashboard checklist, channel mapping.