Skip to main content

Purchase

Below is the model for just user.purchase.

Model​

user.purchase
purchase: {
aa: {
appNumber: Number,
pricing: [],
transactionId: Number,
purchaseCompleted: Boolean,
purchaseDate: Date,
policyNumber: String,
paymentMethod: { type: String, enum: ['bank', 'credit'] },
authorizenet: { token: String, lastGenerated: Date }, // NEW - 8.22.22
underwriting: {
approved: Boolean, // not entirely sure what this represents so don't think we should rely on this one
code: { type: String, enum: ['O', 'D', 'R'] }, // Okay(approved), Declined, Referred
message: String,
error: String,
lastUpdated: Date
},
results: {
approved: Boolean,
completed: Boolean,
finalDecisionType: { type: String, enum: ['O', 'D', 'R'] }, // Okay(approved), Declined, Referred
finalDecision: String, // A message describing the results of the application
lastUpdated: Date
},
applicationPDFUrl: String,
beneficiaries: [
{
_id: ObjectId, // set automatically by mongo
name: { first: String, last: String },
phone: { type: Number, set: val => val && getNumber(val) },
email: String,
relationship: {
type: String,
enum: [
'spouse',
'mother',
'father',
'daughter',
'son',
'brother',
'sister',
'cousin',
'aunt',
'uncle',
'grandfather',
'grandmother',
'grandchild',
'niece',
'nephew'
]
}
}
]
termLife: {
defaultPricing: {
coverage: Number,
years: Number
},
selectedPricing: {
coverage: Number,
price: Number,
years: Number
},
incrementValue: Number,
inflationPercentage: Number,
lastUpdated: Date,
lastViewedScreen: {
screenId: {
type: String,
enum: ['start', 'care', 'memorial', 'inflation', 'discount', 'summary']
},
date: Date
},
maximumPrice: Number,
minimumPrice: Number,
monthlyRateMultiplier: Number,
monthlyRateMultiplierLastUpdated: Date,
priceChangeLog: [
{
_id: false,
direction: {
type: String,
enum: ['up', 'none', 'down']
},
date: Date,
screenId: {
type: String,
enum: ['start', 'care', 'memorial', 'inflation', 'discount', 'summary']
}
}
],
selectedPrice: Number, // going to remove this soon
order: {
submittedOn: Date,
orderId: String,
orderType: Number
}
}
},
vantis: {
termLife: {
incrementValue: 25000,
inflationPercentage: 0.008,
minimumPrice: 25000,
monthlyRateMultiplier: "0.00",
monthlyRateMultiplierLastUpdated: "2022-10-12T13:31:37.805Z",
lastUpdated: "2022-10-11T17:03:33.584Z",
lastViewedScreen: {
screenId: "care",
date: "2022-10-11T17:03:33.584Z"
},
priceChangeLog: [
{
direction: "none",
date: "2022-10-07T15:14:08.539Z",
screenId: "care"
},
{
direction: "up",
date: "2022-10-10T13:59:01.469Z",
screenId: "care"
},
{
direction: "none",
date: "2022-10-10T14:10:22.009Z",
screenId: "care"
},
{
direction: "none",
date: "2022-10-11T17:03:33.579Z",
screenId: "care"
}
],
selectedPrice: 20000,
selectedPricing: {
coverage: 20000,
years: 30,
price: "$100.51"
},
maximumPrice: 500000,
defaultPricing: {
coverage: 25000
},
plans: [
{
PlanID: 366,
PlanCode: 6299,
FaceMin: 25000,
FaceMax: 500000,
FaceStart: 25000
}
],
selectedPlan: 366,
userUrl: "https://vantislifeinsurancestgnew.sureify.com?vdtca&uid=710fffb1-099a-4171-9021-e074cf3684f9"
}
}
}

Data​

KeyTypeDescriptionNotes
appNumberNumberThe Application Number provided by AA.
pricingArrayContains an array of pricing values to be used in the Term Policy Builder
transactionIdNumberThe Transaction ID provided by AA. It is created when the application is submitted to the RxMib process.
paymentMethodString Enum - ['bank', credit']The selected payment method the user will be paying with.
underwritingObjectContains values provided by the response from AA's /TermLifeQuestionnaire EP
resultsObjectContains values provided by the response from AA's /Results EP