Trigger Survey from a Flow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2023 12:29 PM
I'm unable to use the OOB Trigger Condition to create and send a survey to a user because the instance uses a couple of custom text fields to capture the name and email. I would love to change this but that's a different story.
Has anyone used a Flow to trigger a survey and email to the user? Can it be done?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2023 11:15 PM
@Vernon1 yes we can do both from Flow
to trigger email trigger a event in flow script and in email notification trigger should be event is fired
Generating Events
There are two ways to generate events:
- Server-side script using the gs.eventQueue() method
- Workflow Create Event activity
gs.eventQueue() Method
The eventQueue() method is part of the GlideSystem server-side API. The eventQueue() method inserts an event in an event queue. The eventQueue() method is typically passed four parameters but can also take an optional 5th parameter:
- Event name. Enclose the event name in quotes.
- GlideRecord object, typically current but can be any GlideRecord object from the event's table.
- Any value that resolves to a string. This is known as parm1 (Parameter 1). Can be a string, variable that resolves to a string, or method that resolves to a string.
- Any value that resolves to a string. This is known as parm2 (Parameter 2). Can be a string, variable that resolves to a string, or method that resolves to a string.
- (Optional) Name of the queue to manage the event.
example:
gs.eventQueue('event.name', GlideRecord, parm1, parm2); // standard form
gs.eventQueue('x_58872_needit.overdueNeedItTask',current,current.number,gs.getUserName());
To trigger survey go to survey in related lists open trigger conditions
give work notes changes and work notes contain "This is to trigger survey only from Flow".
In flow when you want to trigger survey in that action update work notes with above.
Bharath Chintala
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2023 07:35 AM
Thanks for responding to my post.
Regarding the trigger condition, I do not get the option of "Work Notes contains". My only option is "Work Notes changes". Is there something I'm missing?