1.5.0 • Published 6 months ago

solar-configurator-microsite-credit-service v1.5.0

Weekly downloads
-
License
-
Repository
-
Last release
6 months ago

Credit Service BFF

This service handles any Salesforce interactions for the solar configurator front-end, specifically credit/prescreen check.

This app was created with a cdk init --language=typescript and modified from there.

Please see the companion Postman collection for demonstration on use.

Useful commands

These commands from the CDK init boilerplate

  • npm run build compile typescript to js
  • npm run watch watch for changes and compile
  • npm run test perform the jest unit tests
  • cdk deploy deploy this stack to your default AWS account/region
  • cdk diff compare deployed stack with current state
  • cdk synth emits the synthesized CloudFormation template

Deploying

This package runs within the Lerna-controlled monorepo, and is deployed by using GitHub Actions from the root directory of the repository (../.github/workflows).

Service Endpoint details

Prescreen check

This endpoint performs a credit / prescreen check for the provided customer data.

Request

POST /quote-credit/credit
type body = {
  birthday: string; // yyyy-mm-dd
  firstName: string;
  lastName: string;
  street: string;
  city: string;
  state: string;
  zipCode: string;
};

Response

type response = {
  decision: boolean;
  isTest: boolean;
  noHit: boolean;
};

Testing

If you are in a non-prd environment, changing the FORCETEST env var on the lambda will enable mock credit bureau responses. The mock response will return a decision based on the _last digit in the street address.

rangedecision
0-2true
3-9false

Examples:

  • "3620 N York St" -> true
  • "3628 N York St" -> false
  • "114 Main Blvd" -> false
  • "99 Jubilee Dr Apt 1" -> false

AWS Resources

Dashboard

EnvironmentURL
Productionprd-Quote-Dashboard
Stagingmajstg-Quote-Dashboard
Developmentdevmaj-Quote-Dashboard

Lambdas

Credit Check Function

EnvironmentURL
Productionprd-CreditCheck
Stagingmajstg-CreditCheck
Developmentdevmaj-CreditCheck

Disaster Recovery

Please read the disaster recovery plan.

1.5.0

6 months ago

1.4.1

1 year ago

1.2.0

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago