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.
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
This package runs within the Lerna-controlled monorepo, and is deployed by using GitHub Actions from the root directory of the repository (../.github/workflows
).
This endpoint performs a credit / prescreen check for the provided customer data.
POST /quote-credit/credit
type body = {
birthday: string; // yyyy-mm-dd
firstName: string;
lastName: string;
street: string;
city: string;
state: string;
zipCode: string;
};
type response = {
decision: boolean;
isTest: boolean;
noHit: boolean;
};
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
Environment | URL |
---|---|
Production | prd-Quote-Dashboard |
Staging | majstg-Quote-Dashboard |
Development | devmaj-Quote-Dashboard |
Environment | URL |
---|---|
Production | prd-CreditCheck |
Staging | majstg-CreditCheck |
Development | devmaj-CreditCheck |
Please read the disaster recovery plan.