Skip to main content
Join the Agentforce Hackathon on Nov. 18-19 to compete for a $20,000 Grand Prize. Sign up now. Terms apply.

Create the Quote

Learning Objectives

After completing this unit, you’ll be able to:

  • List the steps to create an insurance quote.
  • Describe how to get details of an existing quote.
  • Identify the process to show confirmation information for a quote.

Create an Insurance Quote

Consider createUpdateQuote, the service that creates a quote. Several pieces of information go into creating the quote: configured products, the effective date, the insured items or parties, and the associated opportunity and account for the quote.

Multiple inputs for creating a quote.

Note

The createUpdateQuote service updates an existing quote if you input an existing quote ID into the service.

The service creates the new quote along with its quote line items, and then returns the ID of the new quote. Both the input and output are in JSON format. These are sample snippets of input JSON and output JSON for createUpdateQuote. The service looks in a JSON node you specify as the inputKey. Here the inputKey is quoteJson.

The input JSON and output JSON for createUpdateQuote service.

Note

Get the required input JSON for a root product from its API tab.

You must associate all root products and child specs with the specified pricebook. Missing one or more is a common error that can prevent you from creating the quote. The rating calculation sets the actual price, but Salesforce requires the pricebook and pricebook entries to create the quote and its line items.

View the New Quote

After the quote is created, the createUpdateQuote method returns the quote ID.

You can use one of these ways to view the new quote.

  • Go to Quotes items and open the most recent quote. This is useful in a test environment with few quotes.
  • Copy the quoteId value from the createUpdateQuote response in the Action Debugger and replace the text after ...force.com/ in the URL. The ID added to a URL looks similar to ...force.com/0Q06g000000GvXNCA0.

The quote record page provides a lot of information.

The quote record page with Quote LWC and Details tabs.

The Quote LWC tab (1) provides information about the coverages included, attribute values, and information on the applicable insureds. The Details tab (2) includes the quote number, the associated account, premium amounts, quote line items, and much more. And what’s more, this record page is customizable!

Quote Line Items

For quote line items on the Details tab, click View All for a full list. The root product, the insured items and parties, and the coverages all save as quote line item records for the quote. Here are quote line items for a multi auto quote at Cumulus. Each quote line item gets a unique identifier—a line item number. References to that line item number define the product structure.

The quote line items with line item numbers highlighted.

The parent item ID of each item references the line item number of its root product. Then, the root product references all the items. The ID is always blank for the root product itself. Here, Multi Auto is the root product so its parent item ID is blank. All the other items reference the Multi Auto root product’s line item number as their parent item ID.

The Multi Auto root product with a line item number and a blank parent item ID.

Each line item also includes a sub parent item ID. This ID defines structural relationships such as a coverage for a particular insured. In this example, the first set of four coverages are for the first auto and reference its line item number. The next set of coverages are for the second auto so their sub parent item ID reference that auto.

The quote line items with sub parent IDs linked to each vehicle.

The coverages for the first auto have sub parent item ID of 00000096, which matches the line item number of the insured auto, while the second auto coverages have 00000097 to match the second insured auto.

Quote Item Relationship

What if insured parties are associated with multiple insured items, such as drivers with multiple vehicles? Do you store the same person’s information multiple times and then update that information in multiple places? No. Instead, store a person’s information once. The relationship between that person, also called the grandchild party, and its insured item stores in a separate object: the Quote Item Relationship object.

The Quote Item Relationship object:

  • Is a junction object.
  • Relates two quote line items to each other.
  • Uses lookup fields for the parent quote line item and the child quote line item.
  • Tracks many-to-many relationships between quote line items such as the relationships between one or more vehicles and one or more drivers on an auto insurance quote.

Amy’s a professional chauffeur and her employer has purchased Cumulus multi-auto insurance for her. Justus stores Amy once as a grandchild insured party. She drives multiple vehicles, each of which Justus stores as a child insured item. There are two quote item relationship records, one for Amy with each vehicle.

The quote item relationship between Amy, the two junction objects, and the two vehicles.

You can find these relationship records by selecting a related line item from the list of quote line items. The quote item relationships appear on its Related tab.

View Attributes and Premiums

Attributes and premium information are stored with each line item. The attributes are stored as a JSON object in each line’s Attribute Selected Values field. Premiums are stored on each Sales Price field and roll up related values.

Here are some key facts about premiums and product specs.

  • Coverages have premiums when mapped to insureds.
  • Primary insureds, such as the vehicle, have the total premium for the instance.
  • The root product has the grand total premium for all lines related to it.
  • The quote has the total premium for all the root products.

The attribute and premium information are shown in the list of all quote line items. Select a quote line item to view its details.

Here’s Cumulus Bodily Injury & Property Damage coverage. It shows the Sales Price, $18.81, and JSON for the attribute values in the Attribute Selected Values field.

The quote line item for bodily injury coverage shows its sales price and attribute values.

Get Quote Information

Do you want to get information about an existing quote? No problem. Use the getQuoteDetail service. It takes an existing quote ID and returns information about the configured products, the insured items, and the quote.

The Quote ID returning configured products, insured items, and quote field values.

You simply provide the quote ID in an option for the service and get back a JSON with lots of details.

Here’s a sample JSON output from getQuoteDetail and the different types of information it provides.

  • productConfigurationDetail: Includes details about product configuration and product JSON structure model.
  • insuredItems: Includes details about insured items, insured parties, and InsuredItemSpec and InsuredPartySpec quote line items.
  • quoteDetail: Includes quote field values with attributes based on the QuoteDetail field set of the Quote object.

The getQuoteDetail service returns quote details in JSON using an existing quote ID.

Show Quote Information

With Salesforce, building a confirmation page for your user with information about their new quote is easy and simple. You can build the page yourself in the OmniScript, or take advantage of the Lightning web component, insOsConfirmation. This component shows the quote information you provide in a JSON node. This example shows a few of the possible fields, which can include the quote number, names, dates, and amounts.

The confirmation page with quote details built using the insOsConfirmation component.

For more details about the properties of this web component, check out InsOsConfirmation Lightning Web Component.

Nice work! You now can configure OmniScripts that help users to easily find, rate, and quote insurance products. With your knowledge of key services, Lightning web components, and other tools, you can now customize guided flows to fit your specific quoting needs.

Want to Learn More?

If you’re a Salesforce customer, check out these learning journeys to discover how to skill up on our suite of digital transformation tools and industry applications.

If you’re a Salesforce partner, you can find the same great learning plus additional partner resources on Partner Learning Camp (login required). #AlwaysBeLearning

Resources

Condividi il tuo feedback su Trailhead dalla Guida di Salesforce.

Conoscere la tua esperienza su Trailhead è importante per noi. Ora puoi accedere al modulo per l'invio di feedback in qualsiasi momento dal sito della Guida di Salesforce.

Scopri di più Continua a condividere il tuo feedback