- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-08-2020 02:44 AM
Hi,
When I use outlook actionable messages for surveys, the embedded survey will "override" other information in that notification.
For instance, I would like information on an incident or Case to be included in the notification with the embedded survey. Is there a way to do this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2020 02:28 PM
Hi,
This is such a hit and miss plug-in for me, there is so much great work in there but the ability to customize is such a big piece of the puzzle. It is a notification after all.
Digging into the plugin I can see most the magic of creating the embedded survey is done in the protected script include, SurveyAdaptiveCardGenerator.
The first issue is the hideOriginalBody is set to true (see below), which works great for a clean embedded survey but takes any chance away of customizing around it. I think this is the override piece you are talking about.
this.card = {
"type": "AdaptiveCard",
"version": "1.0",
"originator": gs.getProperty('sn_ms_oam.outlookactionable.originator'),
"padding": "none",
"expectedActors": this._getExpectedActors(),
"hideOriginalBody": true,
"body": []
};
Description of hideOriginalBody copied from Microsoft Doco
When set to true, causes the HTML body of the message to be hidden. This is very useful in scenarios where the card is a better or more useful representation of the content than the HTML body itself, which is especially true when the card contains actions. Consider hiding the original HTML body if the card itself contains all the information a user would need, or if the content of the card is redundant with the content of the body. Do always include a nice, meaningful HTML body, even if it is going to be hidden. The HTML body is the only thing an email client that doesn't support cards will be able to display. Furthermore, cards are not included when replying to or forwarding emails, only the HTML body. Don't hide the body when it is complementary to the information presented in the card. For example, the body of an expense report approval might describe the report in great details while the card just presents a quick summary along with approve/decline actions.
For me I would really like to add some branding as it helps with uptake of the notification as we use specific logos to make this look like a company email. (fully aware that's what phishing is :))
IF we could modify the script include, I think that is where you would be able to add the additional information you wanted.
Really I would like to see some configuration options added to this plugin, like some simple branding or more input into how the protected script include behaves would be great.
If anyone has some workaround ideas on how to brand "outside the box" that would be great. My only thought now is to possibly manipulating the notification before it is sent to add the required AdaptiveCard JSON, for my use case that would be:
{
"type": "Image",
"url": "https://path_to_image_here",
"altText": "
},
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2022 11:09 AM
Thanks
We can add our own JSON data just before the survey card so that it looks better. Below is the email content we get in email logs anything which comes under tag 'Body' is shown in the email to end users we can have our data added just before survey question. Text highlighted in blue is the one we can add before sending out to end user. This is just an example we can have more complex content added to the survey.
-----------------------------------------------------------------
<p><code><script type="application/adaptivecard+json">{"type":"AdaptiveCard","version":"1.0","originator":"130e10fd-f029-4b15-9afe-080d08b1b932","padding":"none","hideOriginalBody":true,"body": [{"type": "Container","items": [{"type": "ColumnSet","columns": [{"width": "stretch","items": [{"type": "Image","horizontalAlignment": "Center","url": "https://logos-world.net/wp-content/uploads/2022/02/ServiceNow-Symbol.png","height": "80px","altText": "Servicenow Logo"}]}]}]},{"type":"Container","style":"emphasis","padding":"default","items":[{"type":"TextBlock","text":"Your feedback truly matters! You will not be required to share any personal information. \r\n ","size":"large","wrap":true,"color":"default"}]},..............................................
This is how email will look like after that :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-06-2022 11:14 AM
We had a discussion with HI support expert as well they were unable to provide any solution.
Sadly as of now this is the only hack which I think we can use.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-07-2022 12:48 AM
Hi Sahil,
I'm glad you found this helpful, and thanks for the further work which actually gave me the solution for my problem.
If I read it well we can prepare the body we want to print, by also picking up fields from the record e.g. Requester, state, opened and other fields we usually pick to summarise an incident in email, and then inject it in the JSON so that it appears where we want, in my case at the top, before showing the survey question. Awesome!
I truly hope in the next releases they will make the OAM plugin more flexible and configurable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-07-2022 02:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-21-2022 03:44 AM
Hi Sahil,
Thanks for the further improvements. Not sure if ServiceNow will ever open the OAM to such level of configuration. I really hope so, because currently they are not usable.
I was wondering if you managed to avoid the disappearance of the body, once the user submits the survey.
In my case I would like to keep the content of the email, because there is also the link to the ticket, plus details including resolution, short description ,etc.
But now, if the user submits the survey, every disappears and only the confirmation of the submission will be shown.
I'm sure there should be a way to do that, but before I wanted to check with you, maybe you already sorted it.
Cheers
Alessandro