Prevent Multiple Orders Being Submitted
LFS version: requires v12.09 or later
Context:
When an agent reaches the final Order Summary Screen in any of the Limio flows and clicks the Submit button, a callout is triggered to the Limio system to publish the order. After clicking Submit, the button becomes greyed out and unclickable to prevent multiple submissions.
However, a specific issue arises if the agent clicks Next after clicking Submit to navigate through the flow during order processing.
If the Next button is clicked:
The component on the Order Summary Screen reloads.
The Submit button becomes enabled again.
The ongoing order context is lost:
Agents cannot view the loading events of the ongoing order.
Agents might inadvertently click Submit again, submitting a duplicate order.
This behavior can lead to unnecessary issues, including duplicate submissions and associated consequences.
Solution: Introducing submittedOrderFlag
submittedOrderFlagTo address this problem, we introduced a new property called submittedOrderFlag in the flowOrderSummary component and an accompanying input for self-reference. Here’s how it works:
**submittedOrderFlag**: Tracks whether an order has already been submitted.Self-Reference Input: Allows the flow to persist the submission status in the flow context.
Steps to Implement
Add Self-Reference to the Input:
Open the flow in the Flow Builder.
Locate the flowOrderSummary component.
Add the self-reference input to the component to check for an already submitted order.
Save a New Flow Copy:
After making the changes, save the flow with a new version.
Activate the Updated Flow:
Activate the new version to ensure it takes effect.
How It Works
Order Submission Triggers the Flag When the agent submits an order, the
submittedOrderFlagis automatically set in the flow context.Submit Button Gets Disabled With the flag set, the Submit button is immediately greyed out and becomes unclickable. This visually confirms that the submission is in progress or completed.
Reload-Resistant UX If the agent clicks Next and the component reloads (as might happen during navigation), the
submittedOrderFlagremains in context. As a result:The Submit button stays disabled.
A message appears stating: **“This order has already been submitted.”
**
Why This Matters
This mechanism ensures:
No accidental duplicate submissions — even during reloads.
Clear visual feedback — both the disabled button and confirmation message reinforce submission state.
Note
Navigating Back Re-enables Submission If the agent clicks Previous, the flow treats this as a change to the order. In this case:
The
submittedOrderFlagis cleared.The Submit button becomes active again, allowing the agent to submit a new version of the order.
Last updated
Was this helpful?

