-1

I have a requirement where if any Salesforce user tried to update stage value of an opportunity record not owned by him then I need to send a bell notification as well as a email to that opportunity record owner that the stage value is changed.

My question is can I create bell notification and send email component in the same flow and develop this functionality?

2
  • so -- did you try this? (hint -- the answer is YES)
    – cropredy
    Mar 9 at 23:09
  • Yes I could successfully implement email functionality. But now I don't have an idea how to include bell notification component in my flow. I know what all inputs to give for bell notification. But I don't know EXACTLY how can I include in my flow structure. My flow structure has a record triggered flow with after save condition. It's followed by Update Records element where the conditions are last modified by ID not equal Owner ID and new stage name not equal to old stage name. This followed by email alert component. @cropredy
    – Aishwarya
    Mar 11 at 17:33

1 Answer 1

0

Bell alerts require three Flow steps:

  1. Query for the Custom Notification that you have set up. Do an equality match on DeveloperName against object Custom Notification Type
  2. Add to a Text Collection variable the UserId(s) you want to be notified in an Assignment element.
  3. Add a Send Custom Notification action and provide data for the Custom Notification Type Id using the results from step 1; a body, a title, the recipient Ids (from the collection variable of step 2), and a target object Id (if you want the alert to appear on the Opportunity). You can optionally also set a Sender Id (if different than the running user) and a target page reference.

This is all documented in Send Custom Notification Help. There are some limits (see the aforementioned Help doc)

enter image description here

3
  • Thanks for the response. This I understood. But how I do include both email and bell notification functionality in the same flow? I have already implemented for email and now I want to include bell notification also in the same flow. How to do it?
    – Aishwarya
    Mar 12 at 11:34
  • so, put in a send email Flow element as well; you stated you had already done this in the OP. There is no Flow element that does email + bell in a single construct (unless you delegated to an Apex Action)
    – cropredy
    Mar 12 at 17:58
  • Okay alright, I will try to work on this.
    – Aishwarya
    Mar 13 at 5:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.