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.
| Field Name | Description |
| Quote ID (mandatory) | Indicates the ID for which the quote is approved and the work orders will be created. |
| Launch Record ID | Indicates the ID from which this LWC or the related flow is triggered or launched. |
| Valid Work Order Statuses | Indicates the work order status such as New, Draft, or In Progress, separated by a comma without any space. |
| Book Service Appointment URL | Indicates the URL for the book service appointment page. |
| Event Co-Relation ID | Indicates the ID to track the events produced and consumed during LMS. |
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.
| Event Name | Trigger Condition |
| createworkorder | This event triggers after you select approve, after selecting yesto approve the quote and select the option to generate a new work order. |
| mergeworkorder | This event triggers after you select approve, after selecting yesto approve the quote and merge it to the existing work order. |
| updatequotestatus |
This event triggers when you reject a quote by selecting the No option, providing a reason, and then clicking Reject. This event triggers when you approve after selecting yes to approve the quote and select no to create work orders. 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. |
| showtoast(Operation Type: graphql error, Operation Status: false) |
This event triggers if an error occurs when fetching these data:
|
| quotestatusupdated | 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. |
| urlnavigation | This event triggers when you select the hyperlink for a quote name or a generated work order number for a specific record ID. |
| bookserviceappointment | This event triggers when you click Book ServiceAppointment using both the generated work order ID and the LWC’s Book Service Appointment URL. |
LMS Events Monitored
These are the event and their triggers monitored when a work order is generated.
| Event Name | Trigger Monitored |
| workordergenerated |
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. Enables the Lightning spinner when the work order name is displayed and the quote is in approve status. The Book Service Appointment option shows up with the correct information. |