1.32.0 • Published 5 months ago

solar-configurator-microsite-prospect-service v1.32.0

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

Prospect Service (BFF - Backend for Frontend)

This service handles any Salesforce interactions for the solar configurator front-end, including creating leads, quotes, and pulling utilities by zip code.

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

Create Lead

This endpoint helps to create a new Lead in SFDC.

Request

POST /quote-prospect/lead
type body = {
  campaignCode: string;
  productOffering: string;
  utilityName: string;
  customerFirstName: string;
  customerLastName: string;
  customerEmail: string;
  customerPrimaryPhone: string;
  customerStreet: string;
  city: string;
  state: string;
  postalCode: string;
  ownsHome: boolean;
  acceptedToS: boolean;
  notes: string;
  leadSource?: string;
  content?: string;
  avgMonthlyBill?: number;
  priceEstimate?: number;
  electricRateSavings?: number;
  selectedOffset?: number;
  numberOfBatteries?: number;
  latitude?: number;
  longitude?: number;
};

Response

type response = {
  expires: number;
  leadId: string;
  leadStatus: string;
  prospectId: string;
  signature: string;
  quote: {
    id: string;
    success: boolean;
    errors: Array<string>;
  };
  _links: {
    partnerPortal: {
      href: string;
    };
    self: {
      href: string;
    };
  };
};

Get Available Utilities

Returns the available utilities for the provided state and zip code.

Request

POST /quote-prospect/utility
type body = {
  state: string;
  zipCode: string;
};

Response

type response = Array<string>;

AWS Resources

Dashboard

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

Lambdas

Create Lead Function

EnvironmentURL
Productionprd-CreateLead
Stagingmajstg-CreateLead
Developmentdevmaj-CreateLead

Get Utilities Function

EnvironmentURL
Productionprd-GetUtilities
Stagingmajstg-GetUtilities
Developmentdevmaj-GetUtilities

Disaster Recovery

Please read the disaster recovery plan. .

1.32.0

5 months ago

1.31.0

7 months ago

1.30.2

8 months ago

1.30.1

8 months ago

1.25.0

11 months ago

1.24.2

1 year ago

1.29.0

9 months ago

1.27.0

9 months ago

1.26.1

10 months ago

1.28.0

9 months ago

1.30.0

9 months ago

1.21.0

1 year ago

1.22.0

1 year ago

1.21.1

1 year ago

1.24.1

1 year ago

1.23.3

1 year ago

1.22.1

1 year ago

1.23.1

1 year ago

1.22.2

1 year ago

1.15.0

2 years ago

1.13.0

2 years ago

1.12.1

2 years ago

1.12.0

2 years ago

1.11.1

2 years ago

1.19.0

2 years ago

1.15.4

2 years ago

1.18.0

2 years ago

1.15.3

2 years ago

1.17.0

2 years ago

1.16.0

2 years ago

1.19.4

1 year ago

1.19.3

1 year ago

1.9.0

2 years ago

1.19.2

1 year ago

1.8.0

2 years ago

1.7.1

2 years ago

1.19.1

1 year ago

1.7.0

2 years ago

1.4.0

2 years ago

1.20.1

1 year ago

1.20.0

1 year ago

1.10.0

2 years ago

1.3.0

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago