dynamicData map. This page is the
contract for the day-aware variables added for the multiday per-day staffing
feature so a template editor knows exactly what keys arrive and how to render them.
All variables here are additive and backward compatible: single-day
engagements send exactly what they always did. eventDate is upgraded to a
formatted range string only for multiday engagements; performanceFee always
stays the offer-level fee. A template that ignores the new keys keeps working.
The API sets a key only when it has a value. Always guard with
{{#if …}}
/ {{#each …}}. Never assume a key is present.Event title vs offer / request title
eventName is the offer or availability-request title (often the role, e.g.
Front-of-House Engineer). eventTitle is the linked gig title (e.g.
Saturday Night Headliner). The API sends eventTitle only when it is present
and different from eventName, so templates can show both without duplicating
the same line.
eventName and do not send a
separate eventTitle.
The shared day array
Every offer/availability recipient email (and the offer acceptance email) carries these keys when the engagement spans more than one day:
Each object in
days:
An offer is per-day-rated when any of its days sets its own
fee override;
then every day’s fee shows its effective rate (day.fee ?? offer.fee) and
rateCardTotal is the sum. Availability requests never carry a fee, so their day
objects always have an empty fee and no rateCardTotal.
Paste-ready day list
Offer acceptance confirmation — accepted days
SENDGRID_TEMPLATE_FOR_CREW_OFFER_ACCEPTANCE additionally receives the
recipient’s accepted day subset, plus an .ics file attachment (gig.ics)
covering those days:
Paste-ready accepted-days block
Requester response emails — structured summary
The response-to-requester templates now receive the day summary as its own variables instead of it being glued intoresponseNotes. responseNotes is once
again the responder’s free-text notes only.
Affected templates:
SENDGRID_TEMPLATE_FOR_CREW_OFFER_RESPONSE_TO_REQUESTER,
SENDGRID_TEMPLATE_FOR_AVAILABILITY_RESPONSE_TO_REQUESTER,
SENDGRID_TEMPLATE_FOR_INVITATION_RESPONSE_TO_REQUESTER.
Requester card layout
Keep the card short: rollup badge + per-day datetime rows with action status + optional notes. Preferdays[].status over responseSummary
(summary is still sent for SMS / legacy).
Each days[] item may include:
Badge (API never sends
PARTIAL; derive it in the template):
- Offer: both
acceptedDays+declinedDays→ Partial (amber); only accepted → Accepted; only declined → Declined - Availability: both
availableDays+unavailableDays→ Partial; otherwise Available / Unavailable
Invitation emails
Invitation templates key their date variables off the event, not off offer day rows. They now also receive the span:daysUntilEvent and responseDeadline remain keyed to the event start.
Affected templates: SENDGRID_TEMPLATE_FOR_ORG_INVITATION,
SENDGRID_TEMPLATE_FOR_NON_ORG_INVITATION,
SENDGRID_TEMPLATE_FOR_INVITATION_UPDATE,
SENDGRID_TEMPLATE_FOR_INVITATION_REMINDER,
SENDGRID_TEMPLATE_FOR_INVITATION_ACCEPTANCE. The acceptance email attaches a
multiday .ics (one VEVENT per event day) for multiday events.
Which template gets which variables
Where this is built (for engineers)
- Shared day-var builder:
api-events/src/systems/crew-offers/engagementEmailDays.ts(DayEmailVars,AcceptedDayVars, date-range + money formatting). - Offer/availability renderers that emit the vars:
api-events/src/systems/crew-offers/crewOfferNotificationRenderer.ts,api-events/src/systems/availability-requests/availabilityRequestResponseRenderer.ts. - Requester response vars + attachment plumbing:
api-events/src/systems/crew-offers/crewOfferResponseNotificationProcessor.ts. - Invitation span vars:
api-events/src/systems/invitations/invitationNotificationRenderer.ts. - ICS generation (multiday event + offer accepted-days segments):
api-events/src/systems/crew-offers/crewOfferAcceptedIcs.ts,api-events/src/utils/ics.ts.