1

I have a requirement where we need to send an order confirmation email to related contacts when the order status is confirmed and two other fields from Product Object satisfies certain value. Need to wait 15 minutes before sending this email. During this wait time, permitted users should be able to cancel the email send from a button implemented in the Order record page. Questions:

  1. Since I need to add 15 minutes wait after the apex action to check the custom Product field values can't go with the scheduled path, is there any other way for this
  2. The button to cancel the email send should disappear after 15 minute wait time - how can I implement this.

Thanks in advance!

1
  • You'll need to architect a solution where you store the email (but not send it) for 15 minutes. Commented Apr 15, 2024 at 21:51

1 Answer 1

0

I would suggest the following:

  1. Create a custom checkbox field on the Order object that will be TRUE if an email needs to be sent out.
  2. Upgrade your Order lightning record page to Dynamic Forms and add the custom checkbox field onto the page.
  3. Set field visibility on the field to only show when TRUE and when the user has the relevant profile.
  4. OR you can hide the field from the page layout and add a button that triggers a screen flow that will uncheck the custom checkbox field. Add the necessary visibility filters for the button to only show when relevant.
  5. Create a flow that runs when the criteria you mentioned evaluates to true. All it does is mark the checkbox as true on the Order object.
  6. Create another flow that triggers when the checkbox is checked. Add a 15 minute scheduled path that retrieves the Order record again after 15 minutes and then if the checkbox is still selected, then send the email. If unselected, exit the flow.

enter image description here

Good luck!

2
  • 1
    Hey @Adriaan, I was able to resolve it using a combination of Trigger, autolaunched flow and lwc. Thanks:) Commented May 7, 2024 at 8:52
  • @Rachel glad you got it sorted Commented May 7, 2024 at 8:55

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.