Skip to content

Instantly share code, notes, and snippets.

View AndersonZacharyT's full-sized avatar
🎯

Zach AndersonZacharyT

🎯
View GitHub Profile
@AndersonZacharyT
AndersonZacharyT / re-lead-example.jason
Created July 12, 2021 19:23
Generic Real Estate Lead Payload
{
"name": "James Bond",
"email": "bond@jamesbond.com",
"phone": "1-305-555-1234",
"zipCode": "32958",
"purchasePriceRange": "200k - 220k",
"creditProfileRange": "740 - 760",
"propertyType": "Single Family",
"purchaseTimeline": "3 - 6 Months",
"leadId": "br12345678912345678912lid"
@AndersonZacharyT
AndersonZacharyT / ojo-guided-submission-schema-v1.json
Created October 6, 2020 13:51
ojo-guided-submission-schema-v1
{
"customer_id": "customerId123",
"event_name": "mortgage_movojo_confirmation_event",
"attributes": {
"offers": [
{
"lender": "ConsumerDirect Mortgage, a division of First Bank",
"lenderId": 8087,
"productRate": "2.875",
"productAPR": "2.944",
EXAMPLE REQUEST
curl --location --request POST 'https://atlas.amerisave.com/7~A0144432879A4227B66C1D23E73C63B1/V2/Bankrate/v1/BankrateLeadPost' \
--header 'Authorization: Basic YmFua3JhdGV3ZWJzZXJ2aWNldXNlcjpEenpyQ2ltUQ==' \
--header 'Content-Type: application/json' \
--header 'Cookie: AMC="%7B%22RATESDSN%22%3A%7B%7D%7D"' \
--data-raw '{"isFirstPropertyPurchase":true,"downPaymentPercent":0.20000000000000001,"purchasePriceAmount":230000,"purchasePriceRange":"220001-240000","propertyPurchaseSituation":"Signed a Purchase Agreement","downPaymentAmount":46000,"rateTypeDesired":"Fixed","isWorkingWithRealtor":true,"grossAnnualIncomeAmount":62500,"grossAnnualIncomeRange":"50001-75000","bankrateLeadId":"br15947433821740418906lid","productDesc":"30 yr fixed-0 point","productRate":3.25,"productAPR":3.25,"universalLeadId":"435d3f10-3d37-452f-ae7c-d2d38f829b0f","loanType":"Purchase","propertyType":"SingleFamily","propertyUse":"PrimaryResidence","creditProfileDescription":"740+","creditProfileAmount":740,"loanAmount":18400
Here's how our general-case direct lender integration works:
1.) Bankrate POSTs a JSON payload to the lender
2.) The lender receives the payload, and returns a JSON payload with an appropriate HTTP status code
Success Response:
expected HTTP status code: 200
expected JSON response:
{
redirectUrl: 'www.amerisave.com/application?id=1234`
// disables duplicate lead checks, disables the check of answer
window.setFeatureFlags({
multiSelectLeadConfirmation: false,
duplicateLeadsDisabled: false
})
// if the integration isn't yet 'live', you can enable it like this:
// (configured state restrictions still apply)
window.testUtilities.enableLenderIntegrationById(7950)
@AndersonZacharyT
AndersonZacharyT / payload.js
Last active March 28, 2019 22:11
Cohesion Error
const payload = {
"@type": "redventures.ecommerce.v1.ProductListViewed",
"product": [
{
"productId": 0,
"category": "purchase",
"brand": "first mortgage direct",
"position": "1",
"location": "consumer choice",
"termLength": "30 year fixed",
TypeError: Cannot read property 'reduce' of undefined
at <anonymous>:1:67
at <anonymous>:2:315
at https://www.googletagmanager.com/gtm.js?id=GTM-N74D8C:3230:414
at Object.c [as __html] (https://www.googletagmanager.com/gtm.js?id=GTM-N74D8C:3232:152)
at Vb (https://www.googletagmanager.com/gtm.js?id=GTM-N74D8C:3102:738)
at g (https://www.googletagmanager.com/gtm.js?id=GTM-N74D8C:3138:131)
at https://www.googletagmanager.com/gtm.js?id=GTM-N74D8C:3081:114
at Array.<anonymous> (https://www.googletagmanager.com/gtm.js?id=GTM-N74D8C:3140:61)
at Object.uf (https://www.googletagmanager.com/gtm.js?id=GTM-N74D8C:3139:317)
@AndersonZacharyT
AndersonZacharyT / bankrateSelect.md
Last active February 19, 2019 18:06
Bankrate Select™

Bankrate Select™ allows users to submit leads around the clock and still get a shot at the best rates

Building on top of the magic of Lender Matching™, we're able to collect leads during non-peak hours and sell them to their best matched (or lowest rate) lender. We could do this on a matching/submitting job that runs during peak hours and only sells these blind leads to whitelisted advertisers

@AndersonZacharyT
AndersonZacharyT / takeaways.md
Created December 21, 2017 17:00
Git Discussion #4 Takeaways
@AndersonZacharyT
AndersonZacharyT / gitOptions.md
Last active December 21, 2017 15:29
Git Options

Git Proposal

This proposed Git workflow aims to remove the bus from daily parlance

Regular Development...
  • Create feature/bugfix branches from Master
  • (optional) Merge feature(s) into development for Dev testing (auto-deploy)
  • Merge features(s) into release-candidate for QA/UAT testing (can be feature branch or dev->release-candidate polyfeature if reasonable)
Regular Releasing...

Developers Tag release from master on GitHub: add release notes (esp. env vars, etc)