---
schema_version: "1"
id: 5b91f665e50a7bd820f67415ff7d38d472aae64386187e888e3710cb3caca423
title: Finalize Quote Approval
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/xcloud/264-0-0/aslm_lightning_web_component_finalize_quote_approval.md
canonical_url: https://help.salesforce.com/s/articleView?id=xcloud.aslm_lightning_web_component_finalize_quote_approval.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: d9b162b06382c40f74c6e3be7654f4cefd69c63724ecac33f31e8cb2a5e6b783
description: Set a quote to approve or reject status stating a reason in the description. It creates new work orders or merges work orders under the existing parent work order conditionally.
products:
  - Industry Solutions
  - Cross Cloud
release: "264"
---
# Finalize Quote Approval

Set a quote to approve or reject status stating a reason in the description. It creates new work orders or merges work orders under the existing parent work order conditionally.

## Input Fields

These are the parameters for the ‌quote configuration.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small "><colgroup><col style="width:50%"> <col style="width:50%"></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Field Name</td><td class="slds-cell-wrap" style="vertical-align:top;">Description</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Quote ID (mandatory)</td><td class="slds-cell-wrap" style="vertical-align:top;">Indicates the ID for which the quote is approved and the work orders will be created.</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Launch Record ID</td><td class="slds-cell-wrap" style="vertical-align:top;">Indicates the ID from which this LWC or the related flow is triggered or launched.</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Valid Work Order Statuses</td><td class="slds-cell-wrap" style="vertical-align:top;">Indicates the work order status such as New, Draft, or In Progress, separated by a comma without any space.</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Book Service Appointment URL</td><td class="slds-cell-wrap" style="vertical-align:top;">Indicates the URL for the book service appointment page.</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Event Co-Relation ID</td><td class="slds-cell-wrap" style="vertical-align:top;">Indicates the ID to track the events produced and consumed during LMS.</td></tr></tbody></table>

## Output Fields

None

## Published LMS Events and Triggers

These are the events and their trigger condition during a work order update or creation in a quote.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <tbody>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">Event Name</td>

            <td class="slds-cell-wrap" style="vertical-align:top;">Trigger Condition</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">createworkorder</td>

            <td class="slds-cell-wrap" style="vertical-align:top;">This event triggers after you select approve, after selecting yesto approve the quote
              and select the option to generate a new work order.</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">mergeworkorder</td>

            <td class="slds-cell-wrap" style="vertical-align:top;">This event triggers after you select approve, after selecting yesto approve the quote
              and merge it to the existing work order.</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">updatequotestatus</td>

            <td class="slds-cell-wrap" style="vertical-align:top;">
              <p>This event triggers when you reject a quote by selecting the No option, providing a
                reason, and then clicking Reject.</p>
              <p style="margin-bottom:0;">This event triggers when you approve after
                selecting yes to approve the quote and select no to create work orders.</p>
              <p style="margin-bottom:0;">This event
                triggers when you approve a quote that has work order details on its line items. Select
                yesand select approve as the usual work order options won't be displayed.</p>
            </td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">showtoast(Operation Type: graphql error, Operation Status: false)</td>

            <td class="slds-cell-wrap" style="vertical-align:top;">
              <p>This event triggers if an error occurs when fetching these data:</p>
              <ul>
                <li>QLIs under the work source and quote</li>

                <li>Child or sibling work orders for the work order from which the flow is launched</li>

                <li>Existing or new work order number</li>

              </ul>
            </td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">quotestatusupdated</td>

            <td class="slds-cell-wrap" style="vertical-align:top;">This event triggers when you fetch details such as quote lines or work sources for a
              quote that is in an approved or rejected status.</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">urlnavigation</td>

            <td class="slds-cell-wrap" style="vertical-align:top;">This event triggers when you select the hyperlink for a quote name or a generated work
              order number for a specific record ID.</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">bookserviceappointment</td>

            <td class="slds-cell-wrap" style="vertical-align:top;">This event triggers when you click Book ServiceAppointment using both the generated
              work order ID and the LWC’s Book Service Appointment URL.</td>

          </tr>
        </tbody>
      </table>

## LMS Events Monitored

These are the event and their triggers monitored when a work order is generated.

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <tbody>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">Event Name</td>

            <td class="slds-cell-wrap" style="vertical-align:top;">Trigger Monitored</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">workordergenerated</td>

            <td class="slds-cell-wrap" style="vertical-align:top;">
              <p>Sets the work order ID using details from the message data and displays the status of the
                work order if it is created or merged.</p>
              <p>Enables the Lightning spinner when the work order name is displayed and the quote is in
                approve status.</p>
              <p style="margin-bottom:0;">The Book Service Appointment option shows up with the correct information.</p>
            </td>

          </tr>
        </tbody>
      </table>