solar-configurator-microsite-credit-service
v1.5.0
Published
A service to call the prescreen function of the credit service
Downloads
3
Readme
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 jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testscdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk 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.
| range | decision | | ----- | -------- | | 0-2 | true | | 3-9 | false |
Examples:
- "3620 N York St" -> true
- "3628 N York St" -> false
- "114 Main Blvd" -> false
- "99 Jubilee Dr Apt 1" -> false
AWS Resources
Dashboard
| Environment | URL | | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | Production | prd-Quote-Dashboard | | Staging | majstg-Quote-Dashboard | | Development | devmaj-Quote-Dashboard |
Lambdas
Credit Check Function
| Environment | URL | | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | Production | prd-CreditCheck | | Staging | majstg-CreditCheck | | Development | devmaj-CreditCheck |
Disaster Recovery
Please read the disaster recovery plan.