ecomm-prospect-service
v1.6.0
Published
This service handles any backend requirements for the EV charger front-end.
Readme
Ecomm Prospect Service (BFF - Backend for Frontend)
This service handles any backend requirements for the EV charger front-end.
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 buildcompile typescript to jsnpm run watchwatch for changes and compilenpm run testperform the jest unit testscdk deploydeploy this stack to your default AWS account/regioncdk diffcompare deployed stack with current statecdk synthemits 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
Service Name: getContact
Service URL: https://gateway.sunrun.com/majstg-ecomm-prospect/contacts
Service Payload: prospectId
Service Method: Get
Service Name: saveOpportunity and updateMobileNumber
Service URL: https://gateway.sunrun.com/majstg-ecomm-prospect/opportunities
Service Payload: {prospectId, futureContactDateTime, firstName, lastName, productOffering, orderId, emailAddress, street, city, state, postalCode, phone, mobile, country }
Service Method: Post
Notes: If there is no prospectId, all fields are required besides futureContactDateTime. If there is a prospectId, only changed fields are needed.
Service Name: createLead
Service URL: https://gateway.sunrun.com/majstg-ecomm-prospect/lead
Service Payload: {prospectId, productOffering, customerFirstName, customerLastName, customerEmail, customerPrimaryPhone, mobilePhone, startTime}
Service Method: Post
Service Name: saveProposal
Service URL: https://gateway.sunrun.com/majstg-ecomm-prospect/proposals
Service Payload: {prospectId, correlationId, customerInformation: { fullName, state, utility, salesDivision, salesPartner }}
Service Method: Post
Service Name: updateOdiDeposit
Service URL: https://gateway.sunrun.com/majstg-ecomm-prospect/update-odi-deposit
Service Payload: prospectId
Service Method: Patch
Disaster Recovery
Please read the disaster recovery plan.
