Is it possible to retrieve Signature Dates for all signers in a completed package?
Thank You.
May 12Created
May 12Last Updated
3 years agoLast Reply
14Replies
217Views
2Users
0Likes
0Links
Duo_Liang | Posts: 3776
Reply to: Signature Dates from completed package
Wednesday, May 12, 2021 at 03:11pm
0
votes
Hi Anu,
If you want to retrieve the signature date on each signature, it's better to get the package JSON, loop through each "documents" > "approvals" > and locate the "role" and "signed" attributes.
If you simply want to know the last completion date of each signer, there are few other options:
- Turn on the "In-app Reporting" feature which has been introduced recently, download the Transaction Reports and look up for the "signer completed date" column. (Note, Reports will record only activities that occur after In-App Reporting is enabled)
- Set up a Callback Listener and monitor the "SIGNER_COMPLETE" event - this required extra development at your end and also only records activities afterwards
I do not need to read the signature date on each signature field but need to know the last completion date of each signer at the package level or say, for a document in the package. Is there an SDK method to get this info.
As the application we have is not web based, I cannot set up Callback listeners.
I have a question on the signature date retrieval.
I noticed that the Signature object does not have a link to the corresponding Signer object who signed the signature field. In my case, the Signers in the document uploaded to OneSpan all have a unique "Id", Email Address may be shared between signers but Id will be unique for each signer.
So I was hoping I could see this Signer Id linked to a Signature object that is retrieved from the signed document. In the scenario where the email id is shared between Signers, I am currently unable to map which Signature belongs to which Signer (Id). I need to know for my application, Signature date per Signer.
The e-Signature I see on the signed document visually has the name of the signer, so OneSpan seems to be having the Signer information linked to a Signature behind the scenes. How can I access that in the SDK when retrieving the Signatures?
Yes, recently I also realized this issue and has reported to the R&D team. As a workaround, you can loop through API modelling (com.silanis.esl.api.model.*) via Java SDK:
public void execute() {
EslClient eslClient = new EslClient(API_KEY, API_URL);
String packageId = "RTqmolHONm43tcpYUqJWe917EXE=";
com.silanis.esl.api.model.Package apiPackage = eslClient.getPackageService().getApiPackage(packageId);
for (com.silanis.esl.api.model.Document document : apiPackage.getDocuments()) {
for (com.silanis.esl.api.model.Approval approval : document.getApprovals()) {
// signed date and accepted date, as we discussed before
Date signed = approval.getSigned();
Date accepted = approval.getAccepted();
// get role ID
String roleId = approval.getRole();
System.out.println("Role " + roleId + " has signed at " + signed);
}
}
}
On top of the "accepted" date we discussed above, there are actually two dates for each signature:
-“accepted” means the timestamp when the signer signed this particular signature
-“signed” refers to the time when signer confirmed all signatures on this document
The SDK modelling (com.silanis.esl.sdk.*) only exposes accepted date, but API modelling has them both.
Unfortunately it doesn't - even though the function was there, but both the model class "Silanis.ESL.API.Package" and the function "class PackageService > internal OneSpanSign.API.Package GetPackage(PackageId packageId)" are protected. We may have to rely on the R&D response to the ticket I raised few weeks ago to have this issue fixed.
Ok. Do you have an ETA from the R&D team on this issue resolution ? We are currently developing this code on the OneSpan 11.43 version (NuGet package). As a workaround until the issue is resolved, do you have any suggestions to achieve the link between Signer and Signature using this version? Any way we can get the "Name" of the signer from the Signature object ? currently this field is also empty.
Yes, I would suggest to include the role ID as part of the signature ID, like "Signer1_Signature1" to create an association between signers and the signatures.
Are you referring to setting the Signer with a Role or Adding the Role to the Signature field ? We use Text Tags to set the Signature field in the document which includes the Signer Id
As per the below from OneSpan documentation, I am already setting the Role by adding the Custom ID (of the Signer) to the Signature field
"If you create a signer using the SDK, and assign a Custom ID to that signer, that ID will be the signer's role name."
esl:Signer1:signature:size(200,50) , The issue is that in the Signature object, the value for RoleId is null - shouldn't the Custom Id set in the text tag be seen on the signature object ?
Signature.RoleId is null, this is because in SDK design, the RoleId field will only be set if the signer is a placeholder signer. In other cases, the SDK will first do an internal lookup then bind the signers to their emails. However, this is no longer desired when multiple signers can now share the same email, which is exactly what I have reported.
Reply to: Signature Dates from completed package
Wednesday, May 12, 2021 at 03:11pmHi Anu,
If you want to retrieve the signature date on each signature, it's better to get the package JSON, loop through each "documents" > "approvals" > and locate the "role" and "signed" attributes.
If you simply want to know the last completion date of each signer, there are few other options:
- Turn on the "In-app Reporting" feature which has been introduced recently, download the Transaction Reports and look up for the "signer completed date" column. (Note, Reports will record only activities that occur after In-App Reporting is enabled)
- Set up a Callback Listener and monitor the "SIGNER_COMPLETE" event - this required extra development at your end and also only records activities afterwards
Duo
Reply to: Signature Dates from completed package
Wednesday, May 12, 2021 at 03:24pmHi Duo,
I do not need to read the signature date on each signature field but need to know the last completion date of each signer at the package level or say, for a document in the package. Is there an SDK method to get this info.
As the application we have is not web based, I cannot set up Callback listeners.
Reply to: Signature Dates from completed package
Wednesday, May 12, 2021 at 03:47pmHi Anu,
Use logic similar to below code snippet should work:
EslClient client = new EslClient(API_KEY, API_URL);
Map<String, Date> completionMap = new HashMap<String, Date>();
DocumentPackage package1 = client.getPackage(new PackageId("_--E04moWetkc6PS6eTf69tV3UE="));
for (Document document : package1.getDocuments()) {
for (Signature signature : document.getSignatures()) {
String signerEmail = signature.getSignerEmail();
Date accepted = signature.getAccepted();
if(signerEmail != null && accepted != null) {
if(!completionMap.containsKey(signerEmail) || completionMap.get(signerEmail).before(accepted)) {
completionMap.put(signerEmail, accepted);
}
}
}
}
System.out.println(completionMap);
Duo
Reply to: Signature Dates from completed package
Wednesday, May 12, 2021 at 03:49pmThanks Duo. I can give this a try.
Reply to: Thanks Duo. I can give this…
Thursday, July 22, 2021 at 03:28pmHi Duo,
I have a question on the signature date retrieval.
I noticed that the Signature object does not have a link to the corresponding Signer object who signed the signature field. In my case, the Signers in the document uploaded to OneSpan all have a unique "Id", Email Address may be shared between signers but Id will be unique for each signer.
So I was hoping I could see this Signer Id linked to a Signature object that is retrieved from the signed document. In the scenario where the email id is shared between Signers, I am currently unable to map which Signature belongs to which Signer (Id). I need to know for my application, Signature date per Signer.
The e-Signature I see on the signed document visually has the name of the signer, so OneSpan seems to be having the Signer information linked to a Signature behind the scenes. How can I access that in the SDK when retrieving the Signatures?
Thanks
Reply to: Hi Duo, I have a…
Thursday, July 22, 2021 at 03:43pmHi Anu,
Yes, recently I also realized this issue and has reported to the R&D team. As a workaround, you can loop through API modelling (com.silanis.esl.api.model.*) via Java SDK:
public void execute() {
EslClient eslClient = new EslClient(API_KEY, API_URL);
String packageId = "RTqmolHONm43tcpYUqJWe917EXE=";
com.silanis.esl.api.model.Package apiPackage = eslClient.getPackageService().getApiPackage(packageId);
for (com.silanis.esl.api.model.Document document : apiPackage.getDocuments()) {
for (com.silanis.esl.api.model.Approval approval : document.getApprovals()) {
// signed date and accepted date, as we discussed before
Date signed = approval.getSigned();
Date accepted = approval.getAccepted();
// get role ID
String roleId = approval.getRole();
System.out.println("Role " + roleId + " has signed at " + signed);
}
}
}
On top of the "accepted" date we discussed above, there are actually two dates for each signature:
-“accepted” means the timestamp when the signer signed this particular signature
-“signed” refers to the time when signer confirmed all signatures on this document
The SDK modelling (com.silanis.esl.sdk.*) only exposes accepted date, but API modelling has them both.
Duo
Reply to: Hi Anu, Yes, recently I…
Monday, July 26, 2021 at 09:31amThank you Duo. Is the API modelling available for .NET ?
Reply to: Thank you Duo. Is the API…
Monday, July 26, 2021 at 09:50amUnfortunately it doesn't - even though the function was there, but both the model class "Silanis.ESL.API.Package" and the function "class PackageService > internal OneSpanSign.API.Package GetPackage(PackageId packageId)" are protected. We may have to rely on the R&D response to the ticket I raised few weeks ago to have this issue fixed.
Duo
Reply to: Signature Dates from completed package
Monday, July 26, 2021 at 10:20amOk. Do you have an ETA from the R&D team on this issue resolution ? We are currently developing this code on the OneSpan 11.43 version (NuGet package). As a workaround until the issue is resolved, do you have any suggestions to achieve the link between Signer and Signature using this version? Any way we can get the "Name" of the signer from the Signature object ? currently this field is also empty.
Thanks!
Reply to: Ok. Do you have an ETA from…
Monday, July 26, 2021 at 10:26amYes, I would suggest to include the role ID as part of the signature ID, like "Signer1_Signature1" to create an association between signers and the signatures.
Duo
Reply to: Signature Dates from completed package
Monday, July 26, 2021 at 11:20amAre you referring to setting the Signer with a Role or Adding the Role to the Signature field ? We use Text Tags to set the Signature field in the document which includes the Signer Id
esl:Signer1:signature:size(200,50)
Reply to: Are you referring to setting…
Monday, July 26, 2021 at 11:25amIn this case, I meant to specify signature/field ID within the text tag:
{{esl_Signer1_Signature1:Signer1:signature:size(200,50)}}
You can find all the supported syntax in this guide.
Duo
Reply to: Signature Dates from completed package
Monday, July 26, 2021 at 11:57amAs per the below from OneSpan documentation, I am already setting the Role by adding the Custom ID (of the Signer) to the Signature field
"If you create a signer using the SDK, and assign a Custom ID to that signer, that ID will be the signer's role name."
esl:Signer1:signature:size(200,50) , The issue is that in the Signature object, the value for RoleId is null - shouldn't the Custom Id set in the text tag be seen on the signature object ?
Reply to: As per the below from…
Monday, July 26, 2021 at 12:05pmSignature.RoleId is null, this is because in SDK design, the RoleId field will only be set if the signer is a placeholder signer. In other cases, the SDK will first do an internal lookup then bind the signers to their emails. However, this is no longer desired when multiple signers can now share the same email, which is exactly what I have reported.
Duo