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
To 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
-
When an order is submitted, the
submittedOrderFlag
is set in the flow context. -
If the agent clicks Next and the component reloads, the flag prevents the Submit button from becoming clickable again.
-
This ensures no duplicate orders can be submitted, even if the screen reloads.
Benefits
-
Maintains order processing context.
-
Prevents duplicate submissions and their associated issues.
By following these steps, you can effectively prevent duplicate order submissions in your Salesforce-Limio integration.
Comments
0 comments
Please sign in to leave a comment.