Template Variables Tree

模板变量系统设计定稿 - 2024-02-04

string 字符串
number 数字
date 日期/时间
boolean 布尔值
array 数组
computed 计算字段
根变量: appointment — Service 类型模板围绕一个具体的预约事件展开,用于发送预约确认、提醒、完成通知等。
📋 预约基本信息 appointment.*
变量名 完整路径 类型 说明
idappointment.idstring预约ID
dateappointment.datedate预约日期
timeappointment.timetime预约时间
datetimeappointment.datetimedatetime完整时间戳
durationappointment.durationnumber服务时长 (分钟)
endTimeappointment.endTimetime结束时间
statusappointment.statusstring状态 (pending/confirmed/in_progress/completed/cancelled/no_show)
isFirstVisitappointment.isFirstVisitboolean是否首次到店
specialRequestsappointment.specialRequestsstring特殊要求
notesappointment.notesstring备注
💰 价格信息 appointment.*
变量名完整路径类型说明
quotedPriceappointment.quotedPricenumber报价
finalPriceappointment.finalPricenumber最终价格
totalAmountappointment.totalAmountnumber总金额
paymentStatusappointment.paymentStatusstring支付状态 (pending/paid/partial/refunded)
paymentMethodappointment.paymentMethodstring支付方式
👤 客人信息 appointment.guest.*
变量名完整路径类型说明
firstNameappointment.guest.firstNamestring
lastNameappointment.guest.lastNamestring
fullNameappointment.guest.fullNamecomputed全名 (firstName + lastName)
emailappointment.guest.emailstring邮箱
phoneappointment.guest.phonestring电话
dateOfBirthappointment.guest.dateOfBirthdate生日
genderappointment.guest.genderstring性别
loyaltyPointsappointment.guest.loyaltyPointsnumber当前积分
totalVisitsappointment.guest.totalVisitsnumber总访问次数
totalSpentappointment.guest.totalSpentnumber累计消费
membershipTierappointment.guest.membershipTiercomputed会员等级名称
👨‍💼 技师信息 appointment.employee.*
变量名完整路径类型说明
firstNameappointment.employee.firstNamestring
lastNameappointment.employee.lastNamestring
fullNameappointment.employee.fullNamecomputed全名
emailappointment.employee.emailstring邮箱
phoneappointment.employee.phonestring电话
jobTitleappointment.employee.jobTitlestring职位
💅 主服务 appointment.service.*
变量名完整路径类型说明
nameappointment.service.namestring服务名称
descriptionappointment.service.descriptionstring服务描述
categoryappointment.service.categorystring服务分类
priceappointment.service.pricenumber服务价格
durationappointment.service.durationnumber服务时长
imageUrlappointment.service.imageUrlstring服务图片
📋 附加服务列表 appointment.subServices[]
变量名完整路径类型说明
nameappointment.subServices[].namestring服务名称
priceappointment.subServices[].pricenumber价格
durationappointment.subServices[].durationnumber时长
🏪 店铺信息 appointment.store.*
变量名完整路径类型说明
nameappointment.store.namestring店铺名称
phoneappointment.store.phonestring店铺电话
emailappointment.store.emailstring店铺邮箱
websiteappointment.store.websitestring店铺网站
logoappointment.store.logostring店铺Logo
addressappointment.store.addresscomputed完整地址
streetappointment.store.streetstring街道
cityappointment.store.citystring城市
stateappointment.store.statestring
zipCodeappointment.store.zipCodestring邮编
countryappointment.store.countrystring国家
timezoneappointment.store.timezonestring时区
openingHoursappointment.store.openingHoursstring营业时间
根变量: guest — Marketing 类型模板围绕客人展开,用于发送营销活动、生日祝福、召回通知等。
📋 基本信息 guest.*
变量名完整路径类型说明
firstNameguest.firstNamestring
lastNameguest.lastNamestring
fullNameguest.fullNamecomputed全名
emailguest.emailstring邮箱
phoneguest.phonestring电话
dateOfBirthguest.dateOfBirthdate生日
genderguest.genderstring性别
registeredAtguest.registeredAtdatetime注册时间
📊 消费与忠诚度 guest.*
变量名完整路径类型说明
loyaltyPointsguest.loyaltyPointsnumber当前积分
totalVisitsguest.totalVisitsnumber总访问次数
totalSpentguest.totalSpentnumber累计消费
averageSpendguest.averageSpendcomputed平均消费 (totalSpent / totalVisits)
lastVisitDateguest.lastVisitDatedate上次到店日期
daysSinceVisitguest.daysSinceVisitcomputed距上次到店天数
🎖️ 会员信息 guest.*
变量名完整路径类型说明
membershipTierguest.membershipTiercomputed会员等级名称 (bronze/silver/gold/platinum)
membershipColorguest.membershipColorcomputed等级颜色
membershipDiscountguest.membershipDiscountcomputed会员折扣百分比
membershipValidUntilguest.membershipValidUntilcomputed会员到期日期
isVipguest.isVipcomputed是否VIP (tier >= gold)
❤️ 偏好分析 guest.*
变量名完整路径类型说明
favoriteServiceguest.favoriteServicecomputed最常预约的服务
favoriteEmployeeguest.favoriteEmployeecomputed最常指定的技师
preferredStoreguest.preferredStorecomputed最常去的店铺
preferredTimeSlotguest.preferredTimeSlotcomputed偏好时间段 (morning/afternoon/evening)
🏷️ 标签 guest.tags[]
变量名完整路径类型说明
tagsguest.tagsarray标签列表 (字符串数组)
🏠 地址 (可选) guest.address.*
变量名完整路径类型说明
streetguest.address.streetstring街道
cityguest.address.citystring城市
stateguest.address.statestring
zipCodeguest.address.zipCodestring邮编
countryguest.address.countrystring国家
📌 最近一次预约 guest.lastAppointment.*
变量名完整路径类型说明
dateguest.lastAppointment.datedate预约日期
timeguest.lastAppointment.timetime预约时间
serviceNameguest.lastAppointment.serviceNamestring服务名称
employeeNameguest.lastAppointment.employeeNamestring技师名称
storeNameguest.lastAppointment.storeNamestring店铺名称
totalAmountguest.lastAppointment.totalAmountnumber金额
statusguest.lastAppointment.statusstring状态
📅 下一个预约 (如有) guest.nextAppointment.*
变量名完整路径类型说明
dateguest.nextAppointment.datedate预约日期
timeguest.nextAppointment.timetime预约时间
serviceNameguest.nextAppointment.serviceNamestring服务名称
employeeNameguest.nextAppointment.employeeNamestring技师名称
storeNameguest.nextAppointment.storeNamestring店铺名称
通用系统变量 — 这些变量在 Service 和 Marketing 两种类型的模板中都可以使用。
📅 时间 system.*
变量名完整路径类型说明
currentDatesystem.currentDatedate当前日期 (YYYY-MM-DD)
currentTimesystem.currentTimetime当前时间 (HH:MM)
currentYearsystem.currentYearnumber当前年份
currentMonthsystem.currentMonthnumber当前月份
🔗 链接 system.*
变量名完整路径类型说明
bookingLinksystem.bookingLinkstring预约链接
unsubscribeLinksystem.unsubscribeLinkstring退订链接
feedbackLinksystem.feedbackLinkstring反馈链接
accountLinksystem.accountLinkstring账户链接
rewardsLinksystem.rewardsLinkstring奖励/积分链接
🏢 品牌信息 system.brand.*
变量名完整路径类型说明
namesystem.brand.namestring品牌名称
logosystem.brand.logostring品牌Logo
websitesystem.brand.websitestring品牌官网
supportEmailsystem.brand.supportEmailstring客服邮箱