Watermarks and Integration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2013 05:19 AM
Hi all,
For a special need, we integrated 2 solutions and emails for the "other solution" are sent by Web Service to ServiceNow.
ServiceNow sends the emails rightly but it doesn't add the watermark on the email.
Do you know if it's possible to add the watermark at the creation of the sys_email if this one doesn't exist?
i tried to understand how the sys_email are built but i think i don't have access to the necessary methods to do that.
The "events process" scheduled items seems to start the process of creation of the notification but i can't go further (I didn't find the gs.eventsProcess() function anywhere)
Best regards,
David
- Labels:
-
Analytics and Reports
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-07-2013 09:12 PM
It is possible to add custom watermark to an email, by default it is available on all emails.
If you want to create new watermarks go to Number Maintenance, create a sys_watermark record.
I think so this should do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2013 01:52 AM
Hi Bibin,
Thanks for the help but the issue is a little more complex, the number maintenance thing is working for email created by ServiceNow (a notification of an incident for example)
Here:
1) We create a sys_email record directly from the Direct Web Service (i tried to use Web Service Import Set but it didn't create the email at all)
2) When the sys_email is creating, we would like to add the watermark
Another solution will to cancel this integration and push the email body into the "comments" field and send a proper notification this way but the integration is still the best way in this case...
edit: So if anyone know how to add watermark manually, i'll take the tip 🙂
Maybe i could try with my own business rule on it by:
1) creating the watermark
2) editing the email
Regards,
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-12-2013 06:20 AM
Hi,
If it can help someone, i just used this code:
* Business rule:
* on sys_email
* Before insert
* Condition : current.body.indexOf("Ref:MSG") == -1 && current.type == "send-ready"
//This business rule is used to add a watermark to the email sent by webservices from 3rd party software
//If the body doesn't contain a watermark for a message send-ready, it's necessary to add it
//Create a new watermark with the information of the email created by the webservice
var watermark = new GlideRecord('sys_watermark');
watermark.source_table = "incident"; (in our case)
watermark.source_id = current.instance;
watermark.email = current.sys_id;
//Store the number of the watermark and save it
var number = watermark.number;
var sysID = watermark.insert();
//Add the watermark to the body
current.body += "<p><div style='display:inline'>Ref:" + number + "</div></p>";
I think the best solution is to create completely the notification with ServiceNow (the 3rd party has to update the incident) but this solution works fine (and the behavior is the same than the OOB watermark use)
Best regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-26-2015 06:52 AM
Thanks! It was quite useful for me.