- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2023 11:57 AM
Dear Team,
I have a requirement where there is a catalog item, that catalog item has a Checkbox Variable named 'SAP Flow', what I want is to send a Notification to specific users when in Catalog form any user checks the SAP Flow variable (SAP Flow=True). So I am trying this through New Notification and setting Condition through 'when to send' something like When to Send> Catalog item>Variable>SAP Flow is True, but not fulfilled.
Requesting help to get this resolved
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2023 02:09 PM
OK, here is a rough example using my sn developer instance oob workflow:
Open the workflow in workflow editor and add the IF gate after the approval action, before the task is created.
Then, configure the IF gate to look for the variable value:
Then add the event or notification in the workflow for "Yes". If you are using a very basic email notification, you can put it right here...
...or if you want to trigger other things off of this event, without needing to further modify the workflow in the future, use an event...or if you want to use features that are available in email notifications that may not be available in the workflow notification.
Since you already have the notification created, may as well use an event. This is what I'll provide in the example.
You can create a new event in the event registry or from the workflow here (you need to create the new event regardless). Also, if you need data from the catalog item, for the notification, you can pass that to the event using the 2 parameters (oob only supports 2 parameters) - usually people use the RITM number here as you can then write scripts to access other data elements from that item, if needed. See the highlighted portion below
The event doesn't have to be anything "fancy" (you can leave stuff blank, only a name is mandatory)...but should be configured to provide information about what it is for.
Events in the event registry use "dot notation" to separate the words as a best practice -- no spaces. Even though I believe it technically supports dashes and underscores, I'd recommend avoiding dashes and underscores (stick to dot notation, matching oob events).
It is also best practice to name it to reference the table which calls it, as well as the action is is for...I didn't do this in the example below. Using the same naming structure as oob events, you may want to call it "sc_req_item.sap.email.event" if you specify the table as shown below - but that's not a requirement.
The most important thing for the name or properties of the event in the registry is that it is meaningful and represents what it is for.
If you chose to instead just stick a notification here in the workflow, instead of an event, you're done...just publish the workflow and imagine the screenshot below has the notification in place of the event. If you chose to use an event, you're still publishing - but it'll look like this:
If using the event, after publishing the new workflow, go to the notification you created and change it to be triggered by the event you created. I didn't actually create a new event in my sn developer instance, so the image below would have the event name you created before (sap.email.event) in the example above.
HOPE THIS HELPS!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2023 12:25 PM
@rishabh31you can create this notification on sc_req_item table not on sc_cat_item table and try once.
ideally this is not a best way to trigger notification.
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.
Regards,
Ranjit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2023 02:23 PM
@rishabh31 ... @Ranjit Nimbalka is correct here, it will work on sc_req_item not sc_cat_item - but also correct as it is ideally not the best way to trigger
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2023 07:30 PM
@jMarshal Sir, as of now you people bring me way too close to get this resolved and I understand things now.
But could you please help me what is an ideal way to trigger the notification in my scenario and why the said way is not a best way to trigger notification.
Once this will get resolved, I will surely mark multiple solution as correct and helpful.
What I need for now is a proper way to fulfill this requirement.
kindly help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2023 08:51 AM
Hello - I am glad you are almost done with your solution. I would say the best way is an event like I described before. I hope it works for you! 🙂