Embedding E-Signature into Existing PDF Attachment on Incident
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Team,
Is it possible in ServiceNow to embed a user’s e-signature (drawn or typed) directly into an existing PDF attachment on an Incident record, and update the same attachment with the signed document instead of creating a new one?
I am currently using the E-Signature plugin and would like to understand if this is achievable OOB or if any custom approach or integration is required.
Any guidance or recommended approach would be helpful.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @vaishalisin
Option 1) As per KB:KB0966931 E-Signature/Document Template FAQ
Review the following example of creating an E-signature on an incident task:
- Create the e-sign template on the incident task table. Select the following:
- Document type - Managed Document
- E-signature type - Signature
- Configure the Incident task form and add the 'E-Signature Template' field
- Configure the Incident Related Lists and add the 'E-signature history'. Fill in the template field with the template created previously
- Assign a group and a user to the task.
- Impersonate the user and open the task.
- Move the task to 'Work in progress'
The 'Sign document' UI action will now appear for the user to sign the document.
To retrieve this signature log, navigate to System Logs > Signature Images (signature_image table). Also, you can view the E-signature history in the related list
Note: make sure the user has access to KB as KB is the document used in the E-Signature template
Option2)
When inbound emails are received by an instance, all the embedded images, signatures, or files get attached to the target task record, i.e. the Incident table, along with the actual attachments based on the inbound email action.
This is an out-of-box behavior.
Refer: KB0749517 Inbound email embedded images are being added as attachments to the target record
Refer this as well : How to add Digital Signature in PDF through Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
The 1st support article posted by tanushree says this:
"I e-signed, but the signature doesn't appear in the document. Why?
You can only embed the signature through HR Document Template (document type = HR document template in E-signature template). If you e-sign a managed document or knowledge article (document type = managed document/knowledge article in E-signature template), the signature will not appear within the document itself. However, the signature will be saved to the E-signature history."
Doesn't look like you are able use the app to embed signatures. Also I don't think you can edit a pdf with any oob api, the use case I suppose being that you have templates (or using pdfgeneratorapi) which you fill and then save a copy. You'd have to create the filled pdf and then delete the existing sys_attachment_doc records and relate the new contents to the existing attachment or force an update on the sysid. Does it need to be the same record? You could create a new one and delete the existing one.
The api usage is quite simple, inserting a signature image:
var requestor = new sn_pdfgeneratorutils.PdfMergeSignRequestor;
//createRequest(String targetSysId (the to be signed attachment), String targetTable, String tableSysId (the record it is attached on), String targetFileName)
requestor.createRequest("7023d56683140750557ff0d6feaad354", "sn_esign_configuration", "27441eceb77c3300a251e556ee11a9f2", "signedpdf.pdf");
// For the purpose of this example, set signature sizes and page number for signature placement
var page = 1;
var leftMargin = 40;
var topMargin = 50;
var signatureWidth = 188;
var signatureHeight = 44;
//last argument is signature image
requestor.addSignatureMapping(page, leftMargin, topMargin, signatureWidth, signatureHeight, "0db3d56a83140750557ff0d6feaad3f2");
var result = requestor.processRequest();
gs.info(JSON.stringify(result));
