How to send notification based on site with groupid

Issue

  • When having two separate sites, we want to create different notification for each, but we can't set separate notifications for different sites with the condition: groupId==<groupId of your site>.
    If we create "A notification" for "A site" and "B notification" for "B site", the triggering on "B site" invokes both "A" and "B" notifications, even, when the site is specified with groupID in the notification's condition.

Environment

  • Liferay DXP 7.4

Resolution

  • Since GroupID is not usable for such condition, as a workaround you should use a Groovy Script with ChannelID instead of GroupID.
  • On this LPS, you can find a template Groovy Script to achieve such behavior.

Additional Information

  • This solution works for Commerce as well.
这篇文章有帮助吗?
0 人中有 0 人觉得有帮助