Skip to main content

Preneed (Final Wishes)

Below is the model for just user.preneed.

Model​

user.preneed
preneed: {
finalExpenses: {
bulletPoints: [String],
estimate: Number,
incrementValue: Number,
inflationPercentage: Number,
lastUpdated: Date,
lastViewedScreen: {
screenId: {
type: String,
enum: ['details', 'climate', 'surroundings', 'hobbies', 'travel', 'food', 'rest']
},
date: Date
},
maximumPrice: Number,
minimumPrice: Number,
monthlyRateMultiplier: Number,
monthlyRateMultiplierLastUpdated: Date,
priceChangeLog: [
{
direction: {
type: String,
enum: ['up', 'none', 'down']
},
date: Date,
screenId: {
type: String,
enum: ['details', 'climate', 'surroundings', 'hobbies', 'travel', 'food', 'rest']
}
}
],
selectedPrice: Number
},
userInfo: {
type: {
name: {
first: String,
last: String
},
dateOfBirth: Date,
gender: { type: String, enum: ['Male', 'Female'] }, //based on efunerals values
address: {
street1: String,
street2: String,
city: String,
state: String,
zip: String,
country: String,
coords: { type: Array, default: undefined }
},
email: String,
phone: Number,
stageComplete: Boolean,
display: { type: Array, default: undefined }
},
default: undefined
},
experience: {
type: {
style: Number,
category: Number,
invitedType: { value: Number, skip: Boolean },
vibe: { value: Number, skip: Boolean },
donations: { value: String, skip: Boolean },
celebrationType: { value: Number, skip: Boolean },
celebrationSpecific: { value: Number, somethingElse: String, skip: Boolean }, // note: somethingElse (if exists) should take precedence over the state in value
stageComplete: Boolean,
display: { type: Array, default: undefined }
},
default: undefined
},
venue: {
type: {
services: {
name: String,
address: {
street1: String,
street2: String,
city: String,
state: String,
zip: String,
country: String,
coords: { type: Array, default: undefined }
},
somewhereElse: Boolean, // this may be obselete now - Marc/2.11.2022
myFamilyCanDecide: Boolean,
theFuneralHome: Boolean,
skip: Boolean
},
afterServices: {
name: String,
address: {
street1: String,
street2: String,
city: String,
state: String,
zip: String,
country: String,
coords: { type: Array, default: undefined }
},
myFamilyCanDecide: Boolean,
skip: Boolean
},
stageComplete: Boolean,
display: { type: Array, default: undefined }
},
default: undefined
},
disposition: {
type: {
style: Number,
location: {
skip: Boolean,
name: String,
address: {
street1: String,
street2: String,
city: String,
state: String,
zip: String,
country: String,
coords: { type: Array, default: undefined }
},
myFamilyCanDecide: Boolean,
keepItInAnUrn: Boolean
},
plot: {
skip: Boolean,
purchased: Boolean
},
stageComplete: Boolean,
display: { type: Array, default: undefined }
},
default: undefined
},
family: [
{
_id: String / ObjectId,
name: {
first: String,
last: String,
middle: String
},
image: String,
phone: Number,
email: String,
shellEmail: String,
inviteUrl: String,
preneed: {
...userInfo
}
}
],
nextPlanningStage: {
name: String,
id: Number
},
viewedPrice: Boolean,
viewedAddOns: Boolean,
viewedSubmitOrder: Boolean,
completedPlanning: Boolean,
addOns: [Object],
estimates: [Object],
paymentOptions: [Object],
packageName: String,
packageId: String,
funeralHome: { type: Schema.Types.ObjectId, ref: 'FuneralHome', default: undefined },
funeralHomeSkipped: { type: Boolean, default: false },
preSelectedCompany: { type: Schema.Types.ObjectId, ref: 'Company', default: undefined },
lastScreen: {
platform: { type: String, enum: ['app', 'web'] },
screen: String,
date: Date
},
actions: [Object],
plan: {
planType: { type: String, enum: ['outright', 'insurance'] },
price: Number,
years: Number,
paymentDescription: String
},
medicaid: Boolean,
tos: Date,
order: {
submittedOn: Date,
orderId: String,
orderType: Number
},
eFuneral: {
url: String,
saleId: String,
efSaleStartedDate: Date,
packageFundingSigned: Boolean
},
shownGPL: [Object],
packageData: Object, //what the user bought,
typeForm: [Object], //raw dump from typeform,
providerNearby: Boolean,
planningJournalEmailed: Boolean, //if person got pj emailed to them via mailchiimp
packagePDFDownloaded: Boolean, //if person downloads pdf via nicks ads
hasSeenCompleteDetails: Boolean, //need because user can go back and forth in flow
hasSeenSubmitOrder: Boolean //need because user can go back and forth in flow
}

Data​

KeyTypeDescriptionNotes
completedPlanningBooleanDenotes whether the user has completed all of the planning (Final Wishes) steps. Does not take into account any purchase-related steps.Previously this key has also been set true if a preneed.order.orderId was detected, this should no longer be the case as of April 13, 2022
orderObjectContains information about the user's order. The order can be either a preneed/planning purchase or a Final Expenses purchase, as noted by the orderType.See below for more detailed information about orders.

Order Info​

KeyTypeDescriptionNotes
submittedOnDateThe date the order was submitted on.
orderIdStringThe id of the order made. Final Expenses orders will be prefixed with FE-
orderTypeNumber - [0, 1]The type of order placed by the user. Type 0 refers to planning/preneed order, type 1 refers to a Final Expenses order.