1.6.0 • Published 1 year ago

ecomm-prospect-service v1.6.0

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

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 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

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.