Create and Update Custom Quotes for Work Order Estimation

Create or update quotes by using preferred customizations, implementing your own quoting API. Launch the flow from any of the available records, such as accounts, assets, quote, order, and worktypegroup.

Required Editions

Available in: Lightning Experience
Available in: Automotive Cloud, Communications Cloud, Consumer Goods, Energy and Utilities Cloud, Manufacturing Cloud, Service Cloud, and Media Cloud. View edition availability.
REQUIRED USER PERMISSIONS  
To create and update custom quote:

Omnistudio Admin

AND

Salesforce Pricing Admin

AND

Salesforce Pricing Manager

AND

Salesforce Pricing Design Time User

Before you begin, create a page for the Work Estimation in the account console.

  1. From the App Launcher, select the page that you created for Work Estimation.
  2. It populates the enterQuoteDetails page, enter the quote name, price book, and address here.
    Lightning Message Service (LMS) triggers the quotedata event and the event is consumed by the Custom Navigation for Work Estimation Lightning web component. Here’s an example of the generated data
    {
                "name": "quotedata",
                "coRelationId": "eventCoRelationId",
                "detail": {
                "Status": "Draft",
                "Name": "quoteNameInput",
                "Id": "quoteIdToUpdate",
                "AssetId": "assetId",
                "WorkTypeGroupId": "workTypeGroupId",
                "ShippingCity": "City",
                "QuoteAccountId": "Id",
                "ShippingState": "State",
                "Pricebook2Id": "selectedPriceBookId",
                "ShippingStreet": "Street",
                "ShippingCountry": "Country",
                "ShippingPostalCode": "PostalCode",
                "RelatedWorkId": "workOrderId"
                }
                }
                
    
  3. Click Next.
    The Orchestrate Lightning Message Service Events Lightning web component manages a navigation event. ‌Here’s an example of the data generated during the event.
    {
                "name": "navigation",
                "coRelationId": "eventCoRelationId",
                "detail": {
                "action": "Next",
                "stepName": "stepName",
                "quoteInput": {
                "Status": "Draft",
                "Name": "quoteNameInput",
                "Id": "quoteIdToUpdate",
                "AssetId": "assetId",
                "WorkTypeGroupId": "workTypeGroupId",
                "ShippingCity": "City",
                "QuoteAccountId": "Id",
                "ShippingState": "State",
                "Pricebook2Id": "selectedPriceBookId",
                "ShippingStreet": "Street",
                "ShippingCountry": "Country",
                "ShippingPostalCode": "PostalCode",
                "RelatedWorkId": "workOrderId"
                },
                "quoteIdInput": "quoteId"
                }
                }
    

    The Orchestrate Lightning Message Service Events Lightning web component evaluates if the quoteInput field contains an ID. A quote creation triggers 'createquote' event, and a quote modification and a quote modification triggers the 'updatequote' event.

    {
                  "name": "updatequote" / "createquote",
                  "coRelationId": "eventCoRelationId",
                  "detail": {
                  "Status": "Draft",
                  "Name": "quoteNameInput",
                  "Id": "quoteIdToUpdate",
                  "AssetId": "assetId",
                  "WorkTypeGroupId": "workTypeGroupId",
                  "ShippingCity": "City",
                  "QuoteAccountId": "Id",
                  "ShippingState": "State",
                  "Pricebook2Id": "selectedPriceBookId",
                  "ShippingStreet": "Street",
                  "ShippingCountry": "Country",
                  "ShippingPostalCode": "PostalCode",
                  "RelatedWorkId": "workOrderId"
                  }
                  }
                
  4. To use a custom event, open the disable create quote listener field and disable the update Quote Listener from the Work Estimation CUD Operations Handler Lightning web component, and set their value to 'True'.

    The default value for these fields is False. For the createquote event, disable the Create Quote Listener field. For the updatequote event, disable the Update Quote Listener field.

  5. Enter the customized data and Lightning web components, and proceed with the events which are mentioned earlier.
  6. Create a quotecreate event.
    A customized quote is created. Here’s an example of an event.
    {
              name: "quotecreated",
              coRelationId: "eventCoRelationId",
              detail: "quoteId"
              }